Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a9d42f44
Commit
a9d42f44
authored
May 05, 2005
by
Lionel Ulmer
Committed by
Alexandre Julliard
May 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- do not flush the buffer when the application only wants to peek the
number of elements in the queue - trace the GetDeviceState values before they are reset
parent
4598cde6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
mouse.c
dlls/dinput/mouse.c
+15
-9
No files found.
dlls/dinput/mouse.c
View file @
a9d42f44
...
...
@@ -690,6 +690,9 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
EnterCriticalSection
(
&
(
This
->
crit
));
TRACE
(
"(this=%p,0x%08lx,%p):
\n
"
,
This
,
len
,
ptr
);
TRACE
(
"(X: %ld - Y: %ld - Z: %ld L: %02x M: %02x R: %02x)
\n
"
,
This
->
m_state
.
lX
,
This
->
m_state
.
lY
,
This
->
m_state
.
lZ
,
This
->
m_state
.
rgbButtons
[
0
],
This
->
m_state
.
rgbButtons
[
2
],
This
->
m_state
.
rgbButtons
[
1
]);
/* Copy the current mouse state */
fill_DataFormat
(
ptr
,
&
(
This
->
m_state
),
This
->
wine_df
);
...
...
@@ -716,15 +719,11 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
LeaveCriticalSection
(
&
(
This
->
crit
));
TRACE
(
"(X: %ld - Y: %ld - Z: %ld L: %02x M: %02x R: %02x)
\n
"
,
This
->
m_state
.
lX
,
This
->
m_state
.
lY
,
This
->
m_state
.
lZ
,
This
->
m_state
.
rgbButtons
[
0
],
This
->
m_state
.
rgbButtons
[
2
],
This
->
m_state
.
rgbButtons
[
1
]);
return
DI_OK
;
}
/******************************************************************************
* GetDevice
State
: gets buffered input data.
* GetDevice
Data
: gets buffered input data.
*/
static
HRESULT
WINAPI
SysMouseAImpl_GetDeviceData
(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
dodsize
,
...
...
@@ -734,9 +733,11 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
)
{
SysMouseImpl
*
This
=
(
SysMouseImpl
*
)
iface
;
DWORD
len
;
int
nqtail
;
int
nqtail
=
0
;
TRACE
(
"(%p)->(dods=%ld,entries=%ld,fl=0x%08lx)
\n
"
,
This
,
dodsize
,
*
entries
,
flags
);
TRACE
(
"(%p)->(dods=%ld,dod=%p,entries=%p (%ld)%s,fl=0x%08lx%s)
\n
"
,
This
,
dodsize
,
dod
,
entries
,
*
entries
,
*
entries
==
INFINITE
?
" (INFINITE)"
:
""
,
flags
,
(
flags
&
DIGDD_PEEK
)
?
" (DIGDD_PEEK)"
:
""
);
if
(
This
->
acquired
==
0
)
{
WARN
(
" application tries to get data from an unacquired device !
\n
"
);
...
...
@@ -747,16 +748,21 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
len
=
((
This
->
queue_head
<
This
->
queue_tail
)
?
This
->
queue_len
:
0
)
+
(
This
->
queue_head
-
This
->
queue_tail
);
if
(
len
>
*
entries
)
len
=
*
entries
;
if
(
(
*
entries
!=
INFINITE
)
&&
(
len
>
*
entries
)
)
len
=
*
entries
;
if
(
dod
==
NULL
)
{
*
entries
=
len
;
if
(
!
(
flags
&
DIGDD_PEEK
))
{
if
(
len
)
TRACE
(
"Application discarding %ld event(s).
\n
"
,
len
);
*
entries
=
len
;
nqtail
=
This
->
queue_tail
+
len
;
while
(
nqtail
>=
This
->
queue_len
)
nqtail
-=
This
->
queue_len
;
}
else
{
TRACE
(
"Telling application that %ld event(s) are in the queue.
\n
"
,
len
);
}
}
else
{
if
(
dodsize
<
sizeof
(
DIDEVICEOBJECTDATA_DX3
))
{
ERR
(
"Wrong structure size !
\n
"
);
LeaveCriticalSection
(
&
(
This
->
crit
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment