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

Function ddio_KeyFlush

ddio/key.cpp:228–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226// ----------------------------------------------------------------------------
227
228void ddio_KeyFlush() {
229 int i;
230
231 if (!DDIO_key_init)
232 return;
233
234 // flush out internal key input system by gathering all data in buffer.
235 DDIO_key_queue.head = DDIO_key_queue.tail = 0;
236
237 for (i = 0; i < KEY_QUEUE_SIZE; i++) {
238 DDIO_key_queue.buffer[i] = 0;
239 }
240
241 // flush keyboard array too
242 for (i = 0; i < DDIO_MAX_KEYS; i++) {
243 DDIO_key_down_count[i] = 0;
244 DDIO_key_state[i] = 0;
245 ddio_InternalResetKey(i);
246 }
247}
248
249void ddio_KeyFlushKey(int key) {
250 DDIO_key_down_count[key] = 0;

Callers 15

FontViewFunction · 0.85
OnIdleMethod · 0.85
pauseMethod · 0.85
resumeMethod · 0.85
InitRadiosityRunFunction · 0.85
CalculateRadiosityFunction · 0.85
OnOKMethod · 0.85
OnCancelMethod · 0.85
OnBriefingEditorMethod · 0.85
OnOKMethod · 0.85
OnCancelMethod · 0.85

Calls 1

ddio_InternalResetKeyFunction · 0.85

Tested by

no test coverage detected