Merge pull request #85 from jazamb/show-startup-toast-patch

feat: make startup toast optional
This commit is contained in:
Ash 2026-05-23 23:16:57 +10:00 committed by GitHub
commit b4407310e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 48 additions and 9 deletions

View file

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

View file

@ -10,6 +10,8 @@ public:
static bool connect_to_network;
static bool show_startup_toast;
static bool initialized;
static bool shown_warning;

View file

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

View file

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