diff options
-rw-r--r-- | src/wgl/sharedtex_mt.c | 6 | ||||
-rw-r--r-- | src/wgl/wglinfo.c | 1 | ||||
-rw-r--r-- | src/wgl/wglthreads.c | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/wgl/sharedtex_mt.c b/src/wgl/sharedtex_mt.c index 161b2bba..073b1005 100644 --- a/src/wgl/sharedtex_mt.c +++ b/src/wgl/sharedtex_mt.c @@ -118,7 +118,7 @@ initMainthread(void) { WNDCLASS wc = {0}; HWND win; - PIXELFORMATDESCRIPTOR pfd = {0}; + PIXELFORMATDESCRIPTOR pfd; int visinfo; wc.lpfnWndProc = WndProc; @@ -147,6 +147,7 @@ initMainthread(void) Error("Couldn't obtain HDC"); } + memset(&pfd, 0, sizeof(pfd)); pfd.cColorBits = 24; pfd.cDepthBits = 24; pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; @@ -405,7 +406,7 @@ threadRunner (void *arg) { struct thread_init_arg *tia = (struct thread_init_arg *) arg; struct window *win; - PIXELFORMATDESCRIPTOR pfd = {0}; + PIXELFORMATDESCRIPTOR pfd; int visinfo; win = &Windows[tia->id]; @@ -419,6 +420,7 @@ threadRunner (void *arg) if(tia->id > 0) WaitForSingleObject(Windows[tia->id - 1].hEventInitialised, INFINITE); + memset(&pfd, 0, sizeof(pfd)); pfd.cColorBits = 24; pfd.cDepthBits = 24; pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; diff --git a/src/wgl/wglinfo.c b/src/wgl/wglinfo.c index 30b13079..b6285eca 100644 --- a/src/wgl/wglinfo.c +++ b/src/wgl/wglinfo.c @@ -123,6 +123,7 @@ print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine, return; } + memset(&pfd, 0, sizeof(pfd)); pfd.cColorBits = 3; pfd.cRedBits = 1; pfd.cGreenBits = 1; diff --git a/src/wgl/wglthreads.c b/src/wgl/wglthreads.c index 27dca10f..2ee42e2e 100644 --- a/src/wgl/wglthreads.c +++ b/src/wgl/wglthreads.c @@ -430,7 +430,7 @@ create_window(struct winthread *wt, HGLRC shareCtx) int ypos = (wt->Index / 8) * (width + 20); HWND win; HDC hdc; - PIXELFORMATDESCRIPTOR pfd = {0}; + PIXELFORMATDESCRIPTOR pfd; int visinfo; HGLRC ctx; @@ -463,6 +463,7 @@ create_window(struct winthread *wt, HGLRC shareCtx) Error("Couldn't obtain HDC"); } + memset(&pfd, 0, sizeof(pfd)); pfd.cColorBits = 24; pfd.cDepthBits = 24; pfd.dwFlags = PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; |