summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerjoystick.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-06-13 14:59:28 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-06-13 14:59:28 -0700
commit5e60392c273f0c9c5efa765a05414c618381780a (patch)
treed1eedbb1dfa86e66532a6d8746b7a81e5a444d3a /indra/newview/llviewerjoystick.cpp
parent0f3c3563b0861e8ea82b201aab8343d99f993bbc (diff)
parent100ebbab2437de7f5d124a0d7b8279a7a7b57656 (diff)
Merge branch 'develop' of github.com:secondlife/viewer into roxie/webrtc-voice
Diffstat (limited to 'indra/newview/llviewerjoystick.cpp')
-rw-r--r--indra/newview/llviewerjoystick.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 3a3f0b3d95..ce6dfa4ad1 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -244,19 +244,19 @@ void LLViewerJoystick::updateEnabled(bool autoenable)
{
if (mDriverState == JDS_UNINITIALIZED)
{
- gSavedSettings.setBOOL("JoystickEnabled", FALSE );
+ gSavedSettings.setBOOL("JoystickEnabled", false);
}
else
{
// autoenable if user specifically chose this device
if (autoenable && (isLikeSpaceNavigator() || isDeviceUUIDSet()))
{
- gSavedSettings.setBOOL("JoystickEnabled", TRUE );
+ gSavedSettings.setBOOL("JoystickEnabled", true );
}
}
if (!gSavedSettings.getBOOL("JoystickEnabled"))
{
- mOverrideCamera = FALSE;
+ mOverrideCamera = false;
}
}
@@ -264,7 +264,7 @@ void LLViewerJoystick::setOverrideCamera(bool val)
{
if (!gSavedSettings.getBOOL("JoystickEnabled"))
{
- mOverrideCamera = FALSE;
+ mOverrideCamera = false;
}
else
{
@@ -352,7 +352,7 @@ void LLViewerJoystick::init(bool autoenable)
loadDeviceIdFromSettings();
- if (libinit == false)
+ if (!libinit)
{
// Note: The HotPlug callbacks are not actually getting called on Windows
if (ndof_libinit(HotPlugAddCallback,
@@ -413,10 +413,10 @@ void LLViewerJoystick::init(bool autoenable)
{
LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;
// Failed to gather devices, init first suitable one
- mLastDeviceUUID = LLSD();
- void *preffered_device = NULL;
- initDevice(preffered_device);
- }
+ mLastDeviceUUID = LLSD();
+ void *preffered_device = NULL;
+ initDevice(preffered_device);
+ }
}
if (mDriverState == JDS_INITIALIZING)
@@ -434,7 +434,7 @@ void LLViewerJoystick::init(bool autoenable)
// Autoenable the joystick for recognized devices if nothing was connected previously
if (!autoenable)
{
- autoenable = gSavedSettings.getString("JoystickInitialized").empty() ? true : false;
+ autoenable = gSavedSettings.getString("JoystickInitialized").empty();
}
updateEnabled(autoenable);
@@ -510,10 +510,10 @@ void LLViewerJoystick::initDevice(LLSD &guid)
{
LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;
// Failed to gather devices from window, init first suitable one
- void *preffered_device = NULL;
- mLastDeviceUUID = LLSD();
- initDevice(preffered_device);
- }
+ void *preffered_device = NULL;
+ mLastDeviceUUID = LLSD();
+ initDevice(preffered_device);
+ }
}
if (mDriverState == JDS_INITIALIZING)
@@ -957,7 +957,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
else if (!button_held)
{
button_held = true;
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
}
else if (!button_held)
@@ -1532,7 +1532,7 @@ void LLViewerJoystick::setSNDefaults()
#if LL_DARWIN || LL_LINUX
const float platformScale = 20.f;
const float platformScaleAvXZ = 1.f;
- // The SpaceNavigator doesn't act as a 3D cursor on OS X / Linux.
+ // The SpaceNavigator doesn't act as a 3D cursor on macOS / Linux.
const bool is_3d_cursor = false;
#else
const float platformScale = 1.f;