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

Function ddio_null_InternalKeyDownTime

ddio/lnxkey_null.cpp:74–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72void ddio_null_InternalKeyResume() {}
73
74float ddio_null_InternalKeyDownTime(uint8_t key) {
75 float down_time = 0.0f;
76 if (LKeys[key].status) {
77 float timer = timer_GetTime();
78 down_time = timer - LKeys[key].down_time;
79 LKeys[key].down_time = timer;
80 } else {
81 down_time = LKeys[key].up_time - LKeys[key].down_time;
82 LKeys[key].down_time = LKeys[key].up_time = 0.0f;
83 }
84
85 return down_time;
86}
87
88void ddio_null_InternalResetKey(uint8_t key) {
89 LKeys[key].down_time = 0.0f;

Callers 1

ddio_InternalKeyDownTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected