From 740730d1fc5e3a42ca9150bb9699ac9b327b852e Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Thu, 24 Mar 2011 17:30:22 +0200 Subject: [PATCH] Fix window size restore issues with Wine --- main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 19f3630..6e74259 100644 --- a/main.c +++ b/main.c @@ -171,11 +171,6 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD { printf("DirectDraw::SetDisplayMode(This=%p, width=%d, height=%d, bpp=%d)\n", This, (unsigned int)width, (unsigned int)height, (unsigned int)bpp); - if(This->render.run) - { - return DD_OK; - } - This->render.run = TRUE; /* currently we only support 8 bit modes */ @@ -248,7 +243,10 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD } } - This->render.thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)render_main, NULL, 0, NULL); + if(This->render.thread == NULL) + { + This->render.thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)render_main, NULL, 0, NULL); + } return DD_OK; }