Fixed two regressions that could lead to crashes.

This commit is contained in:
Leon Styhre 2021-03-17 20:16:22 +01:00
parent 84ecb7489e
commit f08b434bc6

View file

@ -224,11 +224,17 @@ namespace Renderer
return false; return false;
} }
// Create a black surface which will avoid the white screen that would otherwise flash // TEMPORARY: This was an attempt to get rid of the annoying white screen flashing seen
// by briefly before the splash screen is rendered when using some graphics drivers. // on some systems when starting the application. However it caused other adverse
SDL_Surface* blackSurface = SDL_GetWindowSurface(sdlWindow); // effects on Linux such as crashes if attempting to start the application with the
SDL_FillRect(blackSurface, nullptr, SDL_MapRGB(blackSurface->format, 0x00, 0x00, 0x00)); // --resolution flag in full screen mode and when attempting to launch games that changes
SDL_UpdateWindowSurface(sdlWindow); // 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..."; LOG(LogInfo) << "Setting up OpenGL...";