annotate src/video/win32/SDL_win32mouse.c @ 3768:1b87a8beab9d gsoc2008_manymouse

Project part1
author Szymon Wilczek <kazeuser@gmail.com>
date Wed, 30 Jul 2008 16:09:24 +0000
parents c121d94672cb
children 81b649bad6d2
rev   line source
3768
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
1 /*
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
2 SDL - Simple DirectMedia Layer
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
4
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
5 This library is free software; you can redistribute it and/or
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
6 modify it under the terms of the GNU Lesser General Public
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
7 License as published by the Free Software Foundation; either
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
9
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
10 This library is distributed in the hope that it will be useful,
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
13 Lesser General Public License for more details.
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
14
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
15 You should have received a copy of the GNU Lesser General Public
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
16 License along with this library; if not, write to the Free Software
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
18
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
19 Sam Lantinga
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
20 slouken@libsdl.org
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
21 */
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
22
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
23 #if (_WIN32_WINNT < 0x0501)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
24 #undef _WIN32_WINNT
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
25 #define _WIN32_WINNT 0x0501
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
26 #endif
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
27
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
28 #include "SDL_config.h"
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
29
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
30 #include "SDL_win32video.h"
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
31
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
32 #include "../../events/SDL_mouse_c.h"
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
33
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
34 extern int total_mice;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
35
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
36 extern HANDLE* mice;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
37
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
38 extern int total_mice;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
39
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
40 RAWINPUTDEVICE *Rid=NULL;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
41
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
42 void
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
43 WIN_InitMouse(_THIS)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
44 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
45 int index=0;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
46 RAWINPUTDEVICELIST *deviceList=NULL;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
47 int devCount=0;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
48 int i;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
49 int tmp=0;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
50 char* buffer=NULL;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
51
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
52 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
53
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
54 if(GetRawInputDeviceList(NULL,&devCount,sizeof(RAWINPUTDEVICELIST)))
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
55 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
56 return;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
57 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
58 else
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
59 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
60 deviceList = SDL_malloc(sizeof(RAWINPUTDEVICELIST)*devCount);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
61 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
62
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
63 GetRawInputDeviceList(deviceList,&devCount,sizeof(RAWINPUTDEVICELIST));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
64
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
65 mice = SDL_malloc(devCount*sizeof(HANDLE));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
66
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
67 for(i=0;i<devCount;++i)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
68 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
69 int j;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
70 char *default_device_name="Pointing device xx";
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
71 const char *reg_key_root = "System\\CurrentControlSet\\Enum\\";
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
72 char *device_name=SDL_malloc(256*sizeof(char));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
73 char *key_name=NULL;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
74 char *tmp_name=NULL;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
75 LONG rc = 0;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
76 HKEY hkey;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
77 DWORD regtype = REG_SZ;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
78 DWORD out=256*sizeof(char);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
79 SDL_Mouse mouse;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
80 if(deviceList[i].dwType!=RIM_TYPEMOUSE)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
81 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
82 continue;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
83 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
84 if(GetRawInputDeviceInfoA(deviceList[i].hDevice, RIDI_DEVICENAME, NULL, &tmp)<0)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
85 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
86 continue;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
87 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
88 buffer = SDL_malloc((tmp+1)*sizeof(char));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
89 key_name = SDL_malloc(tmp + sizeof(reg_key_root)*sizeof(char));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
90
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
91 if(GetRawInputDeviceInfoA(deviceList[i].hDevice, RIDI_DEVICENAME, buffer, &tmp)<0)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
92 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
93 continue;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
94 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
95
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
96 buffer+=4;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
97 tmp-=4;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
98
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
99 tmp_name=buffer;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
100 for(j=0;j<tmp;++j)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
101 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
102 if(*tmp_name=='#')
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
103 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
104 *tmp_name='\\';
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
105 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
106 else if(*tmp_name=='{')
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
107 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
108 break;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
109 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
110 ++tmp_name;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
111 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
112 *tmp_name='\0';
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
113
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
114 SDL_memcpy(key_name, reg_key_root, SDL_strlen (reg_key_root));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
115 SDL_memcpy(key_name + (SDL_strlen (reg_key_root)), buffer, j + 1);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
116
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
117 rc = RegOpenKeyExA(HKEY_LOCAL_MACHINE, key_name, 0, KEY_READ, &hkey);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
118
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
119 if (rc != ERROR_SUCCESS)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
120 return;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
121
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
122 rc = RegQueryValueExA(hkey, "DeviceDesc", NULL, &regtype, device_name, &out);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
123 RegCloseKey(hkey);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
124 if (rc != ERROR_SUCCESS)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
125 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
126 return;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
127 //SDL_memcpy(device_name, default_device_name, SDL_strlen(default_device_name));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
128 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
129 //device_name[254] = '\0';
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
130
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
131 mice[index]=deviceList[i].hDevice;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
132 SDL_zero(mouse);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
133 SDL_SetIndexId(index,index);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
134 data->mouse = SDL_AddMouse(&mouse, index,device_name,0,0);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
135 //data->mouse = SDL_AddMouse(&mouse, index,key_name,0,0);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
136 ++index;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
137
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
138 SDL_free(buffer);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
139 SDL_free(key_name);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
140 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
141 Rid = SDL_malloc(sizeof(RAWINPUTDEVICE));
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
142 /*Rid[0].usUsagePage = 0x01;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
143 Rid[0].usUsage = 0x02;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
144 Rid[0].dwFlags = RIDEV_INPUTSINK; // adds HID mouse and also ignores legacy mouse messages
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
145 Rid[0].hwndTarget = NULL;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
146
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
147 RegisterRawInputDevices(Rid, 1, sizeof(Rid[0]));*/
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
148
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
149 total_mice=index;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
150 SDL_free(deviceList);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
151 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
152
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
153 void
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
154 WIN_QuitMouse(_THIS)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
155 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
156 int i;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
157 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
158 for(i=0;i<total_mice;++i)
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
159 {
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
160 SDL_DelMouse(i);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
161 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
162 SDL_free(Rid);
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
163 }
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
164
1b87a8beab9d Project part1
Szymon Wilczek <kazeuser@gmail.com>
parents: 1895
diff changeset
165 /* vi: set ts=4 sw=4 expandtab: */