emscripten: Add simulate_right_button()

This commit is contained in:
kichikuou
2023-05-04 11:25:09 +09:00
parent 6f0f410d98
commit 04873d875a
+11
View File
@@ -133,3 +133,14 @@ void NACT::set_cursor(int x, int y)
ags->translate_mouse_coords(&x, &y);
SDL_WarpMouseInWindow(g_window, x, y);
}
#ifdef __EMSCRIPTEN__
extern "C" {
EMSCRIPTEN_KEEPALIVE
void simulate_right_button(int pressed) {
touch_state = pressed ? TOUCH_RBUTTON : TOUCH_NONE;
}
} // extern "C"
#endif