mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +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:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user