diff --git a/SerialPrograms/Source/CommonFramework/GlobalSettingsPanel.cpp b/SerialPrograms/Source/CommonFramework/GlobalSettingsPanel.cpp index fce0aa595f..de1e0d49bb 100644 --- a/SerialPrograms/Source/CommonFramework/GlobalSettingsPanel.cpp +++ b/SerialPrograms/Source/CommonFramework/GlobalSettingsPanel.cpp @@ -281,9 +281,12 @@ void GlobalSettings::load_json(const JsonValue& json){ } STATIC_GLOBALS.load_json(json); - const bool developer_mode = STATIC_GLOBALS.DEVELOPER_MODE; BatchOption::load_json(json); + // cout << "DEVELOPER_MODE: " << STATIC_GLOBALS.DEVELOPER_MODE << endl; + // cout << "INTERNAL_DEVELOPER_MODE: " << STATIC_GLOBALS.INTERNAL_DEVELOPER_MODE << endl; + const bool developer_mode = STATIC_GLOBALS.DEVELOPER_MODE; + ConfigOptionState devmode_visibility = developer_mode ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN; diff --git a/SerialPrograms/Source/CommonFramework/StaticGlobals.cpp b/SerialPrograms/Source/CommonFramework/StaticGlobals.cpp index aaa8e65223..139908e27b 100644 --- a/SerialPrograms/Source/CommonFramework/StaticGlobals.cpp +++ b/SerialPrograms/Source/CommonFramework/StaticGlobals.cpp @@ -21,8 +21,11 @@ const std::set TOKENS{ "6643d9fe87b3e54dc75dfac8ac22f0cc8bd17f6a8a786debf5fc4c517ee65469", "8e48e38e49bffc8462ada9d2d9d850d5b3b5c9529d20978c09bc548bc9a614a4", "7694adee4419d62c6a923c4efc9e7b41def7b96bb84ea882701b0bf2e8c13bee", - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", // jw's token. "e8d168bc482e96553ea9f9ecaea5a817474dbccc2a6a228a6bde67f2b2aa2889", // James' token. +}; + +const std::set INTERNAL_TOKENS{ + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", // jw's token. "7555b7c63481cad42306718c67e7f9def5bfd1da8f6cd299ccd3d7dc95f307ae", // Kuro's token. "3d475b46d121fc24559d100de2426feaa53cd6578aac2817c4857a610ccde2dd", // kichi's token. "9b41db8175b5f248a78e738c7bd63a36e33b57953cb4e80ccdd13c2a7e892eec", // Dalton's token. @@ -47,7 +50,11 @@ void StaticGlobals::load_json(const JsonValue& json){ hash.push(dev_token->c_str(), dev_token->size()); hash.finish(); hash.get_hash_hex(); - DEVELOPER_MODE = TOKENS.find(hash.get_hash_hex()) != TOKENS.end(); + + bool internal_dev = INTERNAL_TOKENS.find(hash.get_hash_hex()) != INTERNAL_TOKENS.end(); + bool regular_dev = TOKENS.find(hash.get_hash_hex()) != TOKENS.end(); + DEVELOPER_MODE = regular_dev || internal_dev; + INTERNAL_DEVELOPER_MODE = internal_dev; } const JsonObject* debug_obj = obj->get_object("DEBUG"); diff --git a/SerialPrograms/Source/CommonFramework/StaticGlobals.h b/SerialPrograms/Source/CommonFramework/StaticGlobals.h index 61a0e6f863..9682176bad 100644 --- a/SerialPrograms/Source/CommonFramework/StaticGlobals.h +++ b/SerialPrograms/Source/CommonFramework/StaticGlobals.h @@ -27,6 +27,7 @@ class StaticGlobals{ public: bool NAUGHTY_MODE = false; bool DEVELOPER_MODE = false; + bool INTERNAL_DEVELOPER_MODE = false; // Debug color stats like those in: diff --git a/SerialPrograms/Source/NintendoSwitch/NintendoSwitch_Panels.cpp b/SerialPrograms/Source/NintendoSwitch/NintendoSwitch_Panels.cpp index 4fd719f779..cfe63a61c5 100644 --- a/SerialPrograms/Source/NintendoSwitch/NintendoSwitch_Panels.cpp +++ b/SerialPrograms/Source/NintendoSwitch/NintendoSwitch_Panels.cpp @@ -88,7 +88,9 @@ std::vector PanelListFactory::make_panels() const{ ret.emplace_back(make_single_switch_program()); ret.emplace_back(make_computer_program()); #ifdef PA_OFFICIAL - add_panels(ret); + if (STATIC_GLOBALS.INTERNAL_DEVELOPER_MODE){ + add_panels(ret); + } #endif } diff --git a/SerialPrograms/Source/PokemonSV/PokemonSV_Panels.cpp b/SerialPrograms/Source/PokemonSV/PokemonSV_Panels.cpp index 49c0332535..a0832257cc 100644 --- a/SerialPrograms/Source/PokemonSV/PokemonSV_Panels.cpp +++ b/SerialPrograms/Source/PokemonSV/PokemonSV_Panels.cpp @@ -171,7 +171,7 @@ std::vector PanelListFactory::make_panels() const{ } #ifdef PA_OFFICIAL - if (STATIC_GLOBALS.DEVELOPER_MODE){ + if (STATIC_GLOBALS.INTERNAL_DEVELOPER_MODE){ ret.emplace_back("---- Research ----"); add_panels(ret); }