diff --git a/src/config.cpp b/src/config.cpp index 06e1a8f..5fdb3f0 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -17,6 +17,7 @@ #include "config.h" +bool Config::internal_init_done = false; bool Config::connect_to_network = false; bool Config::initialized = false; bool Config::shown_uninitialized_warning = false; diff --git a/src/config.h b/src/config.h index 0d4da6b..6e82ff7 100644 --- a/src/config.h +++ b/src/config.h @@ -10,6 +10,8 @@ class Config { public: + static bool internal_init_done; + static bool connect_to_network; static bool initialized; diff --git a/src/main.cpp b/src/main.cpp index 502aab8..0c189be 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -200,14 +200,16 @@ WUMS_APPLICATION_STARTS() { // Reset plugin loaded flag Config::plugin_is_loaded = false; - - setup_olv_libs(); - peertopeer_patch(); - matchmaking_notify_titleswitch(); - hotpatchAccountSettings(); } WUMS_ALL_APPLICATION_STARTS_DONE() { + if (!Config::internal_init_done) { + setup_olv_libs(); + peertopeer_patch(); + matchmaking_notify_titleswitch(); + hotpatchAccountSettings(); + Config::internal_init_done = true; + } if (Config::initialized && !Config::plugin_is_loaded) { DEBUG_FUNCTION_LINE("Inkay is running but the plugin got unloaded"); ShowNotification("Inkay module is still running. Please restart the console to disable Pretendo.");