From f08b434bc683aa0f7c4d60bb0971fbffafcd6ca2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 17 Mar 2021 20:16:22 +0100 Subject: [PATCH] Fixed two regressions that could lead to crashes. --- es-core/src/renderers/Renderer.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index c21e0686f..2fd8d6457 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -224,11 +224,17 @@ namespace Renderer return false; } - // Create a black surface which will avoid the white screen that would otherwise flash - // by briefly before the splash screen is rendered when using some graphics drivers. - SDL_Surface* blackSurface = SDL_GetWindowSurface(sdlWindow); - SDL_FillRect(blackSurface, nullptr, SDL_MapRGB(blackSurface->format, 0x00, 0x00, 0x00)); - SDL_UpdateWindowSurface(sdlWindow); + // TEMPORARY: This was an attempt to get rid of the annoying white screen flashing seen + // on some systems when starting the application. However it caused other adverse + // effects on Linux such as crashes if attempting to start the application with the + // --resolution flag in full screen mode and when attempting to launch games that changes + // the screen resolution. It may still be usable on other operating systems so I'm + // keeping the code for now. +// // Create a black surface which will avoid the white screen that would otherwise flash +// // by briefly before the splash screen is rendered when using some graphics drivers. +// SDL_Surface* blackSurface = SDL_GetWindowSurface(sdlWindow); +// SDL_FillRect(blackSurface, nullptr, SDL_MapRGB(blackSurface->format, 0x00, 0x00, 0x00)); +// SDL_UpdateWindowSurface(sdlWindow); LOG(LogInfo) << "Setting up OpenGL...";