TY Bispoo
| 7869 | |
| 7870 | //TY Bispoo |
| 7871 | static EM_BOOL touch_callback(int eventType, const EmscriptenTouchEvent* e, void* userData) |
| 7872 | { |
| 7873 | // Move |
| 7874 | if (eventType == EMSCRIPTEN_EVENT_TOUCHMOVE) |
| 7875 | { |
| 7876 | ptrPGE->olc_UpdateMouse(e->touches->targetX, e->touches->targetY); |
| 7877 | } |
| 7878 | |
| 7879 | // Start |
| 7880 | if (eventType == EMSCRIPTEN_EVENT_TOUCHSTART) |
| 7881 | { |
| 7882 | ptrPGE->olc_UpdateMouse(e->touches->targetX, e->touches->targetY); |
| 7883 | ptrPGE->olc_UpdateMouseState(0, true); |
| 7884 | } |
| 7885 | |
| 7886 | // End |
| 7887 | if (eventType == EMSCRIPTEN_EVENT_TOUCHEND) |
| 7888 | { |
| 7889 | ptrPGE->olc_UpdateMouseState(0, false); |
| 7890 | } |
| 7891 | |
| 7892 | return EM_TRUE; |
| 7893 | } |
| 7894 | |
| 7895 | //TY Moros |
| 7896 | static EM_BOOL mouse_callback(int eventType, const EmscriptenMouseEvent* e, void* userData) |
nothing calls this directly
no test coverage detected