summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerjoystick.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-10 20:03:54 +0300
committerGitHub <noreply@github.com>2024-06-10 20:03:54 +0300
commitf74c10c4ec6435471bac84473fe865f90843c2df (patch)
treeb2853d87789dbb84d6c26c259eab6639d3a7e482 /indra/newview/llviewerjoystick.cpp
parent5fccb539937a52d286274a002266e022e2102e5e (diff)
parent32fcefc058ae38eff0572326ef3efd1c7b343144 (diff)
Merge branch 'DRTVWR-600-maint-A' into signal/trim-trailing
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;