libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.4k stars 1.84k forks source link

For optimal immersion you should not see the Windows Desktop environment when transisting between RetroArch to Core and back again #13647

Open porg opened 2 years ago

porg commented 2 years ago

Reproduction

  1. Open RetroArch in fullscreen mode. Great immersion!
  2. Open a playlist, select a game, launch it.
  3. Until the core is loaded, you shortly see the Windows Desktop environment. (few secs)
  4. You play the game, in fullscreen mode. Great immersion!
  5. Exit the game.
  6. Until RetroArch is loaded again, you shortly see the Windows Desktop environment. (few secs)

Improvement Proposal

Workaround

Version/Commit

porg commented 2 years ago

What else?

hizzlekizzle commented 2 years ago

Yeah, it turns out this is much more complicated than it seems. The reason you see the desktop is because RetroArch has to completely tear down the existing context to be able to load the next one. Someone tried a few months ago to allow cores with compatible contexts to skip the teardown (e.g., OpenGL -> OpenGL), but it ended up being a big mess with a lot of edge cases and pitfalls (IIRC)--and it frequently had to tear down anyway--so they eventually abandoned it.

jayare5 commented 2 years ago

This is actually an annoying issue with Lakka too! You see the Lakka flower in between loading core and menu. Can RetroArch load a secondary fullscreen window with just black covering the screen?

Edit: I think I have a solution!! (Says a person who can't code) This could be just an experimental option in RetroArch, so that it doesn't affect the main behavior. If activated, RetroArch can create a secondary fullscreen instance, it should be "Always on top", but RetroArch's window should also be "Always on Top" so that it takes priority over the black one when focused on it. Additionally, the "black window" should try to pass the focus to the RetroArch window in case the black window ever gets priority.

macsgv commented 1 year ago

The same thing happens to me using Windows 11, as front-end I use ArcadeFlow and for retroarch emulators.

When I load a game from arcadeflow it calls retroarch's MAME core via CLI. So far everything is perfect :-)

But the transition from loading the game until it is seen on the screen is not clean, there is a flicker of less than 1 second that shows the Windows 11 taskbar, so far I have not found a solution to make the transition smooth totally black screen.