Added Win32 window re-creation hack.

This commit is contained in:
Camilla Berglund 2010-09-14 02:54:05 +02:00
parent 39a966d136
commit 3863a22dc1

View File

@ -1217,6 +1217,16 @@ static int createWindow(_GLFWwindow* window,
static void destroyWindow(_GLFWwindow* window)
{
// This is duplicated from glfwCloseWindow
// TODO: Stop duplicating code
if (window == _glfwLibrary.currentWindow)
glfwMakeWindowCurrent(NULL);
// This is duplicated from glfwCloseWindow
// TODO: Stop duplicating code
if (window == _glfwLibrary.activeWindow)
_glfwLibrary.activeWindow = NULL;
if (window->WGL.context)
{
wglDeleteContext(window->WGL.context);