summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/jni/emu_window/emu_window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/src/main/jni/emu_window/emu_window.cpp')
-rw-r--r--src/android/app/src/main/jni/emu_window/emu_window.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/android/app/src/main/jni/emu_window/emu_window.cpp b/src/android/app/src/main/jni/emu_window/emu_window.cpp
index 2768a01c9..06db55369 100644
--- a/src/android/app/src/main/jni/emu_window/emu_window.cpp
+++ b/src/android/app/src/main/jni/emu_window/emu_window.cpp
@@ -23,6 +23,22 @@ void EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) {
window_info.render_surface = reinterpret_cast<void*>(surface);
}
+void EmuWindow_Android::OnTouchPressed(int id, float x, float y) {
+ const auto [touch_x, touch_y] = MapToTouchScreen(x, y);
+ EmulationSession::GetInstance().GetInputSubsystem().GetTouchScreen()->TouchPressed(touch_x,
+ touch_y, id);
+}
+
+void EmuWindow_Android::OnTouchMoved(int id, float x, float y) {
+ const auto [touch_x, touch_y] = MapToTouchScreen(x, y);
+ EmulationSession::GetInstance().GetInputSubsystem().GetTouchScreen()->TouchMoved(touch_x,
+ touch_y, id);
+}
+
+void EmuWindow_Android::OnTouchReleased(int id) {
+ EmulationSession::GetInstance().GetInputSubsystem().GetTouchScreen()->TouchReleased(id);
+}
+
void EmuWindow_Android::OnFrameDisplayed() {
if (!m_first_frame) {
Common::Android::RunJNIOnFiber<void>(