Correctly init joypay vars

Correctly free overrides path
This commit is contained in:
Robin Jones 2024-10-23 14:19:59 +01:00
parent 9020445c17
commit 4732981f88
2 changed files with 4 additions and 3 deletions

View File

@ -25,8 +25,8 @@ static void actions_clear (menu_t *menu) {
}
static void actions_update_direction (menu_t *menu) {
joypad_8way_t held_dir;
joypad_8way_t fast_dir;
joypad_8way_t held_dir = JOYPAD_8WAY_NONE;
joypad_8way_t fast_dir = JOYPAD_8WAY_NONE;
JOYPAD_PORT_FOREACH (i) {
held_dir = joypad_get_direction(i, JOYPAD_2D_DPAD | JOYPAD_2D_STICK);
@ -90,7 +90,7 @@ static void actions_update_direction (menu_t *menu) {
}
static void actions_update_buttons (menu_t *menu) {
joypad_buttons_t pressed;
joypad_buttons_t pressed = {0};
JOYPAD_PORT_FOREACH (i) {
pressed = joypad_get_buttons_pressed(i);

View File

@ -835,6 +835,7 @@ static rom_err_t save_override (path_t *path, const char *id, int value, int def
mini_t *ini = mini_try_load(path_get(overrides_path));
if (!ini) {
path_free(overrides_path);
return ROM_ERR_SAVE_IO;
}