Skip to content

Commit

Permalink
rg_system: Fixed boot once mode for retro-core apps
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Nov 29, 2024
1 parent 757793d commit d017071
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/retro-go/rg_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d017071

Please sign in to comment.