mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Relax UI locking to reduce delays in AI actions
This commit is contained in:
parent
c0e54b338a
commit
a3f9450d83
@ -114,16 +114,20 @@ void CGuiHandler::renderFrame()
|
||||
{
|
||||
boost::mutex::scoped_lock interfaceLock(GH.interfaceMutex);
|
||||
|
||||
if(nullptr != curInt)
|
||||
if (nullptr != curInt)
|
||||
curInt->update();
|
||||
|
||||
if(settings["video"]["showfps"].Bool())
|
||||
if (settings["video"]["showfps"].Bool())
|
||||
drawFPSCounter();
|
||||
}
|
||||
|
||||
SDL_UpdateTexture(screenTexture, nullptr, screen->pixels, screen->pitch);
|
||||
SDL_UpdateTexture(screenTexture, nullptr, screen->pixels, screen->pitch);
|
||||
|
||||
SDL_RenderClear(mainRenderer);
|
||||
SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr);
|
||||
SDL_RenderClear(mainRenderer);
|
||||
SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr);
|
||||
|
||||
{
|
||||
boost::mutex::scoped_lock interfaceLock(GH.interfaceMutex);
|
||||
|
||||
CCS->curh->render();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user