1
0
forked from 0ad/0ad

Relinquish CPU when running RMS scripts, to speed up loading on single-core machines

This was SVN commit r9366.
This commit is contained in:
Ykkrosh 2011-04-30 15:18:11 +00:00
parent 791ecee26b
commit 3ac72813ef

View File

@ -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