summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerjoystick.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 12:27:46 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 12:27:46 +0300
commite59216443619dd2280ce0fff316a2b9e2ee7cf5e (patch)
tree27d782916858596d67a60ecf56ca07b6a44a4601 /indra/newview/llviewerjoystick.h
parentdcb85f9f9d1019bb046a5719bc3645fa96a2d060 (diff)
parentbb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff)
Merge branch 'main' into release/maint-c
# Conflicts: # indra/llui/lltexteditor.cpp # indra/newview/llcontrolavatar.cpp
Diffstat (limited to 'indra/newview/llviewerjoystick.h')
-rw-r--r--indra/newview/llviewerjoystick.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h
index 47da263150..b459987c68 100644
--- a/indra/newview/llviewerjoystick.h
+++ b/indra/newview/llviewerjoystick.h
@@ -30,6 +30,9 @@
#include "stdtypes.h"
#if LIB_NDOF
+#if LL_DARWIN
+#define TARGET_OS_MAC 1
+#endif
#include "ndofdev_external.h"
#else
#define NDOF_Device void
@@ -52,8 +55,8 @@ class LLViewerJoystick : public LLSingleton<LLViewerJoystick>
public:
void init(bool autoenable);
void initDevice(LLSD &guid);
- void initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/);
- void initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid);
+ bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/);
+ bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid);
void terminate();
void updateStatus();
@@ -76,6 +79,7 @@ public:
LLSD getDeviceUUID(); //unconverted, OS dependent value wrapped into LLSD, for comparison/search
std::string getDeviceUUIDString(); // converted readable value for settings
std::string getDescription();
+ void saveDeviceIdToSettings();
protected:
void updateEnabled(bool autoenable);
@@ -103,7 +107,11 @@ private:
bool mCameraUpdated;
bool mOverrideCamera;
U32 mJoystickRun;
- LLSD mLastDeviceUUID; // _GUID as U8 binary map, integer 1 for no device/ndof's device
+
+ // Windows: _GUID as U8 binary map
+ // MacOS: long as an U8 binary map
+ // Else: integer 1 for no device/ndof's default device
+ LLSD mLastDeviceUUID;
static F32 sLastDelta[7];
static F32 sDelta[7];