comparison src/video/win32/SDL_win32mouse.c @ 3253:5d7ef5970073

Fixed issues building 64-bit Windows binary
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Sep 2009 23:37:35 +0000
parents 0d12e8f1de3c
children f7b03b6838cb
comparison
equal deleted inserted replaced
3252:d2465e21f103 3253:5d7ef5970073
42 { 42 {
43 int index = 0; 43 int index = 0;
44 RAWINPUTDEVICELIST *deviceList = NULL; 44 RAWINPUTDEVICELIST *deviceList = NULL;
45 int devCount = 0; 45 int devCount = 0;
46 int i; 46 int i;
47 int tmp = 0; 47 UINT tmp = 0;
48 char *buffer = NULL; 48 char *buffer = NULL;
49 char *tab = "wacom"; /* since windows does't give us handles to tablets, we have to detect a tablet by it's name */ 49 char *tab = "wacom"; /* since windows does't give us handles to tablets, we have to detect a tablet by it's name */
50 const char *rdp = "rdp_mou"; 50 const char *rdp = "rdp_mou";
51 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; 51 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
52 52
69 mice = SDL_malloc(devCount * sizeof(HANDLE)); 69 mice = SDL_malloc(devCount * sizeof(HANDLE));
70 70
71 /* we're getting the details of the devices */ 71 /* we're getting the details of the devices */
72 for (i = 0; i < devCount; ++i) { 72 for (i = 0; i < devCount; ++i) {
73 int is_rdp = 0; 73 int is_rdp = 0;
74 int j; 74 UINT j;
75 int k; 75 UINT k;
76 char *default_device_name = "Pointing device xx"; 76 char *default_device_name = "Pointing device xx";
77 const char *reg_key_root = "System\\CurrentControlSet\\Enum\\"; 77 const char *reg_key_root = "System\\CurrentControlSet\\Enum\\";
78 char *device_name = SDL_malloc(256 * sizeof(char)); 78 char *device_name = SDL_malloc(256 * sizeof(char));
79 char *key_name = NULL; 79 char *key_name = NULL;
80 char *tmp_name = NULL; 80 char *tmp_name = NULL;
81 LONG rc = 0; 81 LONG rc = 0;
82 HKEY hkey; 82 HKEY hkey;
83 DWORD regtype = REG_SZ; 83 DWORD regtype = REG_SZ;
84 DWORD out = 256 * sizeof(char); 84 DWORD out = 256 * sizeof(char);
85 SDL_Mouse mouse; 85 SDL_Mouse mouse;
86 int l; 86 size_t l;
87 if (deviceList[i].dwType != RIM_TYPEMOUSE) { /* if a device isn't a mouse type we don't want it */ 87 if (deviceList[i].dwType != RIM_TYPEMOUSE) { /* if a device isn't a mouse type we don't want it */
88 continue; 88 continue;
89 } 89 }
90 if (GetRawInputDeviceInfoA 90 if (GetRawInputDeviceInfoA
91 (deviceList[i].hDevice, RIDI_DEVICENAME, NULL, &tmp) < 0) { 91 (deviceList[i].hDevice, RIDI_DEVICENAME, NULL, &tmp) < 0) {