Game issues when switching window between fullscreen and windowed mode #932
Labels
area-Graphics
bug
Something isn't working
priority-high
High priority needs to be fixed or done in release
work-estimate-S
Good for first timers. A relatively quick item to fix, Max of 2x of XS
Official Release
Version: Stride 4.0.0.1 beta04 1317
Platform(s): Windows
Describe the bug
There are multiple issues when it comes to trying to switch screen using winforms as the window renderer. Switching from windowed mode to fullscreen mode using the method game.Windows.IsFullscreen = bool will work 99.9% of the time, very occassionally ending with a NullReference in Stride.Graphics.SwapChainGraphicsPresenter.OnDestroyed();
When trying to go from fullscreen to windowed mode the system destroys the window, but seemingly a new one is not created, and the game continues to run as a background process, having to be killed in task manager. game.Windows.IsFullscreen as a swap method respects the PreferredFullscreenSize & PreferredWindowedSize values set earlier in the code.
Using game.GraphicsDeviceManager.IsFullScreen as the method to change also only works going from a windowed screen to fullscreen, although this method just seems to make the current resolution fullscreen and does not respect PreferredFullscreenSize settings.
To Reproduce
The following code is where I experience the error:
Expected behavior
The window to switch between fullscreen and windowed mode as apprpriate and for PreferredFullscreenSize & PreferredWindowedSize values to be respected.
Screenshots
Here is a link to a video showing the window not coming back up after switching from fullscreen to windowed mode.
https://youtu.be/5klndyDkLX8
The text was updated successfully, but these errors were encountered: