diff --git a/src/menu/views/settings_editor.c b/src/menu/views/settings_editor.c index 4b2467d1..aeb1bae0 100644 --- a/src/menu/views/settings_editor.c +++ b/src/menu/views/settings_editor.c @@ -11,11 +11,6 @@ static const char *format_switch (bool state) { } } -static void set_pal60_type (menu_t *menu, void *arg) { - menu->settings.pal60_enabled = (bool)(uintptr_t)(arg); - settings_save(&menu->settings); -} - static void set_protected_entries_type (menu_t *menu, void *arg) { menu->settings.show_protected_entries = (bool)(uintptr_t)(arg); settings_save(&menu->settings); @@ -35,6 +30,11 @@ static void set_sound_enabled_type (menu_t *menu, void *arg) { } #ifdef BETA_SETTINGS +static void set_pal60_type (menu_t *menu, void *arg) { + menu->settings.pal60_enabled = (bool)(uintptr_t)(arg); + settings_save(&menu->settings); +} + static void set_bgm_enabled_type (menu_t *menu, void *arg) { menu->settings.bgm_enabled = (bool)(uintptr_t)(arg); settings_save(&menu->settings); @@ -52,12 +52,6 @@ static void set_rumble_enabled_type (menu_t *menu, void *arg) { #endif -static component_context_menu_t set_pal60_type_context_menu = { .list = { - {.text = "On", .action = set_pal60_type, .arg = (void *)(uintptr_t)(true) }, - {.text = "Off", .action = set_pal60_type, .arg = (void *) (false) }, - COMPONENT_CONTEXT_MENU_LIST_END, -}}; - static component_context_menu_t set_protected_entries_type_context_menu = { .list = { {.text = "On", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(true) }, {.text = "Off", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(false) }, @@ -77,6 +71,12 @@ static component_context_menu_t set_use_saves_folder_type_context_menu = { .list }}; #ifdef BETA_SETTINGS +static component_context_menu_t set_pal60_type_context_menu = { .list = { + {.text = "On", .action = set_pal60_type, .arg = (void *)(uintptr_t)(true) }, + {.text = "Off", .action = set_pal60_type, .arg = (void *) (false) }, + COMPONENT_CONTEXT_MENU_LIST_END, +}}; + static component_context_menu_t set_bgm_enabled_type_context_menu = { .list = { {.text = "On", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(true) }, {.text = "Off", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(false) }, @@ -91,11 +91,11 @@ static component_context_menu_t set_rumble_enabled_type_context_menu = { .list = #endif static component_context_menu_t options_context_menu = { .list = { - { .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu }, { .text = "Show Hidden Files", .submenu = &set_protected_entries_type_context_menu }, { .text = "Sound Effects", .submenu = &set_sound_enabled_type_context_menu }, { .text = "Use Saves Folder", .submenu = &set_use_saves_folder_type_context_menu }, #ifdef BETA_SETTINGS + { .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu }, { .text = "Background Music", .submenu = &set_bgm_enabled_type_context_menu }, { .text = "Rumble Feedback", .submenu = &set_rumble_enabled_type_context_menu }, // { .text = "Restore Defaults", .action = set_use_default_settings }, @@ -136,27 +136,28 @@ static void draw (menu_t *menu, surface_t *d) { ALIGN_LEFT, VALIGN_TOP, "\n\n" " Default Directory : %s\n\n" - " Autoload ROM : %s\n" + " Autoload ROM : %s\n\n" "To change the following menu settings, press 'A':\n" - "* PAL60 Mode : %s\n" " Show Hidden Files : %s\n" " Use Saves folder : %s\n" " Sound Effects : %s\n" #ifdef BETA_SETTINGS + "* PAL60 Mode : %s\n" " Background Music : %s\n" " Rumble Feedback : %s\n" -#endif "\n\n" "Note: Certain settings have the following caveats:\n" - "* Requires rebooting the N64 Console.\n", + "* Requires rebooting the N64 Console.\n" +#endif + , menu->settings.default_directory, format_switch(menu->settings.rom_autoload_enabled), - format_switch(menu->settings.pal60_enabled), format_switch(menu->settings.show_protected_entries), format_switch(menu->settings.use_saves_folder), format_switch(menu->settings.sound_enabled) #ifdef BETA_SETTINGS , + format_switch(menu->settings.pal60_enabled), format_switch(menu->settings.bgm_enabled), format_switch(menu->settings.rumble_enabled) #endif