refactor: Enable unreachable cleanup logic in main()
> refactor `main_implemntation()` cleanup to run once on `launcher::shutdown()`, not sure why it was defined like that (unreachable code, at least for iidx) > not thread safe, but probably not needed (no obvious failures as well) > related to #1
This commit is contained in:
@@ -2067,9 +2067,8 @@ int main_implementation(int argc, char *argv[]) {
|
||||
game->post_attach();
|
||||
}
|
||||
|
||||
// game start
|
||||
log_info("launcher", "calling game entry");
|
||||
avs::game::entry_main();
|
||||
// cleanup procedure
|
||||
launcher::on_shutdown = [&]() {
|
||||
|
||||
// clear presence
|
||||
richpresence::shutdown();
|
||||
@@ -2158,6 +2157,11 @@ int main_implementation(int argc, char *argv[]) {
|
||||
#ifdef SPICE64
|
||||
games::iidx::camera_release();
|
||||
#endif
|
||||
};
|
||||
|
||||
// game start
|
||||
log_info("launcher", "calling game entry");
|
||||
avs::game::entry_main();
|
||||
|
||||
// shutdown
|
||||
log_warning("launcher", "end");
|
||||
|
||||
Reference in New Issue
Block a user