فهرست منبع

Update texture while UI is locked to avoid concurrent accesses to pixel
data if netpack applier causes redraw

Ivan Savenko 1 سال پیش
والد
کامیت
5b0b1ad7f7
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      client/gui/CGuiHandler.cpp

+ 2 - 2
client/gui/CGuiHandler.cpp

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