summaryrefslogtreecommitdiff
path: root/indra/newview/lljoystickbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lljoystickbutton.cpp')
-rw-r--r--indra/newview/lljoystickbutton.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index 0acc67ff5a..2cc5c8335d 100644
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -136,13 +136,13 @@ void LLJoystick::updateSlop()
bool LLJoystick::pointInCircle(S32 x, S32 y) const
{
- if(this->getLocalRect().mTop!=this->getLocalRect().mRight)
+ if(this->getLocalRect().getHeight() != this->getLocalRect().getWidth())
{
llwarns << "Joystick shape is not square"<<llendl;
- return TRUE;
+ return true;
}
//center is x and y coordinates of center of joystick circle, and also its radius
- int center = this->getLocalRect().mTop/2;
+ int center = this->getLocalRect().getHeight()/2;
bool in_circle = (x - center) * (x - center) + (y - center) * (y - center) <= center * center;
return in_circle;
}