MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / onMouseButtonDown

Function onMouseButtonDown

source/kernel/devs/devinput.cpp:729–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727}
728
729void onMouseButtonDown(U32 button) {
730 if (!touchEvents) {
731 return;
732 }
733 U64 time = KSystem::getSystemTimeAsMicroSeconds();
734
735 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(touchEvents->bufferCond);
736 if (button == 0)
737 queueEvent(touchEvents, K_EV_KEY, K_BTN_LEFT, 1, time);
738 else if (button == 2)
739 queueEvent(touchEvents, K_EV_KEY, K_BTN_MIDDLE, 1, time);
740 else if (button == 1)
741 queueEvent(touchEvents, K_EV_KEY, K_BTN_RIGHT, 1, time);
742 else
743 return;
744 postSendEvent(touchEvents, time);
745 BOXEDWINE_CONDITION_SIGNAL_ALL(touchEvents->bufferCond);
746}
747
748void onMouseWheel(S32 value) {
749 if (!touchEvents) {

Callers 1

handlSdlEventMethod · 0.85

Calls 2

queueEventFunction · 0.85
postSendEventFunction · 0.85

Tested by

no test coverage detected