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
e0407318
Commit
e0407318
authored
May 13, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Directly use ntdll for display device mutex.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5c9eb190
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
display.c
dlls/winemac.drv/display.c
+10
-6
No files found.
dlls/winemac.drv/display.c
View file @
e0407318
...
...
@@ -74,17 +74,21 @@ static BOOL inited_original_display_mode;
static
HANDLE
get_display_device_init_mutex
(
void
)
{
static
const
WCHAR
init_mutexW
[]
=
{
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'_'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'_'
,
'i'
,
'n'
,
'i'
,
't'
,
0
};
HANDLE
mutex
=
CreateMutexW
(
NULL
,
FALSE
,
init_mutexW
);
WaitForSingleObject
(
mutex
,
INFINITE
);
static
const
WCHAR
init_mutexW
[]
=
{
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'_'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'_'
,
'i'
,
'n'
,
'i'
,
't'
};
UNICODE_STRING
name
=
{
sizeof
(
init_mutexW
),
sizeof
(
init_mutexW
),
(
WCHAR
*
)
init_mutexW
};
OBJECT_ATTRIBUTES
attr
;
HANDLE
mutex
=
0
;
InitializeObjectAttributes
(
&
attr
,
&
name
,
OBJ_OPENIF
,
NULL
,
NULL
);
NtCreateMutant
(
&
mutex
,
MUTEX_ALL_ACCESS
,
&
attr
,
FALSE
);
if
(
mutex
)
NtWaitForSingleObject
(
mutex
,
FALSE
,
NULL
);
return
mutex
;
}
static
void
release_display_device_init_mutex
(
HANDLE
mutex
)
{
ReleaseMutex
(
mutex
);
CloseHandl
e
(
mutex
);
NtReleaseMutant
(
mutex
,
NULL
);
NtClos
e
(
mutex
);
}
static
BOOL
get_display_device_reg_key
(
const
WCHAR
*
device_name
,
WCHAR
*
key
,
unsigned
len
)
...
...
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