diff --git a/sources/engine/Stride.Games/GameWindow.cs b/sources/engine/Stride.Games/GameWindow.cs index 26a1b83937..d12204233e 100644 --- a/sources/engine/Stride.Games/GameWindow.cs +++ b/sources/engine/Stride.Games/GameWindow.cs @@ -206,6 +206,7 @@ public bool IsFullscreen } } +#if STRIDE_GRAPHICS_API_DIRECT3D /// /// Allow the GraphicsDeviceManager to set the actual window state after applying the device changes. /// @@ -214,6 +215,7 @@ internal void SetIsReallyFullscreen(bool isReallyFullscreen) { isFullscreen = isReallyFullscreen; } +#endif #endregion diff --git a/sources/engine/Stride.Games/GraphicsDeviceManager.cs b/sources/engine/Stride.Games/GraphicsDeviceManager.cs index 86cfab0220..8223c62f79 100644 --- a/sources/engine/Stride.Games/GraphicsDeviceManager.cs +++ b/sources/engine/Stride.Games/GraphicsDeviceManager.cs @@ -87,7 +87,9 @@ public class GraphicsDeviceManager : ComponentBase, IGraphicsDeviceManager, IGra private IGraphicsDeviceFactory graphicsDeviceFactory; +#if STRIDE_GRAPHICS_API_DIRECT3D private bool isReallyFullScreen; +#endif private ColorSpace preferredColorSpace; @@ -1074,7 +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; @@ -1091,7 +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;