1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Update texture while UI is locked to avoid concurrent accesses to pixel

data if netpack applier causes redraw
This commit is contained in:
Ivan Savenko 2024-06-12 18:12:03 +00:00
parent 1ac98e305f
commit 5b0b1ad7f7

View File

@ -118,9 +118,9 @@ void CGuiHandler::renderFrame()
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);