MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SendKeyToGameDLL

Function SendKeyToGameDLL

Descent3/GameLoop.cpp:2380–2394  ·  view source on GitHub ↗

Sends this key to the multiplayer game DLL Return: true means to handle the key normally false means to do no further processing on this key

Source from the content-addressed store, hash-verified

2378// Return: true means to handle the key normally
2379// false means to do no further processing on this key
2380bool SendKeyToGameDLL(int key) {
2381 DLLInfo.input_key = key;
2382
2383 DLLInfo.iRet = 0;
2384 CallGameDLL(EVT_CLIENT_KEYPRESS, &DLLInfo);
2385
2386 if (DLLInfo.iRet != 0) {
2387
2388 ddio_KeyFlush(); // keep the controls stuff from getting any keys
2389 return 0; // Don't process this key
2390 }
2391
2392 // Handle key normally
2393 return 1;
2394}
2395
2396void DemoCheats(int key);
2397// Get and handle all pending keys

Callers 1

ProcessKeysFunction · 0.85

Calls 2

CallGameDLLFunction · 0.85
ddio_KeyFlushFunction · 0.85

Tested by

no test coverage detected