Skip to content

Commit 1c7e239

Browse files
author
Niko
committed
USE_4PADTEST progress
1 parent 66bc50e commit 1c7e239

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

decompile/General/GAMEPAD/GAMEPAD_03_PollVsync.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff 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;

decompile/General/MAIN/MainFrame_06_HaveAllPads.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)