Merge pull request #601 from cylonicboom/pr/joyreset-on-controller-change

port: call `joyReset()` when changing controllers
This commit is contained in:
fgsfds authored and GitHub committed 2025-04-27 13:44:36 +02:00
commit f414e8a792
1 file changed
+3
+3
View File
@@ -10,6 +10,7 @@
#include "game/menu.h"
#include "game/gamefile.h"
#include "game/player.h"
#include "lib/joy.h"
#include "video.h"
#include "input.h"
#include "config.h"
@@ -597,8 +598,10 @@ static MenuItemHandlerResult menuhandlerController(s32 operation, struct menuite
if (data->dropdown.value == 0) {
// unassign controller
inputAssignController(g_ExtMenuPlayer, -1);
joyReset();
} else if (data->dropdown.value <= numCtrls) {
inputAssignController(g_ExtMenuPlayer, ctrls[data->dropdown.value - 1]);
joyReset();
}
break;
case MENUOP_GETSELECTEDINDEX: