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

Function ddio_MouseGetEvent

ddio/lnxmouse.cpp:538–548  ·  view source on GitHub ↗

gets a mouse button event, returns false if none.

Source from the content-addressed store, hash-verified

536
537// gets a mouse button event, returns false if none.
538bool ddio_MouseGetEvent(int *btn, bool *state) {
539 t_mse_event evt;
540
541 if (MB_queue.recv(&evt)) {
542 *btn = (int)evt.btn;
543 *state = evt.state ? true : false;
544 return true;
545 }
546
547 return false;
548}
549
550// return mouse button down time.
551float ddio_MouseBtnDownTime(int btn) {

Callers 1

ui_MousePollFunction · 0.85

Calls 1

recvMethod · 0.45

Tested by

no test coverage detected