mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 03:45:31 +00:00
Changed TranslateFlags to actually translate flags instead of using switch
This commit is contained in:
parent
4414886832
commit
399e08ee33
|
@ -108,20 +108,20 @@ namespace OpenTK.Platform.SDL2
|
|||
|
||||
static WindowFlags TranslateFlags(GameWindowFlags flags)
|
||||
{
|
||||
switch (flags)
|
||||
WindowFlags windowFlags = WindowFlags.Default;
|
||||
|
||||
if ((flags & GameWindowFlags.Fullscreen) != 0)
|
||||
{
|
||||
case GameWindowFlags.Fullscreen:
|
||||
if (Sdl2Factory.UseFullscreenDesktop)
|
||||
return WindowFlags.FULLSCREEN_DESKTOP;
|
||||
windowFlags |= WindowFlags.FULLSCREEN_DESKTOP;
|
||||
else
|
||||
return WindowFlags.FULLSCREEN;
|
||||
|
||||
case GameWindowFlags.FixedWindow:
|
||||
return WindowFlags.Default;
|
||||
|
||||
default:
|
||||
return WindowFlags.Default | WindowFlags.RESIZABLE;
|
||||
windowFlags |= WindowFlags.FULLSCREEN;
|
||||
}
|
||||
|
||||
if ((flags & GameWindowFlags.FixedWindow) == 0)
|
||||
windowFlags |= WindowFlags.RESIZABLE;
|
||||
|
||||
return windowFlags;
|
||||
}
|
||||
|
||||
static Key TranslateKey(Scancode scan)
|
||||
|
|
Loading…
Reference in a new issue