Skip to content

Commit

Permalink
autosave on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
tritonas00 authored and Petr Ohlídal committed Jan 30, 2021
1 parent 6aafe42 commit 00a4f5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ int main(int argc, char *argv[])
// -- Application events --

case MSG_APP_SHUTDOWN_REQUESTED:
if (App::app_state->GetEnum<AppState>() == AppState::SIMULATION)
{
App::GetGameContext()->SaveScene("autosave.sav");
}
App::GetConsole()->SaveConfig(); // RoR.cfg
App::GetDiscordRpc()->Shutdown();
#ifdef USE_SOCKETW
Expand Down

0 comments on commit 00a4f5d

Please sign in to comment.