From 7a9954152a9fa27ee4bbfe379aef9a2821375c71 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Thu, 25 Jun 2020 22:32:31 -0400 Subject: [PATCH] [ion/simulator] Ion::Simulator::Main::relayout() should not draw That function is supposed to recompute the layout, not perform any drawing. Namely, presenting the render without a potential previous call to SDL_RenderClear could lead to some visual glitches. --- ion/src/simulator/shared/main_sdl.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ion/src/simulator/shared/main_sdl.cpp b/ion/src/simulator/shared/main_sdl.cpp index 0a79caf9c..241b2495c 100644 --- a/ion/src/simulator/shared/main_sdl.cpp +++ b/ion/src/simulator/shared/main_sdl.cpp @@ -115,11 +115,6 @@ void relayout() { sScreenRect.h = windowHeight; #else Layout::recompute(windowWidth, windowHeight); - SDL_Rect backgroundRect; - Layout::getBackgroundRect(&backgroundRect); - - SDL_RenderCopy(sRenderer, sBackgroundTexture, nullptr, &backgroundRect); - SDL_RenderPresent(sRenderer); #endif setNeedsRefresh();