The screen is now blanked when launching games to eliminate some flickering and other issues.

This commit is contained in:
Leon Styhre 2021-03-27 13:51:50 +01:00
parent ec33d8a612
commit 2adff3643e

View file

@ -946,6 +946,12 @@ void FileData::launchGame(Window* window)
return;
}
// swapBuffers() is called here to turn the screen black to eliminate some potential
// flickering and to avoid showing the game launch message briefly when returning
// from the game.
if (!ViewController::get()->runInBackground(mSystem))
Renderer::swapBuffers();
Scripting::fireEvent("game-start", romPath, getSourceFileData()->metadata.get("name"));
int returnValue = 0;