Skip to content

Commit

Permalink
[WASimModule] Handle SIMCONNECT_RECV_ID_EVENT_EX1 event type for Co…
Browse files Browse the repository at this point in the history
…nnect, Ping, and custom calculator Events.
  • Loading branch information
mpaperno committed Mar 2, 2024
1 parent 61912e6 commit 8f42b51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/WASimModule/WASimModule.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
This file is part of the WASimCommander project.
https://github.com/mpaperno/WASimCommander
Expand Down Expand Up @@ -1635,7 +1635,10 @@ void CALLBACK dispatchMessage(SIMCONNECT_RECV* pData, DWORD cbData, void*)
break;

case SIMCONNECT_RECV_ID_EVENT:
case SIMCONNECT_RECV_ID_EVENT_EX1:
{
// The difference between SIMCONNECT_RECV_EVENT and SIMCONNECT_RECV_EVENT_EX1 is 4 extra DWORD values tacked onto the end of the latter
// (dwData is _not_ an array as the SDK docs claim). Since we're only using the first value anyway, this is safe to cast.
SIMCONNECT_RECV_EVENT* data = (SIMCONNECT_RECV_EVENT*)pData;
LOG_TRC << LOG_SC_RECV_EVENT(data);

Expand Down

0 comments on commit 8f42b51

Please sign in to comment.