mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Fix rebinding "menu" (esc) bindings to different actions
Ever since 2.3, if you bind a controller button to the "menu" action (i.e. back/escape) you won't be able to change that button to any other action, because pressing it anywhere in the binding menu will exit to the previous menu, without applying the binding. I know action sets will overhaul everything, but 2.4 may (probably "should") come out before we have action sets. This part is very broken, and the fix is very easy: just move the bind-assigning code to above the menu-return-on-esc code, and add a return.
This commit is contained in:
parent
c6ebf5aeda
commit
4f2fe163bc
1 changed files with 12 additions and 11 deletions
|
@ -2210,6 +2210,18 @@ void titleinput(void)
|
||||||
game.jumpheld = true;
|
game.jumpheld = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( game.currentmenuname == Menu::controller &&
|
||||||
|
game.currentmenuoption > 0 &&
|
||||||
|
game.currentmenuoption < 6 &&
|
||||||
|
(game.separate_interact || game.currentmenuoption < 5) &&
|
||||||
|
key.controllerButtonDown() )
|
||||||
|
{
|
||||||
|
updatebuttonmappings(game.currentmenuoption);
|
||||||
|
music.playef(11);
|
||||||
|
game.savestatsandsettings_menu();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (game.menustart
|
if (game.menustart
|
||||||
&& game.menucountdown <= 0
|
&& game.menucountdown <= 0
|
||||||
&& (key.isDown(27) || key.isDown(game.controllerButton_esc)))
|
&& (key.isDown(27) || key.isDown(game.controllerButton_esc)))
|
||||||
|
@ -2363,17 +2375,6 @@ void titleinput(void)
|
||||||
menuactionpress();
|
menuactionpress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( game.currentmenuname == Menu::controller &&
|
|
||||||
game.currentmenuoption > 0 &&
|
|
||||||
game.currentmenuoption < 6 &&
|
|
||||||
(game.separate_interact || game.currentmenuoption < 5) &&
|
|
||||||
key.controllerButtonDown() )
|
|
||||||
{
|
|
||||||
updatebuttonmappings(game.currentmenuoption);
|
|
||||||
music.playef(11);
|
|
||||||
game.savestatsandsettings_menu();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fadetomode)
|
if (fadetomode)
|
||||||
|
|
Loading…
Reference in a new issue