summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd/emu_window/emu_window_sdl2.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-10 01:02:41 +0200
committerGitHub <noreply@github.com>2018-10-10 01:02:41 +0200
commit0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada (patch)
treee3574b49f5a9e4c762e709ada72e0c1ba16e2fff /src/yuzu_cmd/emu_window/emu_window_sdl2.h
parentMerge pull request #1459 from ogniK5377/break (diff)
parentimplemented touch in Qt and SDL (diff)
downloadyuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.tar
yuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.tar.gz
yuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.tar.bz2
yuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.tar.lz
yuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.tar.xz
yuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.tar.zst
yuzu-0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada.zip
Diffstat (limited to 'src/yuzu_cmd/emu_window/emu_window_sdl2.h')
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h
index d34902109..b0d4116cc 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h
@@ -40,6 +40,18 @@ private:
/// Called by PollEvents when a mouse button is pressed or released
void OnMouseButton(u32 button, u8 state, s32 x, s32 y);
+ /// Translates pixel position (0..1) to pixel positions
+ std::pair<unsigned, unsigned> TouchToPixelPos(float touch_x, float touch_y) const;
+
+ /// Called by PollEvents when a finger starts touching the touchscreen
+ void OnFingerDown(float x, float y);
+
+ /// Called by PollEvents when a finger moves while touching the touchscreen
+ void OnFingerMotion(float x, float y);
+
+ /// Called by PollEvents when a finger stops touching the touchscreen
+ void OnFingerUp();
+
/// Called by PollEvents when any event that may cause the window to be resized occurs
void OnResize();