mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-20 19:38:24 +00:00
Merge branch 'develop' of git://github.com/Goz3rr/opentk into pr/122
This commit is contained in:
commit
d6426f20bd
|
@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -112,6 +112,11 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
WindowState = WindowState.Fullscreen;
|
WindowState = WindowState.Fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((options & GameWindowFlags.FixedWindow) != 0)
|
||||||
|
{
|
||||||
|
WindowBorder = WindowBorder.Fixed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -106,17 +108,20 @@ namespace OpenTK.Platform.SDL2
|
||||||
|
|
||||||
static WindowFlags TranslateFlags(GameWindowFlags flags)
|
static WindowFlags TranslateFlags(GameWindowFlags flags)
|
||||||
{
|
{
|
||||||
switch (flags)
|
WindowFlags windowFlags = WindowFlags.Default;
|
||||||
{
|
|
||||||
case GameWindowFlags.Fullscreen:
|
|
||||||
if (Sdl2Factory.UseFullscreenDesktop)
|
|
||||||
return WindowFlags.FULLSCREEN_DESKTOP;
|
|
||||||
else
|
|
||||||
return WindowFlags.FULLSCREEN;
|
|
||||||
|
|
||||||
default:
|
if ((flags & GameWindowFlags.Fullscreen) != 0)
|
||||||
return WindowFlags.Default;
|
{
|
||||||
|
if (Sdl2Factory.UseFullscreenDesktop)
|
||||||
|
windowFlags |= WindowFlags.FULLSCREEN_DESKTOP;
|
||||||
|
else
|
||||||
|
windowFlags |= WindowFlags.FULLSCREEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((flags & GameWindowFlags.FixedWindow) == 0)
|
||||||
|
windowFlags |= WindowFlags.RESIZABLE;
|
||||||
|
|
||||||
|
return windowFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Key TranslateKey(Scancode scan)
|
static Key TranslateKey(Scancode scan)
|
||||||
|
|
Loading…
Reference in a new issue