# HG changeset patch # User Sam Lantinga # Date 1219658294 0 # Node ID 7961f1f74dc8a1dcade702909127c5e27d1dab1f # Parent 6d705ec89fb685d78c248c184432eb73a3970ef0 Fixed code for building with UNICODE and without C runtime diff -r 6d705ec89fb6 -r 7961f1f74dc8 src/video/win32/SDL_win32window.c --- a/src/video/win32/SDL_win32window.c Mon Aug 25 09:51:02 2008 +0000 +++ b/src/video/win32/SDL_win32window.c Mon Aug 25 09:58:14 2008 +0000 @@ -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; @@ -427,21 +427,21 @@ 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); @@ -468,7 +468,7 @@ /* Unregister the class. */ if (SDL_HelperWindowClass) { - UnregisterClassA(SDL_HelperWindowClassName, GetModuleHandleA(NULL)); + UnregisterClass(SDL_HelperWindowClassName, GetModuleHandleA(NULL)); SDL_HelperWindowClass = 0; } }