diff --git a/Qt/QtHost.cpp b/Qt/QtHost.cpp index f0d7f94b0d..ba03f98ac7 100644 --- a/Qt/QtHost.cpp +++ b/Qt/QtHost.cpp @@ -421,6 +421,22 @@ void NativeUpdate(InputState &input) screenManager->update(input); } +void NativeTouch(const TouchInput &touch) { + if (screenManager) + screenManager->touch(touch); +} + +void NativeKey(const KeyInput &key) { + g_buttonTracker.Process(key); + if (screenManager) + screenManager->key(key); +} + +void NativeAxis(const AxisInput &key) { + if (screenManager) + screenManager->axis(key); +} + void NativeShutdownGraphics() { delete uiTexture; diff --git a/Qt/qtemugl.cpp b/Qt/qtemugl.cpp index 0f4c5a91e7..973a005d9b 100644 --- a/Qt/qtemugl.cpp +++ b/Qt/qtemugl.cpp @@ -38,12 +38,26 @@ void QtEmuGL::mouseDoubleClickEvent(QMouseEvent *) void QtEmuGL::mousePressEvent(QMouseEvent *e) { + TouchInput input; input_state->pointer_down[0] = true; input_state->pointer_x[0] = e->x(); input_state->pointer_y[0] = e->y(); + + input.x = e->x(); + input.y = e->y(); + input.flags = TOUCH_DOWN; + input.id = 0; + NativeTouch(input); } void QtEmuGL::mouseReleaseEvent(QMouseEvent *e) { + TouchInput input; input_state->pointer_down[0] = false; + + input.x = e->x(); + input.y = e->y(); + input.flags = TOUCH_UP; + input.id = 0; + NativeTouch(input); } diff --git a/native b/native index b7c8b8ddef..4871c1192d 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit b7c8b8ddef4e22324b768129f53a10382684259a +Subproject commit 4871c1192d54adb9be8f642d4c0303cf359104db