SFML community forums
Help => Window => Topic started by: junglie85 on May 02, 2022, 06:35:45 pm
-
I'm struggling to understand what is going on with the fullscreen behaviour on macOS. When I click the fullscreen button on the titlebar, the RenderWindow appears to scale (this is the behaviour I want in this instance). However, when I set the window style to fullscreen, the scale does not change.
Have I understood this default behaviour correctly?
I don't really know what components are interacting and how in the fullscreen button case to replicate the behaviour. How do I configure the SFML window to use the same behaviour for both the OS fullscreen button and when setting the fullscreen style?
-
The missing thing is that the view is created to match the original window size, but doesn't automatically adjust when changing the window size.
So in the first instance, the view remains the same, but the window size changes. And in the second instance, you're creating a window with a matching view to start with.
See this tutorial for more information: https://www.sfml-dev.org/tutorials/2.5/graphics-view.php#showing-more-when-the-window-is-resized
-
Ah, perfect, thank you. I shall dig into that. The jigsaw pieces are coming together!