fix: Only do function patches if the plugin had to to update init Inkay

This commit is contained in:
Maschell 2025-02-03 12:44:29 +01:00
parent cc3fac1cc7
commit 24f680c6fb
3 changed files with 10 additions and 5 deletions

View File

@ -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;

View File

@ -10,6 +10,8 @@
class Config {
public:
static bool internal_init_done;
static bool connect_to_network;
static bool initialized;

View File

@ -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.");