1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Merge pull request #1263 from marsej/SDL-init-white-bg-to-black

Changed SDL initial bg color from white to black to remove white flas…
This commit is contained in:
Brian Fiete 2021-12-21 07:30:24 -05:00 committed by GitHub
commit 670fc4fe75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,7 +117,7 @@ namespace SDL2
SDL.EventState(.JoyDeviceAdded, .Disable);
SDL.EventState(.JoyDeviceRemoved, .Disable);
mWindow = SDL.CreateWindow(mTitle, .Undefined, .Undefined, mWidth, mHeight, .Shown);
mWindow = SDL.CreateWindow(mTitle, .Undefined, .Undefined, mWidth, mHeight, .Hidden); // Initially hide window
mRenderer = SDL.CreateRenderer(mWindow, -1, .Accelerated);
mScreen = SDL.GetWindowSurface(mWindow);
SDLImage.Init(.PNG | .JPG);
@ -246,7 +246,9 @@ namespace SDL2
if (curPhysTickCount == 0)
{
// Initial render
Render();
Render();
// Show initially hidden window, mitigates white flash on slow startups
SDL.ShowWindow(mWindow);
}
else
{