Here's my code in CALLBACK WinMain:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | while (GlobalRunning) { game_controller_input *KeyboardController = &NewInput->Controllers[0]; // TODO: Zeroing macro game_controller_input ZeroController = {}; *KeyboardController = ZeroController; Win32ProcessPendingMessages(KeyboardController); // TODO: Should we poll this more frequently? DWORD MaxControllerCount = XUSER_MAX_COUNT; if (MaxControllerCount > ArrayCount(NewInput->Controllers)) { MaxControllerCount = ArrayCount(NewInput->Controllers); } for (DWORD ControllerIndex = 1; ControllerIndex < MaxControllerCount; ++ControllerIndex) { game_controller_input*OldController=&OldInput>Controllers[ControllerIndex]; game_controller_input *NewController = &NewInput->Controllers[ControllerIndex]; ... |
Changing
1 2 | game_controller_input *OldController = &OldInput->Controllers[ControllerIndex]; game_controller_input *NewController = &NewInput->Controllers[ControllerIndex]; |
to
1 2 | game_controller_input *OldController = &OldInput->Controllers[ControllerIndex + 1]; game_controller_input *NewController = &NewInput->Controllers[ControllerIndex + 1]; |
fixes the issue but Casey doesn't do this in his code. What's the deal? I mean, so, yes I fixed it but why does it work fine on Casey's machine?