From d017071dff7da23142aafdf7d5fd1bfafe9e09f3 Mon Sep 17 00:00:00 2001 From: Alex Duchesne Date: Fri, 29 Nov 2024 15:24:40 -0500 Subject: [PATCH] rg_system: Fixed boot once mode for retro-core apps --- components/retro-go/rg_system.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/retro-go/rg_system.c b/components/retro-go/rg_system.c index 71bfc662..d39ebf46 100644 --- a/components/retro-go/rg_system.c +++ b/components/retro-go/rg_system.c @@ -471,14 +471,18 @@ rg_app_t *rg_system_init(int sampleRate, const rg_handlers_t *handlers, const rg profile->lock = rg_mutex_create(); #endif -#ifdef ESP_PLATFORM if (app.lowMemoryMode) rg_gui_alert("External memory not detected", "Boot will continue but it will surely crash..."); if (app.bootFlags & RG_BOOT_ONCE) + { + #ifdef ESP_PLATFORM esp_ota_set_boot_partition(esp_partition_find_first( ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_ANY, RG_APP_LAUNCHER)); -#endif + #endif + rg_settings_set_string(NS_BOOT, SETTING_BOOT_NAME, "launcher"); + rg_settings_commit(); + } rg_task_create("rg_sysmon", &system_monitor_task, NULL, 3 * 1024, RG_TASK_PRIORITY_5, -1); app.initialized = true;