NOTE: On Android, SDL_AppQuit is triggered by onDestroy. onDestroy may or may not be called, and even if it is, it may only be partially called. You should not rely on it.
| 879 | |
| 880 | // NOTE: On Android, SDL_AppQuit is triggered by onDestroy. onDestroy may or may not be called, and even if it is, it may only be partially called. You should not rely on it. |
| 881 | void SDL_AppQuit(void *appstate, SDL_AppResult result) { |
| 882 | #ifndef __ANDROID__ |
| 883 | DrawingProgramCache::delete_all_draw_cache(); |
| 884 | |
| 885 | MainStruct& mS = *((MainStruct*)appstate); |
| 886 | try { |
| 887 | mS.m->save_config(); |
| 888 | mS.m->early_destroy(); |
| 889 | sdl_terminate(mS); |
| 890 | } |
| 891 | catch(const std::exception& e) { |
| 892 | Logger::get().log(Logger::LogType::FATAL, e.what()); |
| 893 | } |
| 894 | |
| 895 | delete (&mS); |
| 896 | |
| 897 | SDL_Quit(); |
| 898 | |
| 899 | FileDownloader::cleanup(); |
| 900 | #endif |
| 901 | } |
nothing calls this directly
no test coverage detected