Skip to content

Commit

Permalink
Try C89 fix again without double wrapping NIL.
Browse files Browse the repository at this point in the history
  • Loading branch information
XerTheSquirrel committed Dec 24, 2023
1 parent 05d8935 commit aabdbc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ enum midi_driver_enum
#define DECLARE_BIND(base, bind, desc) { #base, desc, 0, bind, true }
#define DECLARE_META_BIND(level, base, bind, desc) { #base, desc, level, bind, true }

#define DECLARE_EXTRA_BIND_NIL2
#define DECLARE_EXTRA_BIND_NIL DECLARE_EXTRA_BIND_NIL2
#define DECLARE_EXTRA_BIND_NIL
#define DECLARE_EXTRA_BIND_PASTE2(a, b) a##b
#define DECLARE_EXTRA_BIND_PASTE(a, b) DECLARE_EXTRA_BIND_PASTE2(a, b)
#define DECLARE_EXTRA_BIND_STRINGY2(a) #a
Expand Down Expand Up @@ -454,7 +453,6 @@ const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL] = {
#undef DECLARE_EXTRA_BIND_STRINGY
#undef DECLARE_EXTRA_BIND_10
#undef DECLARE_EXTRA_BIND_100
#undef DECLARE_EXTRA_BIND_NIL2
#undef DECLARE_EXTRA_BIND_NIL

#if defined(HAVE_METAL)
Expand Down
7 changes: 2 additions & 5 deletions input/input_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
|| ((autoconf_bind)->joyaxis != AXIS_NONE)) \
)

#define INPUT_CONFIG_MASS_BIND_ORDER_NIL2
#define INPUT_CONFIG_MASS_BIND_ORDER_NIL INPUT_CONFIG_MASS_BIND_ORDER_NIL2
#define INPUT_CONFIG_MASS_BIND_ORDER_NIL
#define INPUT_CONFIG_MASS_BIND_ORDER_PASTE2(a, b) a##b
#define INPUT_CONFIG_MASS_BIND_ORDER_PASTE(a, b) INPUT_CONFIG_MASS_BIND_ORDER_PASTE2(a, b)
#define INPUT_CONFIG_MASS_BIND_ORDER(x) (24 + x)
Expand Down Expand Up @@ -159,7 +158,6 @@ const unsigned input_config_bind_order[rarch_num_bind_game_controller()] = {
#undef INPUT_CONFIG_MASS_BIND_ORDER
#undef INPUT_CONFIG_MASS_BIND_ORDER_TEN
#undef INPUT_CONFIG_MASS_BIND_ORDER_HUNDRED
#undef INPUT_CONFIG_MASS_BIND_ORDER_NIL2
#undef INPUT_CONFIG_MASS_BIND_ORDER_NIL

/**************************************/
Expand Down Expand Up @@ -6161,6 +6159,7 @@ void input_remapping_set_defaults(bool clear_cache)
{
unsigned usernum, logical;
settings_t *settings = config_get_ptr();
const struct retro_keybind *keybind = &input_config_binds[usernum][logical];

for (usernum = 0; usernum < MAX_USERS; usernum++)
{
Expand All @@ -6171,8 +6170,6 @@ void input_remapping_set_defaults(bool clear_cache)
if (!rarch_logical_bind_is_basic(logical))
continue;

const struct retro_keybind *keybind = &input_config_binds[usernum][logical];

/* Force defaults for extended keys to be unmapped by default. */
configuration_set_uint(settings,
settings->uints.input_remap_ids[usernum][logical],
Expand Down

0 comments on commit aabdbc3

Please sign in to comment.