Trying to fix some issues with the Helper Window. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Mon, 04 Aug 2008 15:34:22 +0000
branchgsoc2008_force_feedback
changeset 258538f14c05a92c
parent 2584 e8644f625d45
child 2586 d84c99f5401e
Trying to fix some issues with the Helper Window.
src/video/win32/SDL_win32window.c
     1.1 --- a/src/video/win32/SDL_win32window.c	Mon Aug 04 15:17:52 2008 +0000
     1.2 +++ b/src/video/win32/SDL_win32window.c	Mon Aug 04 15:34:22 2008 +0000
     1.3 @@ -32,6 +32,8 @@
     1.4  
     1.5  /* Fake window to help with DirectInput events. */
     1.6  HWND SDL_HelperWindow = NULL;
     1.7 +static const char *SDL_HelperWindowClassName = "SDLHelperWindowInputCatcher";
     1.8 +static const char *SDL_HelperWindowName = "SDLHelperWindowInputMsgWindow";
     1.9  static ATOM SDL_HelperWindowClass = 0;
    1.10  
    1.11  
    1.12 @@ -422,15 +424,13 @@
    1.13  SDL_HelperWindowCreate(void)
    1.14  {
    1.15     HINSTANCE hInstance = GetModuleHandleA(NULL);
    1.16 -   const char *class_name = "SDLHelperWindowInputCatcher";
    1.17 -   const char *win_name = "SDLHelperWindowInputMsgWindow";
    1.18     WNDCLASSEX wce;
    1.19  
    1.20     /* Create the class. */
    1.21     ZeroMemory(&wce, sizeof (wce));
    1.22     wce.cbSize = sizeof(WNDCLASSEX);
    1.23     wce.lpfnWndProc = NULL;
    1.24 -   wce.lpszClassName = (LPCWSTR) class_name;
    1.25 +   wce.lpszClassName = (LPCWSTR) SDL_HelperWindowClassName;
    1.26     wce.hInstance = hInstance;
    1.27  
    1.28     /* Register the class. */
    1.29 @@ -441,7 +441,8 @@
    1.30     }
    1.31  
    1.32     /* Create the window. */
    1.33 -   SDL_HelperWindow = CreateWindowExA(0, class_name, win_name, WS_OVERLAPPEDWINDOW,
    1.34 +   SDL_HelperWindow = CreateWindowExA(0, SDL_HelperWindowClassName,
    1.35 +         SDL_HelperWindowName, WS_OVERLAPPEDWINDOW,
    1.36           CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
    1.37           CW_USEDEFAULT, HWND_MESSAGE, NULL, hInstance, NULL);
    1.38     if (SDL_HelperWindow == NULL) {
    1.39 @@ -467,7 +468,7 @@
    1.40  
    1.41     /* Unregister the class. */
    1.42     if (SDL_HelperWindowClass) {
    1.43 -      UnregisterClassA(SDL_HelperWindowClass, GetModuleHandleA(NULL));
    1.44 +      UnregisterClassA(SDL_HelperWindowClassName, GetModuleHandleA(NULL));
    1.45        SDL_HelperWindowClass = 0;
    1.46     }
    1.47  }