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
3e3beee0
Commit
3e3beee0
authored
Sep 09, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Stop using the cached_modes_mutex for get_default_bpp.
parent
981d5926
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
display.c
dlls/winemac.drv/display.c
+6
-10
No files found.
dlls/winemac.drv/display.c
View file @
3e3beee0
...
...
@@ -51,9 +51,6 @@ static const WCHAR initial_mode_keyW[] = {'I','n','i','t','i','a','l',' ','D','i
' '
,
'M'
,
'o'
,
'd'
,
'e'
};
static
const
WCHAR
pixelencodingW
[]
=
{
'P'
,
'i'
,
'x'
,
'e'
,
'l'
,
'E'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
static
int
cached_default_mode_bpp
;
static
pthread_mutex_t
cached_modes_mutex
=
PTHREAD_MUTEX_INITIALIZER
;
static
BOOL
inited_original_display_mode
;
...
...
@@ -400,22 +397,23 @@ static BOOL display_mode_matches_descriptor(CGDisplayModeRef mode, const struct
static
int
get_default_bpp
(
void
)
{
static
int
cached
;
int
ret
;
if
(
!
cached
_default_mode_bpp
)
if
(
!
cached
)
{
CGDisplayModeRef
mode
=
CGDisplayCopyDisplayMode
(
kCGDirectMainDisplay
);
if
(
mode
)
{
cached
_default_mode_bpp
=
display_mode_bits_per_pixel
(
mode
);
cached
=
display_mode_bits_per_pixel
(
mode
);
CFRelease
(
mode
);
}
if
(
!
cached
_default_mode_bpp
)
cached
_default_mode_bpp
=
32
;
if
(
!
cached
)
cached
=
32
;
}
ret
=
cached
_default_mode_bpp
;
ret
=
cached
;
TRACE
(
" -> %d
\n
"
,
ret
);
return
ret
;
...
...
@@ -800,9 +798,7 @@ LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, HWND hwnd, DWORD flags, L
return
DISP_CHANGE_FAILED
;
}
pthread_mutex_lock
(
&
cached_modes_mutex
);
bpp
=
get_default_bpp
();
pthread_mutex_unlock
(
&
cached_modes_mutex
);
desc
=
create_original_display_mode_descriptor
(
macdrv_displays
[
0
].
displayID
);
...
...
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