Browse Source

Don't fail initialization if the helper window class already exists.

Sam Lantinga 11 năm trước cách đây
mục cha
commit
b80f4f9e50
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/video/windows/SDL_windowswindow.c

+ 1 - 1
src/video/windows/SDL_windowswindow.c

@@ -673,7 +673,7 @@ SDL_HelperWindowCreate(void)
 
     /* 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");
     }