Modified: trunk/reactos/lib/dinput/device.c
Modified: trunk/reactos/lib/dinput/dinput_main.c
Modified: trunk/reactos/lib/dinput/joystick_linux.c
Modified: trunk/reactos/lib/dinput/mouse.c
--- trunk/reactos/lib/dinput/device.c 2005-02-12 21:03:08 UTC (rev 13514)
+++ trunk/reactos/lib/dinput/device.c 2005-02-12 21:07:16 UTC (rev 13515)
@@ -316,7 +316,7 @@
* instance id.
*/
((asked_format->rgodf[j].dwType & 0x00FFFF00) == DIDFT_ANYINSTANCE) ||
- (DIDFT_GETINSTANCE(wine_format->rgodf[i].dwType) == DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType)))) {
+ (wine_format->rgodf[i].dwType & asked_format->rgodf[j].dwType))) {
done[j] = 1;
--- trunk/reactos/lib/dinput/dinput_main.c 2005-02-12 21:03:08 UTC (rev 13514)
+++ trunk/reactos/lib/dinput/dinput_main.c 2005-02-12 21:07:16 UTC (rev 13515)
@@ -198,7 +198,7 @@
return 0;
}
-static char *_dump_DIDEVTYPE_value(DWORD dwDevType) {
+static const char *_dump_DIDEVTYPE_value(DWORD dwDevType) {
switch (dwDevType) {
case 0: return "All devices";
case DIDEVTYPE_MOUSE: return "DIDEVTYPE_MOUSE";
--- trunk/reactos/lib/dinput/joystick_linux.c 2005-02-12 21:03:08 UTC (rev 13514)
+++ trunk/reactos/lib/dinput/joystick_linux.c 2005-02-12 21:07:16 UTC (rev 13515)
@@ -304,7 +304,7 @@
int tokens = 0;
int axis = 0;
int pov = 0;
- char *delim = ",";
+ const char *delim = ",";
char * ptr;
TRACE("\"%s\" = \"%s\"\n", device->name, buffer);
@@ -1062,18 +1062,14 @@
*entries = 0;
nqtail = This->queue_tail;
while (len) {
- DWORD span = ((This->queue_head < nqtail) ? This->queue_len : This->queue_head) - nqtail;
- if (span > len)
- span = len;
-
/* Copy the buffered data into the application queue */
- memcpy(dod + *entries, This->data_queue + nqtail, span * dodsize);
+ memcpy((char *)dod + *entries * dodsize, This->data_queue + nqtail, dodsize);
/* Advance position */
- nqtail += span;
+ nqtail++;
if (nqtail >= This->queue_len)
nqtail -= This->queue_len;
- *entries += span;
- len -= span;
+ (*entries)++;
+ len--;
}
}
--- trunk/reactos/lib/dinput/mouse.c 2005-02-12 21:03:08 UTC (rev 13514)
+++ trunk/reactos/lib/dinput/mouse.c 2005-02-12 21:07:16 UTC (rev 13515)
@@ -951,18 +951,15 @@
*entries = 0;
nqtail = This->queue_tail;
while (len) {
- DWORD span = ((This->queue_head < nqtail) ? This->queue_len : This->queue_head) - nqtail;
- if (span > len)
- span = len;
-
/* Copy the buffered data into the application queue */
- memcpy(dod + *entries, This->data_queue + nqtail, span * dodsize);
+ memcpy((char *)dod + *entries * dodsize, This->data_queue + nqtail, dodsize);
/* Advance position */
- nqtail += span;
- if (nqtail >= This->queue_len) nqtail -= This->queue_len;
- *entries += span;
- len -= span;
+ nqtail++;
+ if (nqtail >= This->queue_len)
+ nqtail -= This->queue_len;
+ (*entries)++;
+ len--;
}
}
if (!(flags & DIGDD_PEEK))