[SVN] r4033 - branches/gsoc2008_force_feedback/src/video/win32
svn-owner at libsdl.org
svn-owner at libsdl.org
Mon Aug 25 02:58:14 PDT 2008
Author: slouken
Date: 2008-08-25 02:58:14 -0700 (Mon, 25 Aug 2008)
New Revision: 4033
Modified:
branches/gsoc2008_force_feedback/src/video/win32/SDL_win32window.c
Log:
Fixed code for building with UNICODE and without C runtime
Modified: branches/gsoc2008_force_feedback/src/video/win32/SDL_win32window.c
===================================================================
--- branches/gsoc2008_force_feedback/src/video/win32/SDL_win32window.c 2008-08-25 09:55:03 UTC (rev 4032)
+++ branches/gsoc2008_force_feedback/src/video/win32/SDL_win32window.c 2008-08-25 09:58:14 UTC (rev 4033)
@@ -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;
}
}
More information about the commits
mailing list