SFML community forums

Help => Window => Topic started by: mkalex777 on October 24, 2015, 01:26:57 am

Title: strange issue with fullscreen mode
Post by: mkalex777 on October 24, 2015, 01:26:57 am
I found a strange issue which happens in fullscreen mode only.
When I'm trying to get a screenshot with Print Screen key in fullscreen mode, I get an image which were actually shown some time ago, but not at the moment of taking screenshot.
With windowed mode all works as expected.
I reproduced it on Windows 7 x64.
Why it happens?
Title: Re: strange issue with fullscreen mode
Post by: Brax on October 24, 2015, 02:04:36 am
By pressing the Print Screen key, you request to send the data to the clipboard, but SFML does not have clipboard support, at least not yet. (http://en.sfml-dev.org/forums/index.php?topic=16462.0) Hence it will only send the data to the clipboard that was at the start of program, or more precise, when window was opened.
(Or at least I think it works that way ;D, a more experienced SFML user would answer that better than me. )

It is still possible to capture the screenshot from the window by using window.capture() function and then saving it to a file.

Also while we are at it, the SFML does not recognize the Print Screen key either, so if that bothers you, you should check this topic (http://en.sfml-dev.org/forums/index.php?topic=18657.0) too. :)

Title: Re: strange issue with fullscreen mode
Post by: mkalex777 on October 24, 2015, 03:32:30 am
Yes, it works as you described. In fullscreen mode it takes screenshot of the first frame rendered at the moment of call SetVisible(true) for fullscreen window