HandheldCompanion
HandheldCompanion copied to clipboard
Support QuickTools overlays for Fullscreen games/apps
Desired for various games that don't have an exclusive fullscreen or windowed maximized option. Also, certain upscalers like RSR and Lossless Scaling make using QuickTools challenging.
Found various suggestions on Stack overflow: https://stackoverflow.com/questions/71216582/wpf-how-do-you-show-window-over-fullscreen-apps https://web.archive.org/web/20130308081547/http://blogs.microsoft.co.il/blogs/pavely/archive/2012/05/16/windows-8-topmost-vs-topmost.aspx https://stackoverflow.com/questions/17228325/display-window-over-full-screen-application
This one seems to be the most worthwhile: https://stackoverflow.com/questions/66512492/c-sharp-wpf-overlay-for-fullscreen-applications
Other people have also tried (and failed): https://stackoverflow.com/questions/18601804/wpf-topmost-option-makes-fullscreen-app-to-escape
From the stackoverflow link, Mark Feldman mentiones he uses the following approach in production with good results:
If you want it to appear over all windows then use this WindowSinker class which intercepts the WM_SETFOCUS message for your window and calls SetWindowPos to set the HWND_TOPMOST flag.
New PR using the WindowSinker approach. #641.
Testing indicates that most games won't minimize, but we don't have focus on the QuickTools window. Interacting with the QuickTools menu will minimize the game because focus is lost. Maybe we can detect controller presses independently and pass them to the QuickTools menu to avoid losing focus on the game.
Some games (such as Elden Ring) will continue to minimize because it's using exclusive fullscreen. We might not be able to fix this with this approch and/or by using WPF windows. A different technology might be required such as Metro Apps or driver overlays.
I've found Windows Power Tools's Always On Top feature. Not tested myself, but found this issue report stating it has trouble with fullscreen games and proposes a similar work around as we are familiar with:
https://github.com/microsoft/PowerToys/issues/21533
Another app WindowTop, with similar functionality has a similar bug report:
https://github.com/WindowTop/WindowTop-App/discussions/114
Another thread on SO (quite old), here people mostly mention doing things with the 3D engine. Sounds challenging, perhaps contact the person who mentions he did it with WPF?
https://stackoverflow.com/questions/925981/overlaying-on-a-3d-fullscreen-application
Could we turn the problem upside down, instead of figuring out a way to overlay a fullscreen game, can we somehow force the games to be windowed maximized or fullscreen borderless?
Could we turn the problem upside down, instead of figuring out a way to overlay a fullscreen game, can we somehow force the games to be windowed maximized or fullscreen borderless?
This is not a bad idea. We can definitively add that on top of what was already done (which is probably the best we can do in WPF).
See updated PR. Needs testing. #680
Found this interesting technical read: https://fredemmott.com/blog/2022/05/31/in-game-overlays.html
Googled for the terms: directx wrapper api draw overlay
Also: https://github.com/MarcellVokk/DamnOverSharp https://github.com/hiitiger/goverlay
ahy updates ? #680 seemes merged, but the overlay and quickacces menu doest show in front of xcloud game session.
@Jordan-TE the PR you mention was simply an improvement on top of the current situation, but not a one size fits all solution.
At the moment we are at the end of the current teams technical know how or the technology HC is using (or both), so nothing will change for the foreseeable future.
Any help here would be greatly appreciated.
Could we turn the problem upside down, instead of figuring out a way to overlay a fullscreen game, can we somehow force the games to be windowed maximized or fullscreen borderless?
This is not a bad idea. We can definitively add that on top of what was already done (which is probably the best we can do in WPF).
See updated PR. Needs testing. #680
Hey y'all.
0 programming knowledge here, so no idea how difficult this would be.
But, while playing a game that only has windowed and exclusive full screen, playing it in full screen kept screwing up my hdr, and playing in a window is obnoxious.
I tried https://westechsolutions.net/sites/WindowedBorderlessGaming/download and it actually worked pretty well ( aside from some scaling bugs based off of windows application scaling percent)
Maybe something like this could be implemented with a toggle that says " scale windowed game to screen size" in the same area as the GPU scaling options? This would be another workaround/hack instead of a true solution.
( On a related note, maybe an advanced options checkbox in the main application would be necessary if you start adding more things like this. Would stop people from messing with things they aren't knowledgeable about, and also any worries about feature creep/clutter)
The other thing I'm wondering, is how the Steam Deck handles windows games, because no matter if it's windowed, borderless, or exclusive, they all fill the screen just fine.
We're very much aware of such apps, etc.
To implementing something like Borderless Gaming is not easy at all. We can't just "implement" it or hook into the app, as there's no entry point.
As for Steam Deck, thats a very special case. Games run in a container through gamescope. It's a very complicated thing too and Linux only.