Skip to content

Commit

Permalink
Changed TranslateFlags to actually translate flags instead of using s…
Browse files Browse the repository at this point in the history
…witch
  • Loading branch information
Goz3rr committed May 15, 2014
1 parent 4414886 commit 399e08e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,20 @@ public Sdl2NativeWindow(int x, int y, int width, int height,

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;
else
return WindowFlags.FULLSCREEN;
if (Sdl2Factory.UseFullscreenDesktop)
windowFlags |= WindowFlags.FULLSCREEN_DESKTOP;
else
windowFlags |= WindowFlags.FULLSCREEN;
}

case GameWindowFlags.FixedWindow:
return WindowFlags.Default;
if ((flags & GameWindowFlags.FixedWindow) == 0)
windowFlags |= WindowFlags.RESIZABLE;

default:
return WindowFlags.Default | WindowFlags.RESIZABLE;
}
return windowFlags;
}

static Key TranslateKey(Scancode scan)
Expand Down

0 comments on commit 399e08e

Please sign in to comment.