summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerjoystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerjoystick.cpp')
-rw-r--r--indra/newview/llviewerjoystick.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 652e50e20c..9f7e4d338b 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -992,6 +992,13 @@ void LLViewerJoystick::scanJoystick()
#endif
updateStatus();
+ // App focus check Needs to happen AFTER updateStatus in case the joystick
+ // is not centred when the app loses focus.
+ if (!gFocusMgr.getAppHasFocus())
+ {
+ return;
+ }
+
static long toggle_flycam = 0;
if (mBtn[0] == 1)