1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00
This commit is contained in:
Camilla Löwy 2017-03-14 20:39:18 +01:00
parent 97dbd8b63b
commit 21355e31db

View File

@ -476,21 +476,15 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
if (wParam == DBT_DEVICEARRIVAL)
{
DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;
if (dbh)
{
if (dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
if (dbh && dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
_glfwDetectJoystickConnectionWin32();
}
}
else if (wParam == DBT_DEVICEREMOVECOMPLETE)
{
DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;
if (dbh)
{
if (dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
if (dbh && dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
_glfwDetectJoystickDisconnectionWin32();
}
}
break;
}