FullScreen Switching from within the game by Pressing F8

origin
stpohle 22 years ago
parent a4becfdf88
commit 19d3603c55

@ -1,4 +1,4 @@
/* $Id: game.c,v 1.55 2003/09/16 20:04:05 stpohle Exp $ /* $Id: game.c,v 1.56 2003/09/16 22:20:03 stpohle Exp $
game.c - procedures for the game. */ game.c - procedures for the game. */
#include <string.h> #include <string.h>
@ -470,6 +470,13 @@ void game_showresult () {
bman.state = GS_running; bman.state = GS_running;
} }
if (keys[SDLK_F8] && event.type == SDL_KEYDOWN) {
/* Switch Fullscreen */
SDL_WM_ToggleFullScreen(gfx.screen);
gfx.fullscreen = !gfx.fullscreen;
bman.updatestatusbar = 1; // force an update
}
if (event.type == SDL_KEYUP) if (event.type == SDL_KEYUP)
keypressed = 0; keypressed = 0;
else if (event.type == SDL_KEYDOWN) else if (event.type == SDL_KEYDOWN)

@ -315,6 +315,13 @@ wait_for_players ()
bman.state = GS_startup; bman.state = GS_startup;
} }
if (keys[SDLK_F8] && event.type == SDL_KEYDOWN) {
/* Switch Fullscreen */
SDL_WM_ToggleFullScreen(gfx.screen);
gfx.fullscreen = !gfx.fullscreen;
bman.updatestatusbar = 1; // force an update
}
if (bman.p_nr != -1) { if (bman.p_nr != -1) {
if (keys[SDLK_LEFT] && (!keypressed) && bman.players[bman.p_nr].gfx_nr == -1) { if (keys[SDLK_LEFT] && (!keypressed) && bman.players[bman.p_nr].gfx_nr == -1) {

Loading…
Cancel
Save