Added FS comments

master
Dax Dupont 2025-02-21 22:50:33 +01:00
parent f5fdf502fa
commit 4aff595bdf
5 changed files with 20 additions and 7 deletions

View File

@ -184,7 +184,7 @@ bool LLWindowCallbacks::handleTimerEvent(LLWindow *window)
return false;
}
bool LLWindowCallbacks::handleDeviceChange(LLWindow *window, bool deviceRemoved)
bool LLWindowCallbacks::handleDeviceChange(LLWindow *window, bool deviceRemoved) // <FS:Dax/> [FIRE-10419] Added deviceRemoved bool to prevent reinitialize on disconnect.
{
return false;
}

View File

@ -67,7 +67,7 @@ public:
virtual void handleWindowUnblock(LLWindow *window); // window coming back after taking over CPU for a while
virtual void handleDataCopy(LLWindow *window, S32 data_type, void *data);
virtual bool handleTimerEvent(LLWindow *window);
virtual bool handleDeviceChange(LLWindow *window, bool deviceRemoved);
virtual bool handleDeviceChange(LLWindow *window, bool deviceRemoved); // <FS:Dax/> [FIRE-10419] Added deviceRemoved bool to prevent reinitialize on disconnect.
virtual bool handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
virtual bool handleWindowDidChangeScreen(LLWindow *window);

View File

@ -579,8 +579,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
// Make an instance of our window then define the window class
mhInstance = GetModuleHandle(NULL);
// Get a notification filter setup for HID devices
// <FS:Dax> [FIRE-10419] Add notification filters for device notifcations for HID device handling
DEV_BROADCAST_DEVICEINTERFACE notificationFilter;
ZeroMemory(&notificationFilter, sizeof(notificationFilter));
@ -588,7 +587,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
notificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
HDEVNOTIFY deviceNotification = RegisterDeviceNotification(mWindowHandle, &notificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
// </FS>
// Init Direct Input - needed for joystick / Spacemouse
LPDIRECTINPUT8 di8_interface;
@ -2384,6 +2383,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// return 1;
// }
// Only bother initalizing when needed.
if (deviceCLSIDWhitelist.empty())
{
@ -2410,6 +2410,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
}
break;
// </FS>
}
case WM_PAINT:

View File

@ -1839,7 +1839,19 @@ bool LLViewerWindow::handleTimerEvent(LLWindow *window)
return false;
}
bool LLViewerWindow::handleDeviceChange(LLWindow *window, bool deviceRemoved)
// <FS:Dax> [FIRE-10419] Added deviceRemoved bool to prevent reinitialize on disconnect.
// bool LLViewerWindow::handleDeviceChange(LLWindow* window)
// {
// if (!LLViewerJoystick::getInstance()->isJoystickInitialized())
// {
// LLViewerJoystick::getInstance()->init(true);
// return true;
// }
// return false;
// }
// </FS>
bool LLViewerWindow::handleDeviceChange(LLWindow *window, bool deviceRemoved)
{
// give a chance to use a joystick after startup (hot-plugging)
if (!deviceRemoved && !LLViewerJoystick::getInstance()->isJoystickInitialized())

View File

@ -225,7 +225,7 @@ public:
/*virtual*/ void handleWindowUnblock(LLWindow *window);
/*virtual*/ void handleDataCopy(LLWindow *window, S32 data_type, void *data);
/*virtual*/ bool handleTimerEvent(LLWindow *window);
/*virtual*/ bool handleDeviceChange(LLWindow *window, bool deviceRemoved);
/*virtual*/ bool handleDeviceChange(LLWindow *window, bool deviceRemoved); // <FS:Dax/> [FIRE-10419] Added deviceRemoved bool to prevent reinitialize on disconnect.
/*virtual*/ bool handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
/*virtual*/ bool handleWindowDidChangeScreen(LLWindow *window);