Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed code for building with UNICODE and without C runtime
  • Loading branch information
slouken committed Aug 25, 2008
1 parent 270563a commit d42d4f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/video/win32/SDL_win32window.c
Expand Up @@ -32,8 +32,8 @@

/* Fake window to help with DirectInput events. */
HWND SDL_HelperWindow = NULL;
static const char *SDL_HelperWindowClassName = "SDLHelperWindowInputCatcher";
static const char *SDL_HelperWindowName = "SDLHelperWindowInputMsgWindow";
static WCHAR *SDL_HelperWindowClassName = TEXT("SDLHelperWindowInputCatcher");
static WCHAR *SDL_HelperWindowName = TEXT("SDLHelperWindowInputMsgWindow");
static ATOM SDL_HelperWindowClass = 0;


Expand Down Expand Up @@ -427,21 +427,21 @@ SDL_HelperWindowCreate(void)
WNDCLASSEX wce;

/* Create the class. */
ZeroMemory(&wce, sizeof (wce));
SDL_zero(wce);
wce.cbSize = sizeof(WNDCLASSEX);
wce.lpfnWndProc = DefWindowProcA;
wce.lpszClassName = (LPCWSTR) SDL_HelperWindowClassName;
wce.hInstance = hInstance;

/* Register the class. */
SDL_HelperWindowClass = RegisterClassExA(&wce);
SDL_HelperWindowClass = RegisterClassEx(&wce);
if (SDL_HelperWindowClass == 0) {
SDL_SetError("Unable to create Helper Window Class: error %d.", GetLastError());
return -1;
}

/* Create the window. */
SDL_HelperWindow = CreateWindowExA(0, SDL_HelperWindowClassName,
SDL_HelperWindow = CreateWindowEx(0, SDL_HelperWindowClassName,
SDL_HelperWindowName, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, HWND_MESSAGE, NULL, hInstance, NULL);
Expand All @@ -468,7 +468,7 @@ SDL_HelperWindowDestroy(void)

/* Unregister the class. */
if (SDL_HelperWindowClass) {
UnregisterClassA(SDL_HelperWindowClassName, GetModuleHandleA(NULL));
UnregisterClass(SDL_HelperWindowClassName, GetModuleHandleA(NULL));
SDL_HelperWindowClass = 0;
}
}
Expand Down

0 comments on commit d42d4f6

Please sign in to comment.