Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_win32window.c @ 2714:1d1be6137875
Merged last minute fixes from force feedback branch (r4031, r4033, r4034)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 25 Aug 2008 10:04:06 +0000 |
parents | 0906692aa6a4 |
children | 0e2b65f32298 |
line wrap: on
line diff
--- a/src/video/win32/SDL_win32window.c Mon Aug 25 09:55:03 2008 +0000 +++ b/src/video/win32/SDL_win32window.c Mon Aug 25 10:04:06 2008 +0000 @@ -49,8 +49,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; static int @@ -487,14 +487,14 @@ WNDCLASSEX wce; /* Create the class. */ - SDL_memset(&wce, 0, 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()); @@ -502,12 +502,12 @@ } /* Create the window. */ - SDL_HelperWindow = CreateWindowExA(0, SDL_HelperWindowClassName, - SDL_HelperWindowName, - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, HWND_MESSAGE, NULL, - hInstance, NULL); + SDL_HelperWindow = CreateWindowEx(0, SDL_HelperWindowClassName, + SDL_HelperWindowName, + WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, HWND_MESSAGE, NULL, + hInstance, NULL); if (SDL_HelperWindow == NULL) { SDL_SetError("Unable to create Helper Window: error %d.", GetLastError()); @@ -532,7 +532,7 @@ /* Unregister the class. */ if (SDL_HelperWindowClass) { - UnregisterClassA(SDL_HelperWindowClassName, GetModuleHandleA(NULL)); + UnregisterClass(SDL_HelperWindowClassName, GetModuleHandleA(NULL)); SDL_HelperWindowClass = 0; } }