Skip to content
Permalink
Browse files

Make switching to fullscreen faster and fix exiting fullscreen not re…

…storing maximised
  • Loading branch information...
UnknownShadow200 committed Jun 10, 2019
1 parent 0ed3197 commit 814b224aa9ea41e1542ec14ac0316149e4ce9d17
Showing with 96 additions and 307 deletions.
  1. +5 −3 src/InputHandler.c
  2. +87 −299 src/Window.c
  3. +4 −5 src/Window.h
@@ -191,9 +191,11 @@ static bool InputHandler_HandleCoreKey(Key key) {
Gui_ShowFPS = !Gui_ShowFPS;
} else if (key == KeyBinds[KEYBIND_FULLSCREEN]) {
int state = Window_GetWindowState();
if (state != WINDOW_STATE_MINIMISED) {
bool fullscreen = state == WINDOW_STATE_FULLSCREEN;
Window_SetWindowState(fullscreen ? WINDOW_STATE_NORMAL : WINDOW_STATE_FULLSCREEN);

if (state == WINDOW_STATE_FULLSCREEN) {
Window_ExitFullscreen();
} else if (state != WINDOW_STATE_MINIMISED) {
Window_EnterFullscreen();
}
} else if (key == KeyBinds[KEYBIND_FOG]) {
short* viewDists = Gui_ClassicMenu ? classicViewDists : normViewDists;

0 comments on commit 814b224

Please sign in to comment.
You can’t perform that action at this time.