removed unused FingerID parameters

This commit is contained in:
NeatNit 2018-10-06 21:53:56 +03:00
parent cf8c356cc1
commit 7cb0ad3fd1
2 changed files with 9 additions and 9 deletions

View file

@ -52,7 +52,7 @@ std::pair<int, int> EmuWindow_SDL2::TouchToPixelPos(float touch_x, float touch_y
return {static_cast<int>(touch_x + 0.5), static_cast<int>(touch_y + 0.5)}; return {static_cast<int>(touch_x + 0.5), static_cast<int>(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 // 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 // This isn't critical because the best we can do when we have that is to average them, like the
// 3DS does // 3DS does
@ -61,12 +61,12 @@ void EmuWindow_SDL2::OnFingerDown(SDL_FingerID finger, float x, float y) {
TouchPressed(static_cast<unsigned>(std::max(px, 0)), static_cast<unsigned>(std::max(py, 0))); TouchPressed(static_cast<unsigned>(std::max(px, 0)), static_cast<unsigned>(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); const auto [px, py] = TouchToPixelPos(x, y);
TouchMoved(static_cast<unsigned>(std::max(px, 0)), static_cast<unsigned>(std::max(py, 0))); TouchMoved(static_cast<unsigned>(std::max(px, 0)), static_cast<unsigned>(std::max(py, 0)));
} }
void EmuWindow_SDL2::OnFingerUp(SDL_FingerID finger) { void EmuWindow_SDL2::OnFingerUp() {
TouchReleased(); TouchReleased();
} }
@ -220,13 +220,13 @@ void EmuWindow_SDL2::PollEvents() {
} }
break; break;
case SDL_FINGERDOWN: case SDL_FINGERDOWN:
OnFingerDown(event.tfinger.fingerId, event.tfinger.x, event.tfinger.y); OnFingerDown(event.tfinger.x, event.tfinger.y);
break; break;
case SDL_FINGERMOTION: case SDL_FINGERMOTION:
OnFingerMotion(event.tfinger.fingerId, event.tfinger.x, event.tfinger.y); OnFingerMotion(event.tfinger.x, event.tfinger.y);
break; break;
case SDL_FINGERUP: case SDL_FINGERUP:
OnFingerUp(event.tfinger.fingerId); OnFingerUp();
break; break;
case SDL_QUIT: case SDL_QUIT:
is_open = false; is_open = false;

View file

@ -45,13 +45,13 @@ private:
std::pair<int, int> TouchToPixelPos(float touch_x, float touch_y) const; std::pair<int, int> TouchToPixelPos(float touch_x, float touch_y) const;
/// Called by PollEvents when a finger starts touching the touchscreen /// 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 /// 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 /// 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 /// Called by PollEvents when any event that may cause the window to be resized occurs
void OnResize(); void OnResize();