Relinquish CPU when running RMS scripts, to speed up loading on single-core machines
This was SVN commit r9366.
This commit is contained in:
parent
791ecee26b
commit
3ac72813ef
@ -29,6 +29,7 @@
|
||||
#include "graphics/TerrainTextureEntry.h"
|
||||
#include "graphics/TerrainTextureManager.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/external_libraries/sdl.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Loader.h"
|
||||
@ -1109,6 +1110,10 @@ int CMapReader::GenerateMap()
|
||||
else
|
||||
{
|
||||
// Still working
|
||||
|
||||
// Sleep for a while, slowing down the rendering thread
|
||||
// to allow more CPU for the map generator thread
|
||||
SDL_Delay(100);
|
||||
}
|
||||
|
||||
// return progress
|
||||
|
Loading…
Reference in New Issue
Block a user