Index: ddraw/glRenderWindow.cpp |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 |
|
54 | 54 | glRenderWindow::glRenderWindow(int width, int height, bool fullscreen, HWND parent, glDirectDraw7 *glDD7, bool devwnd)
|
55 | 55 | {
|
| 56 | + DWORD threadid;
|
56 | 57 | ddInterface = glDD7;
|
57 | 58 | this->width = width;
|
58 | 59 | this->height = height;
|
— | — | @@ -59,7 +60,7 @@ |
60 | 61 | this->device = devwnd;
|
61 | 62 | hParentWnd = parent;
|
62 | 63 | ReadyEvent = CreateEvent(NULL,false,false,NULL);
|
63 | | - hThread = CreateThread(NULL,0,ThreadEntry,this,0,NULL);
|
| 64 | + hThread = CreateThread(NULL,0,ThreadEntry,this,0,&threadid);
|
64 | 65 | WaitForObjectAndMessages(ReadyEvent);
|
65 | 66 | CloseHandle(ReadyEvent);
|
66 | 67 | ReadyEvent = NULL;
|
— | — | @@ -149,6 +150,9 @@ |
150 | 151 | {
|
151 | 152 | HWND hParent;
|
152 | 153 | HCURSOR cursor;
|
| 154 | + #ifdef _TRACE
|
| 155 | + DWORD threadid;
|
| 156 | + #endif
|
153 | 157 | switch(msg)
|
154 | 158 | {
|
155 | 159 | case WM_CREATE:
|
— | — | @@ -187,7 +191,7 @@ |
188 | 192 | case WM_HOTKEY:
|
189 | 193 | #ifdef _TRACE
|
190 | 194 | trace_end = TRUE;
|
191 | | - CreateThread(NULL,0,BeepThread,NULL,0,NULL);
|
| 195 | + CreateThread(NULL,0,BeepThread,NULL,0,&threadid);
|
192 | 196 | UnregisterHotKey(hWnd,1);
|
193 | 197 | hotkeyregistered = false;
|
194 | 198 | #else
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -1687,6 +1687,7 @@ |
1688 | 1688 | This->busy = CreateEvent(NULL,FALSE,FALSE,NULL);
|
1689 | 1689 | This->start = CreateEvent(NULL,FALSE,FALSE,NULL);
|
1690 | 1690 | HWND hTempWnd;
|
| 1691 | + DWORD threadid;
|
1691 | 1692 | if(fullscreen)
|
1692 | 1693 | {
|
1693 | 1694 | switch (dxglcfg.fullmode)
|
— | — | @@ -1878,7 +1879,7 @@ |
1879 | 1880 | This->inputs[6] = glDD7;
|
1880 | 1881 | This->inputs[7] = This;
|
1881 | 1882 | This->inputs[8] = (void*)devwnd;
|
1882 | | - This->hThread = CreateThread(NULL, 0, glRenderer_ThreadEntry, This->inputs, 0, NULL);
|
| 1883 | + This->hThread = CreateThread(NULL, 0, glRenderer_ThreadEntry, This->inputs, 0, &threadid);
|
1883 | 1884 | WaitForSingleObject(This->busy,INFINITE);
|
1884 | 1885 | }
|
1885 | 1886 |
|
Index: dxglcfg/dxglcfg.cpp |
— | — | @@ -3136,12 +3136,13 @@ |
3137 | 3137 | HWND hProgressWnd;
|
3138 | 3138 | WNDCLASSEX wndclass;
|
3139 | 3139 | HWND hTempWnd;
|
| 3140 | + DWORD threadid;
|
3140 | 3141 | switch (Msg)
|
3141 | 3142 | {
|
3142 | 3143 | case WM_INITDIALOG:
|
3143 | 3144 | hProgressWnd = NULL;
|
3144 | | - CreateThread(NULL, 0, ProgressThread, &hProgressWnd, 0, NULL);
|
3145 | | - while (hProgressWnd == NULL) Sleep(10);
|
| 3145 | + CreateThread(NULL, 0, ProgressThread, &hProgressWnd, 0, &threadid);
|
| 3146 | + while (hProgressWnd == NULL) Sleep(100);
|
3146 | 3147 | hDialog = hWnd;
|
3147 | 3148 | ZeroMemory(&wndclass, sizeof(WNDCLASSEX));
|
3148 | 3149 | wndclass.cbSize = sizeof(WNDCLASSEX);
|
Index: dxglcfg/timer.cpp |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 |
|
56 | 56 | void StartTimer(HWND hWnd, UINT message, double framerate)
|
57 | 57 | {
|
| 58 | + DWORD threadid;
|
58 | 59 | TimerhWnd = hWnd;
|
59 | 60 | wndMessage = message;
|
60 | 61 | delay = (1.0/framerate)*1000.0;
|
— | — | @@ -60,7 +61,7 @@ |
61 | 62 | stoptimer = false;
|
62 | 63 | if(!hThread)
|
63 | 64 | {
|
64 | | - hThread = CreateThread(NULL,0,TimerThread,NULL,0,NULL);
|
| 65 | + hThread = CreateThread(NULL,0,TimerThread,NULL,0,&threadid);
|
65 | 66 | CloseHandle(hThread);
|
66 | 67 | }
|
67 | 68 | }
|