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

This commit is contained in:
Sam Lantinga 2014-02-22 17:39:35 -08:00
parent a5f52ac5a8
commit b80f4f9e50

View File

@ -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");
}