From 0282a499894b9ef5cde652dc06c8a073318ab93b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 May 2013 23:45:13 +0300 Subject: fix type in touchactions. --- src/touchactions.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/touchactions.cpp b/src/touchactions.cpp index f16a92e21..d969c8bc2 100644 --- a/src/touchactions.cpp +++ b/src/touchactions.cpp @@ -30,14 +30,14 @@ #include "debug.h" bool padClicked(false); -int haldJoyPad = 50; +int halfJoyPad = 50; #define impHandler(name) void name(const MouseInput &mouseInput) #define impHandler0(name) void name(const MouseInput &mouseInput A_UNUSED) void setHalfJoyPad(const int s) { - haldJoyPad = s; + halfJoyPad = s; } static void moveChar(int x, int y) @@ -46,8 +46,8 @@ static void moveChar(int x, int y) static const int diff = 20; // set center at (0,0) - x -= haldJoyPad; - y -= haldJoyPad; + x -= halfJoyPad; + y -= halfJoyPad; // some magic for checking at what sector was click if (abs(x) < lim1) @@ -104,7 +104,7 @@ static void moveChar(int x, int y) impHandler(padClick) { - moveChar(mouseInput.getX(), mouseInput.getY()); + moveChar(mouseInput.getTouchX(), mouseInput.getTouchY()); padClicked = true; } @@ -113,18 +113,18 @@ impHandler(padEvents) if (mouseInput.getType() == gcn::MouseInput::MOVED) { if (padClicked) - moveChar(mouseInput.getX(), mouseInput.getY()); + moveChar(mouseInput.getTouchX(), mouseInput.getTouchY()); } } impHandler0(padOut) { padClicked = false; - moveChar(haldJoyPad, haldJoyPad); + moveChar(halfJoyPad, halfJoyPad); } impHandler0(padUp) { padClicked = false; - moveChar(haldJoyPad, haldJoyPad); + moveChar(halfJoyPad, halfJoyPad); } -- cgit v1.2.3-70-g09d2