mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
Sync to Wine-20050211
Carlos Lozano <clozano@andago.com> - Fix regression in Fallout game. Remi Assailly <remi.assailly@free.fr> - char -> const char fixes. Robert Reif <reif@earthlink.net> - Copy data structures one at a time using supplied size. svn path=/trunk/; revision=13515
This commit is contained in:
parent
b0c3deb666
commit
a8037e241c
4 changed files with 13 additions and 20 deletions
|
@ -316,7 +316,7 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a
|
|||
* 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;
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPU
|
|||
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";
|
||||
|
|
|
@ -304,7 +304,7 @@ static HRESULT setup_dinput_options(JoystickImpl * device)
|
|||
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 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(
|
|||
*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--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -951,18 +951,15 @@ getmousesvalue(iface);
|
|||
*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))
|
||||
|
|
Loading…
Reference in a new issue