From 4ea4e730b3b1d2863d8a1195541a2d4e203bc9c1 Mon Sep 17 00:00:00 2001 From: jklawreszuk Date: Tue, 1 Jul 2025 11:53:48 +0200 Subject: [PATCH 1/4] [SDL] fix : SetIsReallyFullscreen is not setting real fullscreen state --- sources/engine/Stride.Games/GameWindow.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/engine/Stride.Games/GameWindow.cs b/sources/engine/Stride.Games/GameWindow.cs index 26a1b83937..f46c5940a0 100644 --- a/sources/engine/Stride.Games/GameWindow.cs +++ b/sources/engine/Stride.Games/GameWindow.cs @@ -212,7 +212,9 @@ public bool IsFullscreen /// internal void SetIsReallyFullscreen(bool isReallyFullscreen) { + #if !STRIDE_GRAPHICS_API_OPENGL && !STRIDE_GRAPHICS_API_VULKAN isFullscreen = isReallyFullscreen; + #endif } #endregion From 60d27aece60bdf3ee72e9e4db49400e7ef2e474c Mon Sep 17 00:00:00 2001 From: jklawreszuk Date: Wed, 2 Jul 2025 21:00:49 +0200 Subject: [PATCH 2/4] fixup! [SDL] fix : SetIsReallyFullscreen is not setting real fullscreen state --- sources/engine/Stride.Games/GameWindow.cs | 11 ----------- sources/engine/Stride.Games/GraphicsDeviceManager.cs | 4 ---- 2 files changed, 15 deletions(-) diff --git a/sources/engine/Stride.Games/GameWindow.cs b/sources/engine/Stride.Games/GameWindow.cs index f46c5940a0..ade7f93049 100644 --- a/sources/engine/Stride.Games/GameWindow.cs +++ b/sources/engine/Stride.Games/GameWindow.cs @@ -206,17 +206,6 @@ public bool IsFullscreen } } - /// - /// Allow the GraphicsDeviceManager to set the actual window state after applying the device changes. - /// - /// - internal void SetIsReallyFullscreen(bool isReallyFullscreen) - { - #if !STRIDE_GRAPHICS_API_OPENGL && !STRIDE_GRAPHICS_API_VULKAN - isFullscreen = isReallyFullscreen; - #endif - } - #endregion #region Public Methods and Operators diff --git a/sources/engine/Stride.Games/GraphicsDeviceManager.cs b/sources/engine/Stride.Games/GraphicsDeviceManager.cs index 86cfab0220..c8c5395bde 100644 --- a/sources/engine/Stride.Games/GraphicsDeviceManager.cs +++ b/sources/engine/Stride.Games/GraphicsDeviceManager.cs @@ -87,8 +87,6 @@ public class GraphicsDeviceManager : ComponentBase, IGraphicsDeviceManager, IGra private IGraphicsDeviceFactory graphicsDeviceFactory; - private bool isReallyFullScreen; - private ColorSpace preferredColorSpace; #endregion @@ -1074,7 +1072,6 @@ private void ChangeOrCreateDevice(bool forceCreate) } var presentationParameters = GraphicsDevice.Presenter.Description; - isReallyFullScreen = presentationParameters.IsFullScreen; if (presentationParameters.BackBufferWidth != 0) { width = presentationParameters.BackBufferWidth; @@ -1091,7 +1088,6 @@ private void ChangeOrCreateDevice(bool forceCreate) if (isBeginScreenDeviceChange) { game.Window.EndScreenDeviceChange(width, height); - game.Window.SetIsReallyFullscreen(isReallyFullScreen); } currentWindowOrientation = game.Window.CurrentOrientation; From 9e55d7b2b4004a26d0d40f6e2e7fc1126d76922a Mon Sep 17 00:00:00 2001 From: jklawreszuk Date: Sat, 5 Jul 2025 03:27:44 +0200 Subject: [PATCH 3/4] fixup! [SDL] fix : SetIsReallyFullscreen is not setting real fullscreen state --- sources/engine/Stride.Games/GameWindow.cs | 14 ++++++++++++++ .../engine/Stride.Games/GraphicsDeviceManager.cs | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/sources/engine/Stride.Games/GameWindow.cs b/sources/engine/Stride.Games/GameWindow.cs index ade7f93049..82aebdf629 100644 --- a/sources/engine/Stride.Games/GameWindow.cs +++ b/sources/engine/Stride.Games/GameWindow.cs @@ -206,6 +206,20 @@ public bool IsFullscreen } } +#if STRIDE_GRAPHICS_API_DIRECT3D + /// + /// Allow the GraphicsDeviceManager to set the actual window state after applying the device changes. + /// + /// + /// Applies only to the Direct3D graphics API + /// + /// + internal void SetIsReallyFullscreen(bool isReallyFullscreen) + { + isFullscreen = isReallyFullscreen; + } +#endif + #endregion #region Public Methods and Operators diff --git a/sources/engine/Stride.Games/GraphicsDeviceManager.cs b/sources/engine/Stride.Games/GraphicsDeviceManager.cs index c8c5395bde..8223c62f79 100644 --- a/sources/engine/Stride.Games/GraphicsDeviceManager.cs +++ b/sources/engine/Stride.Games/GraphicsDeviceManager.cs @@ -87,6 +87,10 @@ public class GraphicsDeviceManager : ComponentBase, IGraphicsDeviceManager, IGra private IGraphicsDeviceFactory graphicsDeviceFactory; +#if STRIDE_GRAPHICS_API_DIRECT3D + private bool isReallyFullScreen; +#endif + private ColorSpace preferredColorSpace; #endregion @@ -1072,6 +1076,9 @@ private void ChangeOrCreateDevice(bool forceCreate) } var presentationParameters = GraphicsDevice.Presenter.Description; +#if STRIDE_GRAPHICS_API_DIRECT3D + isReallyFullScreen = presentationParameters.IsFullScreen; +#endif if (presentationParameters.BackBufferWidth != 0) { width = presentationParameters.BackBufferWidth; @@ -1088,6 +1095,9 @@ private void ChangeOrCreateDevice(bool forceCreate) if (isBeginScreenDeviceChange) { game.Window.EndScreenDeviceChange(width, height); +#if STRIDE_GRAPHICS_API_DIRECT3D + game.Window.SetIsReallyFullscreen(isReallyFullScreen); +#endif } currentWindowOrientation = game.Window.CurrentOrientation; From 2167dfa0d3f6c573c4192379f095a70e08325ec7 Mon Sep 17 00:00:00 2001 From: jklawreszuk Date: Tue, 8 Jul 2025 12:56:28 +0200 Subject: [PATCH 4/4] fixup! [SDL] fix : SetIsReallyFullscreen is not setting real fullscreen state --- sources/engine/Stride.Games/GameWindow.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/sources/engine/Stride.Games/GameWindow.cs b/sources/engine/Stride.Games/GameWindow.cs index 82aebdf629..d12204233e 100644 --- a/sources/engine/Stride.Games/GameWindow.cs +++ b/sources/engine/Stride.Games/GameWindow.cs @@ -210,9 +210,6 @@ public bool IsFullscreen /// /// Allow the GraphicsDeviceManager to set the actual window state after applying the device changes. /// - /// - /// Applies only to the Direct3D graphics API - /// /// internal void SetIsReallyFullscreen(bool isReallyFullscreen) {