File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ void DECOMP_GAMEPAD_PollVsync(struct GamepadSystem *gGamepads)
4545 // loop through all gamepads that can connect
4646 // to this gamepad port. 1 for no mtap, 4 for mtap
4747 for (char i = 0 ; i < maxPadsPerPort ; i ++ )
48- {
49- if
50- (
48+ {
49+ bool unpluggedPort =
50+ (
5151 (
5252 // multitap here, and unplugged
5353 (gGamepads -> slotBuffer [port ].controllerData == (PAD_ID_MULTITAP << 4 )) &&
@@ -56,11 +56,18 @@ void DECOMP_GAMEPAD_PollVsync(struct GamepadSystem *gGamepads)
5656
5757 // controller unplugged
5858 (gGamepads -> slotBuffer [port ].plugged != PLUGGED )
59- )
59+ );
60+
61+ #ifdef USE_4PADTEST
62+ unplugged = 0 ;
63+ #endif
64+
65+ if (unpluggedPort )
6066 {
6167 // no analog sticks found
6268 pad -> gamepadType = 0 ;
6369 }
70+
6471 else
6572 {
6673 uVar4 = (port << 4 ) | i ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ int DECOMP_MainFrame_HaveAllPads(short numPlyrNextGame)
1919 if (packet == NULL ) return 0 ;
2020 if (packet -> plugged != PLUGGED ) return 0 ;
2121
22- gb ++
22+ gb ++ ;
2323 }
2424 }
2525
You can’t perform that action at this time.
0 commit comments