@@ -347,17 +347,17 @@ static int PollEvent(void)
case SDL_QUIT:
// do not ask to quit on the main screen
if (_game_mode != GM_MENU) {
if(_patches.autosave_on_exit) {
DoExitSave();
return ML_QUIT;
return 0;
} else
AskExitGame();
break;
case SDL_KEYDOWN: /* Toggle full-screen on ALT + ENTER/F */
if ((ev.key.keysym.mod & (KMOD_ALT | KMOD_META)) &&
(ev.key.keysym.sym == SDLK_RETURN || ev.key.keysym.sym == SDLK_f)) {
ToggleFullScreen(!_fullscreen);
@@ -397,13 +397,13 @@ static const char *SdlVideoStart(const c
static void SdlVideoStop(void)
{
SdlClose(SDL_INIT_VIDEO);
}
static int SdlVideoMainLoop(void)
static void SdlVideoMainLoop(void)
uint32 next_tick = SDL_CALL SDL_GetTicks() + 30;
uint32 cur_ticks;
uint32 pal_tick = 0;
int i;
uint32 mod;
@@ -411,15 +411,15 @@ static int SdlVideoMainLoop(void)
Uint8 *keys;
for (;;) {
InteractiveRandom(); // randomness
while ((i = PollEvent()) == -1) {}
if (i >= 0) return i;
if (i >= 0) return;
if (_exit_game) return ML_QUIT;
if (_exit_game) return;
mod = SDL_CALL SDL_GetModState();
keys = SDL_CALL SDL_GetKeyState(&numkeys);
#if defined(_DEBUG)
if (_shift_pressed)
#else