From ab906da53de73d715b652e0c129c6e791a097a4f Mon Sep 17 00:00:00 2001 From: Joachim LF Date: Sun, 11 Oct 2020 12:37:44 +0200 Subject: [PATCH] [Ion/SDL] Fix conflicts with master --- ion/src/simulator/shared/main_sdl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ion/src/simulator/shared/main_sdl.cpp b/ion/src/simulator/shared/main_sdl.cpp index 5b9e0bfde..7b85c02ee 100644 --- a/ion/src/simulator/shared/main_sdl.cpp +++ b/ion/src/simulator/shared/main_sdl.cpp @@ -278,6 +278,7 @@ void relayout() { SDL_GetWindowSize(sWindow, &windowWidth, &windowHeight); SDL_RenderSetLogicalSize(sRenderer, windowWidth, windowHeight); + #if !EPSILON_SDL_SCREEN_ONLY if (argument_screen_only) { // Keep original aspect ration in screen_only mode. float scale = (float)(Ion::Display::Width) / (float)(Ion::Display::Height); @@ -294,6 +295,12 @@ void relayout() { } else { Layout::recompute(windowWidth, windowHeight); } + #else + sScreenRect.x = 0; + sScreenRect.y = 0; + sScreenRect.w = windowWidth; + sScreenRect.h = windowHeight; + #endif setNeedsRefresh(); } @@ -307,6 +314,9 @@ void refresh() { return; } + #if EPSILON_SDL_SCREEN_ONLY + Display::draw(sRenderer, &sScreenRect); + #else if (argument_screen_only) { Display::draw(sRenderer, &sScreenRect); } else { @@ -319,6 +329,7 @@ void refresh() { Layout::draw(sRenderer); Display::draw(sRenderer, &screenRect); } + #endif SDL_RenderPresent(sRenderer);