diff src/haptic/win32/SDL_syshaptic.c @ 2580:64fa227c01ce gsoc2008_force_feedback

Added the concept of the HelperWindow to help with DirectInput.
author Edgar Simo <bobbens@gmail.com>
date Mon, 04 Aug 2008 11:22:01 +0000
parents 72c4ac55f73c
children b4b3beaea5b5
line wrap: on
line diff
--- a/src/haptic/win32/SDL_syshaptic.c	Sun Aug 03 10:25:25 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Mon Aug 04 11:22:01 2008 +0000
@@ -36,7 +36,9 @@
 #include <dinput.h>
 #include <dxerr.h>
 #ifdef _MSC_VER
-#   pragma comment (lib, "dxerr.lib")
+#  pragma comment (lib, "dinput8.lib")
+#  pragma comment (lib, "dxguid.lib")
+#  pragma comment (lib, "dxerr.lib")
 #endif /* _MSC_VER */
 
     /* an ISO hack for VisualC++ */
@@ -88,7 +90,7 @@
  * External stuff.
  */
 extern HINSTANCE SDL_Instance;
-extern HWND SDL_Window;
+extern HWND SDL_HelperWindow;
 
 
 /*
@@ -274,7 +276,7 @@
 
    /* Grab it exclusively to use force feedback stuff. */
    ret =IDirectInputDevice2_SetCooperativeLevel( haptic->hwdata->device,
-                                                 SDL_Window,
+                                                 SDL_HelperWindow,
                                                  DISCL_EXCLUSIVE | DISCL_BACKGROUND );
    if (FAILED(ret)) {
       DI_SetError("Setting cooperative level to exclusive",ret);