mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-07 19:01:54 -07:00
Merge commit 'bc6b0d199ecf402d25f83ebc02e62403571aa368' into mntm-dev
This commit is contained in:
@@ -156,14 +156,26 @@ bool storage_settings_scene_benchmark_on_event(void* context, SceneManagerEvent
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DialogExResultCenter:
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
if(sd_status == FSE_OK) {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
}
|
||||
} else {
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
+7
-1
@@ -48,7 +48,13 @@ bool storage_settings_scene_benchmark_confirm_on_event(void* context, SceneManag
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
case DialogExResultCenter:
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
}
|
||||
break;
|
||||
case DialogExResultRight:
|
||||
scene_manager_next_scene(app->scene_manager, StorageSettingsBenchmark);
|
||||
|
||||
+7
-1
@@ -44,7 +44,13 @@ bool storage_settings_scene_factory_reset_on_event(void* context, SceneManagerEv
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
scene_manager_set_scene_state(app->scene_manager, StorageSettingsFactoryReset, 0);
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
}
|
||||
break;
|
||||
case DialogExResultRight:
|
||||
counter++;
|
||||
|
||||
+7
-1
@@ -41,7 +41,13 @@ bool storage_settings_scene_format_confirm_on_event(void* context, SceneManagerE
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
case DialogExResultCenter:
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
}
|
||||
break;
|
||||
case DialogExResultRight:
|
||||
scene_manager_set_scene_state(app->scene_manager, StorageSettingsFormatting, false);
|
||||
|
||||
@@ -75,8 +75,14 @@ bool storage_settings_scene_formatting_on_event(void* context, SceneManagerEvent
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
|
||||
+7
-1
@@ -56,7 +56,13 @@ bool storage_settings_scene_internal_info_on_event(void* context, SceneManagerEv
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,13 @@ bool storage_settings_scene_sd_info_on_event(void* context, SceneManagerEvent ev
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
case DialogExResultCenter:
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
}
|
||||
break;
|
||||
case DialogExResultRight:
|
||||
scene_manager_next_scene(app->scene_manager, StorageSettingsUnmounted);
|
||||
|
||||
+7
-1
@@ -46,7 +46,13 @@ bool storage_settings_scene_unmount_confirm_on_event(void* context, SceneManager
|
||||
switch(event.event) {
|
||||
case DialogExResultCenter:
|
||||
case DialogExResultLeft:
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||
}
|
||||
break;
|
||||
case DialogExResultRight:
|
||||
scene_manager_next_scene(app->scene_manager, StorageSettingsUnmounted);
|
||||
|
||||
@@ -57,8 +57,14 @@ bool storage_settings_scene_unmounted_on_event(void* context, SceneManagerEvent
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DialogExResultCenter:
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
if(app->from_favorites) {
|
||||
scene_manager_stop(app->scene_manager);
|
||||
view_dispatcher_stop(app->view_dispatcher);
|
||||
return true;
|
||||
} else {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
|
||||
@@ -99,7 +99,10 @@ int32_t storage_settings_app(void* p) {
|
||||
StorageSettings* app = storage_settings_alloc();
|
||||
|
||||
if(!submenu_settings_helpers_app_start(app->settings_helper, p)) {
|
||||
app->from_favorites = false;
|
||||
scene_manager_next_scene(app->scene_manager, StorageSettingsStart);
|
||||
} else {
|
||||
app->from_favorites = true;
|
||||
}
|
||||
|
||||
view_dispatcher_run(app->view_dispatcher);
|
||||
|
||||
@@ -44,6 +44,8 @@ typedef struct {
|
||||
// helpers
|
||||
SubmenuSettingsHelperDescriptor* helper_descriptor;
|
||||
SubmenuSettingsHelper* settings_helper;
|
||||
|
||||
bool from_favorites;
|
||||
} StorageSettings;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user