MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / SDL_AppQuit

Function SDL_AppQuit

src/main.cpp:881–901  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
881void 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}

Callers

nothing calls this directly

Calls 5

sdl_terminateFunction · 0.85
save_configMethod · 0.80
logMethod · 0.80
getFunction · 0.50
early_destroyMethod · 0.45

Tested by

no test coverage detected