forked from PretendoNetwork/Inkay
Merge pull request #85 from jazamb/show-startup-toast-patch
feat: make startup toast optional
This commit is contained in:
commit
b4407310e5
10 changed files with 48 additions and 9 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "config.h"
|
||||
|
||||
bool Config::connect_to_network = false;
|
||||
bool Config::show_startup_toast = false;
|
||||
bool Config::initialized = false;
|
||||
bool Config::shown_warning = false;
|
||||
bool Config::plugin_is_loaded = false;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ public:
|
|||
|
||||
static bool connect_to_network;
|
||||
|
||||
static bool show_startup_toast;
|
||||
|
||||
static bool initialized;
|
||||
|
||||
static bool shown_warning;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
.plugin_name="Inkay"
|
||||
,.network_category="Network selection"
|
||||
,.connect_to_network_setting="Connect to Pretendo Network"
|
||||
,.show_startup_toast_setting="Show startup toast"
|
||||
,.other_category="Other settings"
|
||||
,.reset_wwp_setting="Reset Wara Wara Plaza"
|
||||
,.press_a_action="Press A"
|
||||
|
|
|
|||
12
src/main.cpp
12
src/main.cpp
|
|
@ -122,10 +122,12 @@ static InkayStatus Inkay_GetStatus() {
|
|||
}
|
||||
}
|
||||
|
||||
static void Inkay_Initialize(bool apply_patches) {
|
||||
static void Inkay_Initialize(bool apply_patches, bool show_startup_toast) {
|
||||
if (Config::initialized)
|
||||
return;
|
||||
|
||||
Config::show_startup_toast = show_startup_toast;
|
||||
|
||||
if (Config::block_initialize) {
|
||||
ShowNotification("Cannot load Inkay while the system is running. Please restart the console");
|
||||
return;
|
||||
|
|
@ -150,12 +152,16 @@ static void Inkay_Initialize(bool apply_patches) {
|
|||
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Pretendo URL and NoSSL patches applied successfully.");
|
||||
|
||||
ShowNotification(get_pretendo_message());
|
||||
if (Config::show_startup_toast) {
|
||||
ShowNotification(get_pretendo_message());
|
||||
}
|
||||
Config::initialized = true;
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Pretendo URL and NoSSL patches skipped.");
|
||||
|
||||
ShowNotification(get_nintendo_network_message());
|
||||
if(Config::show_startup_toast) {
|
||||
ShowNotification(get_nintendo_network_message());
|
||||
}
|
||||
Config::initialized = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue