forked from PretendoNetwork/Inkay
fix: Only do function patches if the plugin had to to update init Inkay
This commit is contained in:
parent
cc3fac1cc7
commit
24f680c6fb
3 changed files with 10 additions and 5 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
bool Config::internal_init_done = false;
|
||||||
bool Config::connect_to_network = false;
|
bool Config::connect_to_network = false;
|
||||||
bool Config::initialized = false;
|
bool Config::initialized = false;
|
||||||
bool Config::shown_uninitialized_warning = false;
|
bool Config::shown_uninitialized_warning = false;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
public:
|
public:
|
||||||
|
static bool internal_init_done;
|
||||||
|
|
||||||
static bool connect_to_network;
|
static bool connect_to_network;
|
||||||
|
|
||||||
static bool initialized;
|
static bool initialized;
|
||||||
|
|
|
||||||
12
src/main.cpp
12
src/main.cpp
|
|
@ -200,14 +200,16 @@ WUMS_APPLICATION_STARTS() {
|
||||||
|
|
||||||
// Reset plugin loaded flag
|
// Reset plugin loaded flag
|
||||||
Config::plugin_is_loaded = false;
|
Config::plugin_is_loaded = false;
|
||||||
|
|
||||||
setup_olv_libs();
|
|
||||||
peertopeer_patch();
|
|
||||||
matchmaking_notify_titleswitch();
|
|
||||||
hotpatchAccountSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WUMS_ALL_APPLICATION_STARTS_DONE() {
|
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) {
|
if (Config::initialized && !Config::plugin_is_loaded) {
|
||||||
DEBUG_FUNCTION_LINE("Inkay is running but the plugin got unloaded");
|
DEBUG_FUNCTION_LINE("Inkay is running but the plugin got unloaded");
|
||||||
ShowNotification("Inkay module is still running. Please restart the console to disable Pretendo.");
|
ShowNotification("Inkay module is still running. Please restart the console to disable Pretendo.");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue