diff options
Diffstat (limited to 'indra/newview/llviewerjoystick.cpp')
-rw-r--r-- | indra/newview/llviewerjoystick.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 3a3f0b3d95..787ea02e4c 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, @@ -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; |