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.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index e5a8226720..9d45ea24b9 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
{
@@ -329,7 +329,7 @@ LLViewerJoystick::LLViewerJoystick()
memset(mBtn, 0, sizeof(mBtn));
// factor in bandwidth? bandwidth = gViewerStats->mKBitStat
- mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm. why?
+ mPerfScale = 4000.f / (F32)gSysCPU.getMHz(); // hmm. why?
mLastDeviceUUID = LLSD::Integer(1);
}
@@ -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,
@@ -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);
@@ -524,7 +524,7 @@ void LLViewerJoystick::initDevice(LLSD &guid)
#endif
}
-bool LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid)
+bool LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, const std::string &name, const LLSD &guid)
{
#if LIB_NDOF
mLastDeviceUUID = guid;
@@ -961,7 +961,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
else if (!button_held)
{
button_held = true;
- gAgent.setFlying(FALSE);
+ gAgent.setFlying(false);
}
}
else if (!button_held)
@@ -1278,9 +1278,9 @@ void LLViewerJoystick::moveFlycam(bool reset)
if (!is_zero)
{
if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
- {
- gAgent.clearAFK();
- }
+ {
+ gAgent.clearAFK();
+ }
else
{
gAwayTriggerTimer.reset();
@@ -1551,7 +1551,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;