interpreter
interpreter copied to clipboard
Unable to capture hardware accelerated windows
Using this image as a test, the program fails to recognise any of the text in the browser.
I checked what the screenshot comes out as, and it's a completely black image. The dimensions seem correct though.
OS Build is 22622.290 (22H2).
Edit: In mpv, the screenshots actually show something but they don't capture the window correctly. It instead shows my browser and a part of Windows Terminal that were beneath the window. It's extra weird since the tab that's showing was closed when the screenshot was taken, and I had also closed Terminal as well. At least the text recognition is working.
Edit 2: The screenshot appears to take what was underneath the window the moment the target program was opened, but it doesn't update what's displayed on the windows underneath, which explains my situation above. But sometimes it does take a correct screenshot, but it still doesn't show the updated window. Idk, I have no experience with Win32 APIs so my fiddling around hasn't really accomplished much.
Ok thanks for the feedback. I haven't tested on windows 11 and it shows :) I'll look into it
I'll add a debug flag to save the screenshots in order to see what's been captured. @ASleepyCat if you're capturing your browser, did you try disabling the hardware acceleration? It might help even though it's not a fix
@ASleepyCat I've added a debug mode. You can check the README for instructions.
In Chrome Canary, disabling hardware acceleration makes the screenshots function correctly (and I assume it works the same in Edge).
I will have to look into it. I've seen that there are other ways to capture screenshots on windows.
The issues comes from the capture library so I've opened an issue there https://github.com/bquenin/captured/issues/2