| 83 | } |
| 84 | |
| 85 | bool wheel_callback(int eventType, const EmscriptenWheelEvent *e, void *userData) { |
| 86 | printf("%s, screen: (%d,%d), client: (%d,%d),%s%s%s%s button: %hu, buttons: %hu, target: (%d, %d), delta:(%g,%g,%g), deltaMode:%u\n", |
| 87 | emscripten_event_type_to_string(eventType), e->mouse.screenX, e->mouse.screenY, e->mouse.clientX, e->mouse.clientY, |
| 88 | e->mouse.ctrlKey ? " CTRL" : "", e->mouse.shiftKey ? " SHIFT" : "", e->mouse.altKey ? " ALT" : "", e->mouse.metaKey ? " META" : "", |
| 89 | e->mouse.button, e->mouse.buttons, e->mouse.targetX, e->mouse.targetY, |
| 90 | (float)e->deltaX, (float)e->deltaY, (float)e->deltaZ, e->deltaMode); |
| 91 | |
| 92 | if (e->deltaY > 0.f || e->deltaY < 0.f) |
| 93 | gotWheel = 1; |
| 94 | |
| 95 | instruction(); |
| 96 | return 0; |
| 97 | } |
| 98 | |
| 99 | int main() { |
| 100 | // Make the canvas area stand out from the background. |
nothing calls this directly
no test coverage detected