aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-12-23 22:03:49 +0100
committersfan5 <sfan5@live.de>2020-12-24 13:44:54 +0100
commit74762470b2aa11a5271b846549ff14b86c1705d2 (patch)
treecf4fd29ba05a94395674ac6cd5b2eeb7bdac0ee1 /src/gui
parent289425f6bd6cfe1f66218918d9d5bd1b9f89aa7c (diff)
downloadminetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.gz
minetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.bz2
minetest-74762470b2aa11a5271b846549ff14b86c1705d2.zip
Fix some minor code issues all over the place
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/touchscreengui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/touchscreengui.cpp b/src/gui/touchscreengui.cpp
index 0d64aa618..e1a971462 100644
--- a/src/gui/touchscreengui.cpp
+++ b/src/gui/touchscreengui.cpp
@@ -881,8 +881,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
s32 dyj = event.TouchInput.Y - m_screensize.Y + button_size * 5.0f / 2.0f;
bool inside_joystick = (dxj * dxj + dyj * dyj <= button_size * button_size * 1.5 * 1.5);
- if (m_joystick_has_really_moved ||
- (!m_joystick_has_really_moved && inside_joystick) ||
+ if (m_joystick_has_really_moved || inside_joystick ||
(!m_fixed_joystick &&
distance_sq > m_touchscreen_threshold * m_touchscreen_threshold)) {
m_joystick_has_really_moved = true;