From 8b9c44b2155785ead99c7e99a21348a0712ccb15 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 30 Nov 2023 13:54:39 +0200 Subject: Mac buildfix --- indra/llwindow/llwindowmacosx.cpp | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'indra/llwindow/llwindowmacosx.cpp') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 66b9a5d060..41665419aa 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -2246,29 +2246,27 @@ static void get_devices(std::list &list_of_devices, { HidDevice device = populate_device( io_obj ); - if (debugLoggingEnabled("Joystick")) + // Should match ndof + if (device.mAxis >= 3 + || (device.mUsagePage == kHIDPage_GenericDesktop + && (device.mUsage == kHIDUsage_GD_MultiAxisController + || device.mUsage == kHIDUsage_GD_GamePad + || device.mUsage == kHIDUsage_GD_Joystick)) + || (device.mUsagePage == kHIDPage_Game + && device.mUsage == kHIDUsage_Game_3DGameController) + || strstr(device.mManufacturer, "3Dconnexion")) { list_of_devices.push_back(device); - LL_DEBUGS("Joystick") << "Device axises: " << (S32)device.mAxis - << "Device HIDUsepage: " << (S32)device.mUsagePage - << "Device HIDUsage: " << (S32)device.mUsage - << LL_ENDL; } else { - // Should match ndof - if (device.mAxis >= 3 - || (device.mUsagePage == kHIDPage_GenericDesktop - && (device.mUsage == kHIDUsage_GD_MultiAxisController - || device.mUsage == kHIDUsage_GD_GamePad - || device.mUsage == kHIDUsage_GD_Joystick)) - || (device.mUsagePage == kHIDPage_Game - && device.mUsage == kHIDUsage_Game_3DGameController) - || strstr(device.mManufacturer, "3Dconnexion")) - { - list_of_devices.push_back(device); - } - } + LL_DEBUGS("Joystick"); + list_of_devices.push_back(device); + LL_CONT << "Device axes: " << (S32)device.mAxis + << " Device HIDUsepage: " << (S32)device.mUsagePage + << " Device HIDUsage: " << (S32)device.mUsage; + LL_ENDL; + } // release the device object, it is no longer needed -- cgit v1.2.3