Remove PAL60 from settings editor

Now requires the `BETA_SETTING` flag until it is fixed.
This commit is contained in:
Robin Jones 2024-12-23 19:05:18 +00:00
parent 570113ebac
commit b984b1b666

View File

@ -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) { static void set_protected_entries_type (menu_t *menu, void *arg) {
menu->settings.show_protected_entries = (bool)(uintptr_t)(arg); menu->settings.show_protected_entries = (bool)(uintptr_t)(arg);
settings_save(&menu->settings); settings_save(&menu->settings);
@ -35,6 +30,11 @@ static void set_sound_enabled_type (menu_t *menu, void *arg) {
} }
#ifdef BETA_SETTINGS #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) { static void set_bgm_enabled_type (menu_t *menu, void *arg) {
menu->settings.bgm_enabled = (bool)(uintptr_t)(arg); menu->settings.bgm_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings); settings_save(&menu->settings);
@ -52,12 +52,6 @@ static void set_rumble_enabled_type (menu_t *menu, void *arg) {
#endif #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 = { 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 = "On", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(false) }, {.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 #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 = { 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 = "On", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(false) }, {.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 #endif
static component_context_menu_t options_context_menu = { .list = { 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 = "Show Hidden Files", .submenu = &set_protected_entries_type_context_menu },
{ .text = "Sound Effects", .submenu = &set_sound_enabled_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 }, { .text = "Use Saves Folder", .submenu = &set_use_saves_folder_type_context_menu },
#ifdef BETA_SETTINGS #ifdef BETA_SETTINGS
{ .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu },
{ .text = "Background Music", .submenu = &set_bgm_enabled_type_context_menu }, { .text = "Background Music", .submenu = &set_bgm_enabled_type_context_menu },
{ .text = "Rumble Feedback", .submenu = &set_rumble_enabled_type_context_menu }, { .text = "Rumble Feedback", .submenu = &set_rumble_enabled_type_context_menu },
// { .text = "Restore Defaults", .action = set_use_default_settings }, // { .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, ALIGN_LEFT, VALIGN_TOP,
"\n\n" "\n\n"
" Default Directory : %s\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" "To change the following menu settings, press 'A':\n"
"* PAL60 Mode : %s\n"
" Show Hidden Files : %s\n" " Show Hidden Files : %s\n"
" Use Saves folder : %s\n" " Use Saves folder : %s\n"
" Sound Effects : %s\n" " Sound Effects : %s\n"
#ifdef BETA_SETTINGS #ifdef BETA_SETTINGS
"* PAL60 Mode : %s\n"
" Background Music : %s\n" " Background Music : %s\n"
" Rumble Feedback : %s\n" " Rumble Feedback : %s\n"
#endif
"\n\n" "\n\n"
"Note: Certain settings have the following caveats:\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, menu->settings.default_directory,
format_switch(menu->settings.rom_autoload_enabled), format_switch(menu->settings.rom_autoload_enabled),
format_switch(menu->settings.pal60_enabled),
format_switch(menu->settings.show_protected_entries), format_switch(menu->settings.show_protected_entries),
format_switch(menu->settings.use_saves_folder), format_switch(menu->settings.use_saves_folder),
format_switch(menu->settings.sound_enabled) format_switch(menu->settings.sound_enabled)
#ifdef BETA_SETTINGS #ifdef BETA_SETTINGS
, ,
format_switch(menu->settings.pal60_enabled),
format_switch(menu->settings.bgm_enabled), format_switch(menu->settings.bgm_enabled),
format_switch(menu->settings.rumble_enabled) format_switch(menu->settings.rumble_enabled)
#endif #endif