Implemented monitor (dis)connect callback for win32.

This commit is contained in:
Marcel Metz
2011-10-14 14:32:06 -04:00
parent 784f60365e
commit 85d4bfcff5
3 changed files with 116 additions and 2 deletions
+10 -1
View File
@@ -30,7 +30,6 @@
#include "internal.h"
#include <stdio.h>
#include <stdlib.h>
@@ -1104,6 +1103,16 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
break;
}
case WM_DEVICECHANGE:
{
if (DBT_DEVNODES_CHANGED == wParam)
{
_glfwRefreshMonitors();
return TRUE;
}
break;
}
}
// Pass all unhandled messages to DefWindowProc