From 7cb0ad3fd1fa86438fccde009ad4eb763d885c0f Mon Sep 17 00:00:00 2001 From: NeatNit Date: Sat, 6 Oct 2018 21:53:56 +0300 Subject: [PATCH] removed unused FingerID parameters --- src/citra/emu_window/emu_window_sdl2.cpp | 12 ++++++------ src/citra/emu_window/emu_window_sdl2.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index 6fbab5b72..e6e0c0cad 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -52,7 +52,7 @@ std::pair EmuWindow_SDL2::TouchToPixelPos(float touch_x, float touch_y return {static_cast(touch_x + 0.5), static_cast(touch_y + 0.5)}; } -void EmuWindow_SDL2::OnFingerDown(SDL_FingerID finger, float x, float y) { +void EmuWindow_SDL2::OnFingerDown(float x, float y) { // To do: keep track of multitouch using the fingerID and a dictionary of some kind // This isn't critical because the best we can do when we have that is to average them, like the // 3DS does @@ -61,12 +61,12 @@ void EmuWindow_SDL2::OnFingerDown(SDL_FingerID finger, float x, float y) { TouchPressed(static_cast(std::max(px, 0)), static_cast(std::max(py, 0))); } -void EmuWindow_SDL2::OnFingerMotion(SDL_FingerID finger, float x, float y) { +void EmuWindow_SDL2::OnFingerMotion(float x, float y) { const auto [px, py] = TouchToPixelPos(x, y); TouchMoved(static_cast(std::max(px, 0)), static_cast(std::max(py, 0))); } -void EmuWindow_SDL2::OnFingerUp(SDL_FingerID finger) { +void EmuWindow_SDL2::OnFingerUp() { TouchReleased(); } @@ -220,13 +220,13 @@ void EmuWindow_SDL2::PollEvents() { } break; case SDL_FINGERDOWN: - OnFingerDown(event.tfinger.fingerId, event.tfinger.x, event.tfinger.y); + OnFingerDown(event.tfinger.x, event.tfinger.y); break; case SDL_FINGERMOTION: - OnFingerMotion(event.tfinger.fingerId, event.tfinger.x, event.tfinger.y); + OnFingerMotion(event.tfinger.x, event.tfinger.y); break; case SDL_FINGERUP: - OnFingerUp(event.tfinger.fingerId); + OnFingerUp(); break; case SDL_QUIT: is_open = false; diff --git a/src/citra/emu_window/emu_window_sdl2.h b/src/citra/emu_window/emu_window_sdl2.h index 08898c0c6..f15032477 100644 --- a/src/citra/emu_window/emu_window_sdl2.h +++ b/src/citra/emu_window/emu_window_sdl2.h @@ -45,13 +45,13 @@ private: std::pair TouchToPixelPos(float touch_x, float touch_y) const; /// Called by PollEvents when a finger starts touching the touchscreen - void OnFingerDown(SDL_FingerID finger, float x, float y); + void OnFingerDown(float x, float y); /// Called by PollEvents when a finger moves while touching the touchscreen - void OnFingerMotion(SDL_FingerID finger, float x, float y); + void OnFingerMotion(float x, float y); /// Called by PollEvents when a finger stops touching the touchscreen - void OnFingerUp(SDL_FingerID finger); + void OnFingerUp(); /// Called by PollEvents when any event that may cause the window to be resized occurs void OnResize();