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

Function ddio_sdl_InternalKeyDownTime

ddio/lnxkey_sdl.cpp:414–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412void ddio_sdl_InternalKeyResume() {}
413
414float ddio_sdl_InternalKeyDownTime(uint8_t key) {
415 float down_time = 0.0f;
416 if (LKeys[key].status) {
417 float timer = timer_GetTime();
418 down_time = timer - LKeys[key].down_time;
419 LKeys[key].down_time = timer;
420 } else {
421 down_time = LKeys[key].up_time - LKeys[key].down_time;
422 LKeys[key].down_time = LKeys[key].up_time = 0.0f;
423 }
424
425 return down_time;
426}
427
428void ddio_sdl_InternalResetKey(uint8_t key) {
429 LKeys[key].down_time = 0.0f;

Callers 1

ddio_InternalKeyDownTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected