Toggle fullscreen mode with F11 or Alt+Enter.

This commit is contained in:
Guus Sliepen 2011-09-05 22:13:11 +02:00
parent 7a59631189
commit 2c64485272
1 changed files with 7 additions and 0 deletions

View File

@ -342,6 +342,13 @@ void getPlayerInput()
default: default:
break; break;
} }
if ((engine.keyState[SDLK_F11]) || ((engine.keyState[SDLK_RETURN]) && (engine.keyState[SDLK_LALT])))
{
SDL_WM_ToggleFullScreen(screen);
engine.fullScreen = !engine.fullScreen;
engine.keyState[SDLK_F11] = engine.keyState[SDLK_LALT] = engine.keyState[SDLK_RETURN] = 0;
}
} }
} }