forked from Ports/perfect_dark
Merge pull request #601 from cylonicboom/pr/joyreset-on-controller-change
port: call `joyReset()` when changing controllers
This commit is contained in:
1 file changed
+3
@@ -10,6 +10,7 @@
|
|||||||
#include "game/menu.h"
|
#include "game/menu.h"
|
||||||
#include "game/gamefile.h"
|
#include "game/gamefile.h"
|
||||||
#include "game/player.h"
|
#include "game/player.h"
|
||||||
|
#include "lib/joy.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -597,8 +598,10 @@ static MenuItemHandlerResult menuhandlerController(s32 operation, struct menuite
|
|||||||
if (data->dropdown.value == 0) {
|
if (data->dropdown.value == 0) {
|
||||||
// unassign controller
|
// unassign controller
|
||||||
inputAssignController(g_ExtMenuPlayer, -1);
|
inputAssignController(g_ExtMenuPlayer, -1);
|
||||||
|
joyReset();
|
||||||
} else if (data->dropdown.value <= numCtrls) {
|
} else if (data->dropdown.value <= numCtrls) {
|
||||||
inputAssignController(g_ExtMenuPlayer, ctrls[data->dropdown.value - 1]);
|
inputAssignController(g_ExtMenuPlayer, ctrls[data->dropdown.value - 1]);
|
||||||
|
joyReset();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MENUOP_GETSELECTEDINDEX:
|
case MENUOP_GETSELECTEDINDEX:
|
||||||
|
|||||||
Reference in new issue
Block a user