Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sources/engine/Stride.Games/GameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public bool IsFullscreen
}
}

#if STRIDE_GRAPHICS_API_DIRECT3D
/// <summary>
/// Allow the GraphicsDeviceManager to set the actual window state after applying the device changes.
/// </summary>
Expand All @@ -214,6 +215,7 @@ internal void SetIsReallyFullscreen(bool isReallyFullscreen)
{
isFullscreen = isReallyFullscreen;
}
#endif

#endregion

Expand Down
6 changes: 6 additions & 0 deletions sources/engine/Stride.Games/GraphicsDeviceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading