Don't fail initialization if the helper window class already exists.
authorSam Lantinga <slouken@libsdl.org>
Sat, 22 Feb 2014 17:39:35 -0800
changeset 8238 9e09e1561e00
parent 8237 6cc44a5d9eef
child 8239 05cbb1cb4f27
Don't fail initialization if the helper window class already exists.
src/video/windows/SDL_windowswindow.c
--- a/src/video/windows/SDL_windowswindow.c	Sat Feb 22 17:32:18 2014 -0800
+++ b/src/video/windows/SDL_windowswindow.c	Sat Feb 22 17:39:35 2014 -0800
@@ -673,7 +673,7 @@
 
     /* Register the class. */
     SDL_HelperWindowClass = RegisterClass(&wce);
-    if (SDL_HelperWindowClass == 0) {
+    if (SDL_HelperWindowClass == 0 && GetLastError() != ERROR_CLASS_ALREADY_EXISTS) {
         return WIN_SetError("Unable to create Helper Window Class");
     }