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:
parent
1ac98e305f
commit
5b0b1ad7f7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user