Skip to content

Commit

Permalink
Remove PAL60 from settings editor
Browse files Browse the repository at this point in the history
Now requires the `BETA_SETTING` flag until it is fixed.
  • Loading branch information
networkfusion committed Dec 23, 2024
1 parent 570113e commit b984b1b
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/menu/views/settings_editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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) },
Expand All @@ -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) },
Expand All @@ -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 },
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b984b1b

Please sign in to comment.