The unhandled exception is the assert. That's because
| // rem: From Win32ProcessKeyboardMessage in win32_handmade.cpp
Assert(NewState->EndedDown != IsDown);
|
Fails.
The first thing I would do is look at how `NewState->EndedDown` is initialized.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | // rem: Lines 706-721 in win32_handmade.cpp
// TODO(casey): Zeroing macro
// TODO(casey): We can't zero everything because the up/down state will
// be wrong!!!
game_controller_input *OldKeyboardController = GetController(OldInput, 0);
game_controller_input *NewKeyboardController = GetController(NewInput, 0);
*NewKeyboardController = {};
NewKeyboardController->IsConnected = true;
for(int ButtonIndex = 0;
ButtonIndex < ArrayCount(NewKeyboardController->Buttons);
++ButtonIndex)
{
NewKeyboardController->Buttons[ButtonIndex].EndedDown =
OldKeyboardController->Buttons[ButtonIndex].EndedDown;
}
Win32ProcessPendingMessages(NewKeyboardController);
|
Make sure that NewKeyboardController is being initialized as expected.