Printscreen not working in fullscreen

Started by WiseFrog, Tue 05/04/2022 06:45:44

Previous topic - Next topic

WiseFrog

I know that the problem I'm going to talk about is not about skipping the dialog, but it is related to the print screen button so I don't think I have to create another post to talk about this.
I have this problem (don't know if it's just me or everyone) from the old versions of ags to the current one (3.6.0), so I guess it's not fixed. The problem is that if you use the print screen button with the game windowed, the screenshot is taken fine, you can paste it in paint/photoshop for example and everything is fine, but if you take the screenshot with the game in full screen and then paste the screenshot in any image editing program you will get a black image (in the current version it will be a black image with a white rectangle). Usually when you use the print screen button in full screen games you will get the actual image. I know you can use the ags built-in feature that saves a screenshot as an image in a folder, but sometimes people want to take a quick screenshot and paste it wherever they want. So this is an AGS problem or just me? Does this have a solution?

eri0o

Which Fullscreen you are using? Borderless windowed Fullscreen or the exclusive Fullscreen?

Crimson Wizard

Note that borderless fullscreen is only available since 3.6.0.

It's also useful to know which graphic renderer does this happen with (Direct3D, OpenGL, Software, all).


WiseFrog

Quote from: eri0o on Tue 05/04/2022 12:03:54
Which Fullscreen you are using? Borderless windowed Fullscreen or the exclusive Fullscreen?

This problem is only with exclusive fullscreen.

Quote from: Crimson Wizard on Tue 05/04/2022 12:20:41
It's also useful to know which graphic renderer does this happen with (Direct3D, OpenGL, Software, all).


I will post below screenshots of the problem with the different graphic render modes.

Test with AGS 3.5.1:

With Direct3D 9 I get a screenshot of the window below the game (in this case google chrome) and a white rectangle in the left corner (that is the game window i guess).

Spoiler
[close]

With OpenGL I get a similar problem but the screenshot only show my desk (ignore the apps and programs hahaha) and the white rectangle in the left corner again.

Spoiler
[close]

And finally with software renderer I get the proper screenshot of the game
Spoiler
[close]

Test with AGS 3.6.0

With Direct 3D 9 you will get a screenshot of the window below the game (google chrome in my case), but the difference with 3.5.1 it's that this time there is no white rectangle, it's like a normal screenshot of my pc (the google chrome window, so I will not post the image).

With OpenGL it's the same result as Direct3D

And software renderer in this version it's different, you will not get the proper game screenshot, instead you will get the same as above (a normal screenshot of the desk).

If you use the new borderless window fullscreen you will get the proper game screenshot if you use direct3d or software renderer (so it's a way to fix this problem I guess), but if you use opengl you will get the desk screenshot like the above tests)

All of this tests was made with a game template and with the exe file generated, changing the configurations with the game setup.

But there is something more strange, If I run the game I working on (without any build) I will get a black screenshot with a white window on it.

Spoiler
[close]

This is very weird and strange (specially the last one).

Doing this tests I found that the "solution" will be using the borderless window fullscreen with direct 3d or software renderer.

I hope this can have a solution or maybe can help to find the problem that is causing this.

eri0o

#4
About the software renderer in the latest AGS there's an additional config to select how the final write to the screen is done, and I think one of the options also is software, but since this would be slow the default tends to pickup DirectX or opengl.

I would say for now to avoid exclusive fullscreen and use borderless windowed in fullscreen if possible since the problem doesn't happen there - make this your default Fullscreen instead of the other Fullscreen.

Now guessing around a bit, about the observed behavior, there's a chance that there's no free solution (in performance), because if you can see something but cannot do a print screen, it could be it goes into the video card, but there's no additional bitmap coming from the videocard back or something similar, so forcing this would than have a cost.

It all depends how this works behind the scenes, if it would be acceptable to intercept the print screen button and override it's behavior to copy the video to the clipboard, then incurring any rasterization cost only when needed. But the observed behavior would be that a printscreen with AGS in Fullscreen picks up only the monitor running AGS.

Edit: on a second thought, I think we need to first see if this happens with a newer SDL2 version, and possibly this looks something that could be worked out in upstream in SDL2 itself.

SMF spam blocked by CleanTalk