1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2025-02-12 03:35:14 +00:00

Added possibility to chose system's default

This commit is contained in:
flb 2021-03-14 23:13:49 +01:00
parent bb35a43cff
commit 521cef3a22
4 changed files with 10 additions and 11 deletions

View file

@ -60,7 +60,7 @@
#define PC_COLOR_PATH "/config/aio-switch-updater/pc_profiles.json" #define PC_COLOR_PATH "/config/aio-switch-updater/pc_profiles.json"
#define PAYLOAD_PATH "/payloads/" #define PAYLOAD_PATH "/payloads/"
#define BOOTLOADER_PATH "/bootloader" #define BOOTLOADER_PATH "/bootloader/"
#define BOOTLOADER_PL_PATH "/bootloader/payloads/" #define BOOTLOADER_PL_PATH "/bootloader/payloads/"
#define UPDATE_BIN_PATH "/bootloader/update.bin" #define UPDATE_BIN_PATH "/bootloader/update.bin"
#define REBOOT_PAYLOAD_PATH "/atmosphere/reboot_payload.bin" #define REBOOT_PAYLOAD_PATH "/atmosphere/reboot_payload.bin"

View file

@ -157,12 +157,13 @@
"title": "Internet settings" "title": "Internet settings"
}, },
"language": { "language": {
"system_default": "System default",
"en-US": "American English (en-US)", "en-US": "American English (en-US)",
"ja": "Japanese (ja)", "ja": "Japanese (ja)",
"fr": "French (fr)", "fr": "French (fr)",
"de": "German (de)", "de": "German (de)",
"it": "Italian (it)", "it": "Italian (it)",
"es": "Spanish", "es": "Spanish (es)",
"zh-CN": "Simplified Chinese (zh-CN)", "zh-CN": "Simplified Chinese (zh-CN)",
"ko": "Korean (ko)", "ko": "Korean (ko)",
"nl": "Dutch (nl)", "nl": "Dutch (nl)",

View file

@ -50,15 +50,6 @@ static void inject_payload(void) {
int reboot_to_payload(const char* path){ int reboot_to_payload(const char* path){
bool can_reboot = true; bool can_reboot = true;
//Result rc = splInitialize();
/* if(0){
//if (R_FAILED(rc)) {
can_reboot = false;
printf("Can't reboot");
} */
const char* lol = "lol";
printf(lol);
printf(path);
FILE *f; FILE *f;
f = fopen(path, "rb"); f = fopen(path, "rb");
if (f == NULL) can_reboot = false; if (f == NULL) can_reboot = false;

View file

@ -218,6 +218,13 @@ ToolsTab::ToolsTab(std::string tag, bool erista) : brls::List()
brls::AppletFrame* appView = new brls::AppletFrame(true, true); brls::AppletFrame* appView = new brls::AppletFrame(true, true);
brls::List* list = new brls::List(); brls::List* list = new brls::List();
brls::ListItem* listItem; brls::ListItem* listItem;
listItem = new brls::ListItem(fmt::format("{} ({})", "menus/language/system_default"_i18n, i18n::getCurrentLocale()));
listItem->registerAction("menus/tools/language"_i18n, brls::Key::A, [this] {
std::filesystem::remove(LANGUAGE_JSON);
brls::Application::quit();
return true;
});
list->addView(listItem);
for(auto& l : languages){ for(auto& l : languages){
listItem = new brls::ListItem(l.first); listItem = new brls::ListItem(l.first);
listItem->registerAction("menus/tools/language"_i18n, brls::Key::A, [this, l] { listItem->registerAction("menus/tools/language"_i18n, brls::Key::A, [this, l] {