diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-10 01:02:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 01:02:41 +0200 |
commit | 0b3d4db98b5bc6f81a22e4618dbabbdafcec0ada (patch) | |
tree | e3574b49f5a9e4c762e709ada72e0c1ba16e2fff /src/yuzu_cmd/emu_window/emu_window_sdl2.h | |
parent | Merge pull request #1459 from ogniK5377/break (diff) | |
parent | implemented touch in Qt and SDL (diff) | |
download | yuzu-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.h | 12 |
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(); |