DXGL r166 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r165‎ | r166 | r167 >
Date:21:40, 5 June 2012
Author:admin
Status:new
Tags:
Comment:
Fix DDraw shutdown crash
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)
  • /ddraw/glRenderer.h (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -209,7 +209,6 @@
210210 hDC = NULL;
211211 hRC = NULL;
212212 PBO = 0;
213 - dead = false;
214213 hasHWnd = false;
215214 dib.enabled = false;
216215 hWnd = hwnd;
@@ -646,7 +645,7 @@
647646 _InitGL((int)inputs[0],(int)inputs[1],(int)inputs[2],(int)inputs[3],(HWND)inputs[4],(glDirectDraw7*)inputs[5]);
648647 LeaveCriticalSection(&cs);
649648 SetEvent(busy);
650 - while(!dead)
 649+ while(0)
651650 {
652651 WaitForSingleObject(start,INFINITE);
653652 switch(opcode)
@@ -685,7 +684,7 @@
686685 PostMessage(hRenderWnd,WM_CLOSE,0,0);
687686 hRenderWnd = NULL;
688687 SetEvent(busy);
689 - dead = true;
 688+ return 0;
690689 break;
691690 case OP_CREATE:
692691 outputs[0] = (void*)_MakeTexture((GLint)inputs[0],(GLint)inputs[1],(GLint)inputs[2],(GLint)inputs[3],
Index: ddraw/glRenderer.h
@@ -125,7 +125,6 @@
126126 CRITICAL_SECTION cs;
127127 HANDLE busy;
128128 HANDLE start;
129 - bool dead;
130129 };
131130
132131 #endif //_GLRENDERER_H
\ No newline at end of file