diff --git a/settings.c b/settings.c index 1cdbb42f29..56a037da91 100644 --- a/settings.c +++ b/settings.c @@ -945,7 +945,7 @@ static void save_keybind_hat(config_file_t *conf, const char *key, const struct unsigned hat = GET_HAT(bind->joykey); const char *dir = NULL; - switch (GET_HAT_DIR(hat)) + switch (GET_HAT_DIR(bind->joykey)) { case HAT_UP_MASK: dir = "up"; @@ -964,6 +964,7 @@ static void save_keybind_hat(config_file_t *conf, const char *key, const struct break; default: + RARCH_ERR("Hat direction is invalid: 0x%x.\n", (unsigned)GET_HAT_DIR(hat)); rarch_assert(0); }