From 54383cac8fa8a40d96590a300d4fce618f7413f3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 10 Jul 2020 20:48:43 +0300 Subject: SL-5894 #3 WIP enumerate devices to flaoter, let floater set device temp --- indra/llwindow/llwindow.h | 2 +- indra/llwindow/llwindowwin32.cpp | 4 ++-- indra/llwindow/llwindowwin32.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 90107a7c29..f1113acd5f 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -171,7 +171,7 @@ public: // windows only DirectInput8 for joysticks virtual void* getDirectInput8() { return NULL; }; - virtual bool getInputDevices(U32 device_type_filter, void * devices_callback) { return false; }; + virtual bool getInputDevices(U32 device_type_filter, void * devices_callback, void* userdata) { return false; }; protected: LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags); virtual ~LLWindow(); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 2bc9c8d63c..c67e7f7c6c 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4181,7 +4181,7 @@ void* LLWindowWin32::getDirectInput8() return &gDirectInput8; } -bool LLWindowWin32::getInputDevices(U32 device_type_filter, void * di8_devices_callback) +bool LLWindowWin32::getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata) { if (gDirectInput8 != NULL) { @@ -4189,7 +4189,7 @@ bool LLWindowWin32::getInputDevices(U32 device_type_filter, void * di8_devices_c HRESULT status = gDirectInput8->EnumDevices( (DWORD) device_type_filter, // DWORD dwDevType, (LPDIENUMDEVICESCALLBACK)di8_devices_callback, // LPDIENUMDEVICESCALLBACK lpCallback, // BOOL DIEnumDevicesCallback( LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef ) // BOOL CALLBACK DinputDevice::DevicesCallback - (LPVOID*)gDirectInput8, // LPVOID pvRef + (LPVOID*)userdata, // LPVOID pvRef DIEDFL_ATTACHEDONLY // DWORD dwFlags ); diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index dc02528bf2..ee0df570e9 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -118,7 +118,7 @@ public: static void setDPIAwareness(); /*virtual*/ void* getDirectInput8(); - /*virtual*/ bool getInputDevices(U32 device_type_filter, void * di8_devices_callback); + /*virtual*/ bool getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata); protected: LLWindowWin32(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, -- cgit v1.2.3