(svn r18546) -Codechange: make making the screenshot not asynchronious; just do it at the moment it's requested.

This commit is contained in:
rubidium
2009-12-19 19:21:37 +00:00
parent 29d6491605
commit a6146f5f51
6 changed files with 38 additions and 45 deletions

View File

@@ -768,17 +768,6 @@ void HandleExitGameRequest()
}
}
static void ShowScreenshotResult(bool b)
{
if (b) {
SetDParamStr(0, _screenshot_name);
ShowErrorMessage(STR_MESSAGE_SCREENSHOT_SUCCESSFULLY, INVALID_STRING_ID, 0, 0);
} else {
ShowErrorMessage(STR_ERROR_SCREENSHOT_FAILED, INVALID_STRING_ID, 0, 0);
}
}
static void MakeNewGameDone()
{
SettingsDisableElrail(_settings_game.vehicle.disable_elrails);
@@ -1239,9 +1228,6 @@ void GameLoop()
RedrawAutosave();
}
/* make a screenshot? */
if (IsScreenshotRequested()) ShowScreenshotResult(MakeScreenshot());
/* switch game mode? */
if (_switch_mode != SM_NONE) {
SwitchToMode(_switch_mode);