mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-29 18:06:52 +00:00
Added GameWindowFlags.FixedWindow to allow for fixed border SDL Windows
This commit is contained in:
parent
1419c1e3a0
commit
4414886832
|
@ -44,5 +44,10 @@ namespace OpenTK
|
||||||
/// Indicates that the GameWindow should cover the whole screen.
|
/// Indicates that the GameWindow should cover the whole screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Fullscreen = 1,
|
Fullscreen = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the GameWindow should be a fixed window.
|
||||||
|
/// </summary>
|
||||||
|
FixedWindow = 2,
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -77,7 +77,6 @@ namespace OpenTK.Platform.SDL2
|
||||||
var bounds = device.Bounds;
|
var bounds = device.Bounds;
|
||||||
var flags = TranslateFlags(options);
|
var flags = TranslateFlags(options);
|
||||||
flags |= WindowFlags.OPENGL;
|
flags |= WindowFlags.OPENGL;
|
||||||
flags |= WindowFlags.RESIZABLE;
|
|
||||||
flags |= WindowFlags.HIDDEN;
|
flags |= WindowFlags.HIDDEN;
|
||||||
if (Toolkit.Options.EnableHighResolution)
|
if (Toolkit.Options.EnableHighResolution)
|
||||||
{
|
{
|
||||||
|
@ -88,6 +87,9 @@ namespace OpenTK.Platform.SDL2
|
||||||
(flags & WindowFlags.FULLSCREEN) != 0)
|
(flags & WindowFlags.FULLSCREEN) != 0)
|
||||||
window_state = WindowState.Fullscreen;
|
window_state = WindowState.Fullscreen;
|
||||||
|
|
||||||
|
if ((flags & WindowFlags.RESIZABLE) == 0)
|
||||||
|
window_border = WindowBorder.Fixed;
|
||||||
|
|
||||||
IntPtr handle;
|
IntPtr handle;
|
||||||
lock (SDL.Sync)
|
lock (SDL.Sync)
|
||||||
{
|
{
|
||||||
|
@ -114,8 +116,11 @@ namespace OpenTK.Platform.SDL2
|
||||||
else
|
else
|
||||||
return WindowFlags.FULLSCREEN;
|
return WindowFlags.FULLSCREEN;
|
||||||
|
|
||||||
default:
|
case GameWindowFlags.FixedWindow:
|
||||||
return WindowFlags.Default;
|
return WindowFlags.Default;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return WindowFlags.Default | WindowFlags.RESIZABLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue