fix: Do title specific patches more than once

This commit is contained in:
Maschell 2025-02-09 10:26:09 +01:00
parent ed75702ac5
commit 79ccad1fd4
3 changed files with 6 additions and 12 deletions

View File

@ -17,7 +17,6 @@
#include "config.h"
bool Config::internal_init_done = false;
bool Config::connect_to_network = false;
bool Config::initialized = false;
bool Config::shown_warning = false;

View File

@ -5,12 +5,8 @@
#ifndef INKAY_CONFIG_H
#define INKAY_CONFIG_H
#include <string_view>
#include <nn/swkbd.h>
class Config {
public:
static bool internal_init_done;
static bool connect_to_network;

View File

@ -208,13 +208,12 @@ WUMS_APPLICATION_STARTS() {
}
WUMS_ALL_APPLICATION_STARTS_DONE() {
if (!Config::internal_init_done) {
setup_olv_libs();
peertopeer_patch();
matchmaking_notify_titleswitch();
hotpatchAccountSettings();
Config::internal_init_done = true;
}
// we need to do the patches here because otherwise the Config::connect_to_network flag might be set yet
setup_olv_libs();
peertopeer_patch();
matchmaking_notify_titleswitch();
hotpatchAccountSettings();
if (Config::initialized && !Config::plugin_is_loaded) {
DEBUG_FUNCTION_LINE("Inkay is running but the plugin got unloaded");
if (!Config::block_initialize) {