forked from stride3d/stride
-
Notifications
You must be signed in to change notification settings - Fork 0
Fullscreen workaround
Jakub Ławreszuk edited this page Nov 17, 2024
·
1 revision
Following code allows to resize correctly window (OPENGL):
if (Input.Keyboard.IsKeyDown(Keys.F))
{
if (Game.Window.IsFullscreen)
{
Game.Window.Visible = false;
Game.Window.IsFullscreen = false;
Game.Window.Visible = true;
Game.Window.Position = new Int2(0, 0);
Game.Window.SetSize(new Int2(1280, 720));
}
else
{
Game.Window.SetSize(new Int2(1920, 1080));
Game.Window.PreferredFullscreenSize = new Int2(1920, 1080);
Game.Window.IsFullscreen = true;
}
}