Mercurial > sdl-ios-xcode
changeset 671:338a62f9a528
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 08 Aug 2003 20:09:15 +0000 |
parents | b8679559e432 |
children | 5955fa16d4b8 |
files | src/video/wincommon/SDL_wingl.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/wincommon/SDL_wingl.c Fri Aug 08 18:00:39 2003 +0000 +++ b/src/video/wincommon/SDL_wingl.c Fri Aug 08 20:09:15 2003 +0000 @@ -87,7 +87,7 @@ int pformat; const char * (WINAPI *wglGetExtensionsStringARB)(HDC) = 0; - hwnd = CreateWindow(NULL, "PFormat", WS_POPUP | WS_DISABLED, + hwnd = CreateWindow(SDL_Appname, SDL_Appname, WS_POPUP | WS_DISABLED, 0, 0, 10, 10, NULL, NULL, SDL_Instance,NULL); hdc = GetDC(hwnd); @@ -96,7 +96,9 @@ SetPixelFormat(hdc, pformat, &GL_pfd); hglrc = this->gl_data->wglCreateContext(hdc); - this->gl_data->wglMakeCurrent(hdc, hglrc); + if ( hglrc ) { + this->gl_data->wglMakeCurrent(hdc, hglrc); + } wglGetExtensionsStringARB = (const char * (WINAPI *)(HDC)) this->gl_data->wglGetProcAddress("wglGetExtensionsStringARB"); @@ -118,8 +120,10 @@ this->gl_data->wgl_arb_pixel_format = 0; } - this->gl_data->wglMakeCurrent(NULL, NULL); - this->gl_data->wglDeleteContext(hglrc); + if ( hglrc ) { + this->gl_data->wglMakeCurrent(NULL, NULL); + this->gl_data->wglDeleteContext(hglrc); + } ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); }