mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r297) Fix (SDL): Added a confirmation dialog when quitting the game
This commit is contained in:
parent
6cad1071c8
commit
a38e2d046a
5
sdl.c
5
sdl.c
@ -468,7 +468,12 @@ static int PollEvent() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
|
// do not ask to quit on the main screen
|
||||||
|
if(_game_mode != GM_MENU)
|
||||||
|
AskExitGame();
|
||||||
|
else
|
||||||
return ML_QUIT;
|
return ML_QUIT;
|
||||||
|
break;
|
||||||
|
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
if ((((ev.key.keysym.sym == SDLK_RETURN) || (ev.key.keysym.sym == SDLK_f)) && (ev.key.keysym.mod & KMOD_ALT)) || (((ev.key.keysym.sym == SDLK_RETURN) || (ev.key.keysym.sym == SDLK_f)) && (ev.key.keysym.mod & KMOD_META))) {
|
if ((((ev.key.keysym.sym == SDLK_RETURN) || (ev.key.keysym.sym == SDLK_f)) && (ev.key.keysym.mod & KMOD_ALT)) || (((ev.key.keysym.sym == SDLK_RETURN) || (ev.key.keysym.sym == SDLK_f)) && (ev.key.keysym.mod & KMOD_META))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user