Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
685a3e6a
Commit
685a3e6a
authored
Dec 28, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Release critical section before warping mouse.
parent
f57bf100
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
mouse.c
dlls/dinput/mouse.c
+4
-8
No files found.
dlls/dinput/mouse.c
View file @
685a3e6a
...
...
@@ -511,15 +511,15 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
if
(
This
->
base
.
acquired
==
0
)
return
DIERR_NOTACQUIRED
;
EnterCriticalSection
(
&
This
->
base
.
crit
);
TRACE
(
"(this=%p,0x%08x,%p):
\n
"
,
This
,
len
,
ptr
);
TRACE
(
"(X: %d - Y: %d - Z: %d 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
]);
EnterCriticalSection
(
&
This
->
base
.
crit
);
/* Copy the current mouse state */
fill_DataFormat
(
ptr
,
&
(
This
->
m_state
),
&
This
->
base
.
data_format
);
/* Initialize the buffer when in relative mode */
if
(
!
(
This
->
base
.
data_format
.
user_df
->
dwFlags
&
DIDF_ABSAXIS
))
{
...
...
@@ -527,23 +527,19 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
This
->
m_state
.
lY
=
0
;
This
->
m_state
.
lZ
=
0
;
}
LeaveCriticalSection
(
&
This
->
base
.
crit
);
/* Check if we need to do a mouse warping */
if
(
This
->
need_warp
&&
(
GetCurrentTime
()
-
This
->
last_warped
>
10
))
{
if
(
!
dinput_window_check
(
This
))
{
LeaveCriticalSection
(
&
This
->
base
.
crit
);
return
DIERR_GENERIC
;
}
TRACE
(
"Warping mouse to %d - %d
\n
"
,
This
->
mapped_center
.
x
,
This
->
mapped_center
.
y
);
SetCursorPos
(
This
->
mapped_center
.
x
,
This
->
mapped_center
.
y
);
This
->
last_warped
=
GetCurrentTime
();
This
->
need_warp
=
FALSE
;
}
LeaveCriticalSection
(
&
This
->
base
.
crit
);
return
DI_OK
;
}
...
...
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