Skip to content

Commit

Permalink
Merge redefine keys and controls menu #800 (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurtsley authored Jun 11, 2024
1 parent 00d1e9c commit fbac574
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/options_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static menu_t *MenuCreateOptionsGraphics(
const char *name, OptionsMenuData *data);

#if !defined(__ANDROID__) && !defined(__GCWZERO__)
static menu_t *MenuCreateOptionsControls(
static menu_t *MenuCreateKeys(
const char *name, OptionsMenuData *data);
#endif

Expand All @@ -54,7 +54,7 @@ menu_t *MenuCreateOptions(const char *name, OptionsMenuData *data)
"Interface...", "Interface Options:",
ConfigGet(data->config, "Interface"), data, true));
#if !defined(__ANDROID__) && !defined(__GCWZERO__)
MenuAddSubmenu(menu, MenuCreateOptionsControls("Controls...", data));
MenuAddSubmenu(menu, MenuCreateKeys("Redefine keys...", data));
#endif
MenuAddSubmenu(
menu, MenuCreateConfigOptions(
Expand Down Expand Up @@ -145,29 +145,15 @@ static menu_t *MenuCreateOptionsGraphics(
return menu;
}

static menu_t *MenuCreateKeys(const char *name, OptionsMenuData *data);

#if !defined(__ANDROID__) && !defined(__GCWZERO__)
static menu_t *MenuCreateOptionsControls(
const char *name, OptionsMenuData *data)
{
menu_t *menu =
MenuCreateNormal(name, "Configure Controls:", MENU_TYPE_OPTIONS, 0);
MenuAddSubmenu(menu, MenuCreateKeys("Redefine keys...", data));
MenuAddSubmenu(menu, MenuCreateSeparator(""));
MenuAddSubmenu(menu, MenuCreateBack("Done"));
MenuSetPostInputFunc(menu, PostInputConfigApply, data);
return menu;
}
#endif

static void MenuCreateKeysSingleSection(
menu_t *menu, const char *sectionName, const int playerIndex);
static menu_t *MenuCreateOptionChangeKey(
const char *name, const key_code_e code, const int playerIndex,
const bool isOptional);

static menu_t *MenuCreateKeys(const char *name, OptionsMenuData *data)
#if !defined(__ANDROID__) && !defined(__GCWZERO__)
static menu_t *MenuCreateKeys(
const char *name, OptionsMenuData *data)
{
menu_t *menu = MenuCreateNormal(name, "", MENU_TYPE_OPTIONS, 0);
MenuCreateKeysSingleSection(menu, "Keyboard 1", 0);
Expand All @@ -179,6 +165,7 @@ static menu_t *MenuCreateKeys(const char *name, OptionsMenuData *data)
MenuSetPostInputFunc(menu, PostInputConfigApply, data);
return menu;
}
#endif

static void MenuCreateKeysSingleSection(
menu_t *menu, const char *sectionName, const int playerIndex)
Expand Down

0 comments on commit fbac574

Please sign in to comment.