Magpie can't always detect the game window is in foreground
Magpie version 程序版本
0.10.1
Windows version 系统版本
Windows 10 22H2
Related screenshot (optional) 相关截图(可选)
https://user-images.githubusercontent.com/25622653/229816615-72980c1b-db03-410a-8a7f-5ae6d6bc039d.mp4
Reproduction steps 复现步骤
- Add a Magpie profile for a game
- Enable "Auto scale when in foreground"
- Scale the game with Magpie
- Use Windows+D (or Alt+Tab and bring another window to the foreground) to disable the scaling of the game window
- Bring the game window back to the foreground by clicking its icon on the taskbar (or by using Alt+Tab again)
The game window will not be scaled by Magpie (seemingly randomly). You might need to re-try the 4th and 5th steps many times before reproducing the issue because it happens quite randomly. It randomly happened with nearly every game I've tried Magpie with. "Capture method" doesn't seem to matter either, I can reproduce the issue with all the capture methods. I also don't think Magpie is producing any logs when it fails to detect that the game is in the foreground.
Log files 日志文件
Does v0.10.0 have this issue?
Yes.
Is there still an issue if you don't minimize the window (i.e., only use Alt+Tab)?
I think I was able to reproduce the issue with Alt+Tab as well. To make sure I can try it out again when I am home.
Reproducing it with Alt+Tab was significantly harder.
https://user-images.githubusercontent.com/25622653/230449822-448e0353-0290-4688-b063-f19f5579127c.mp4