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
40c5184a
Commit
40c5184a
authored
Jan 03, 2019
by
Ken Thomases
Committed by
Alexandre Julliard
Jan 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Fix implementation of the AllowVerticalSync registry setting.
Signed-off-by:
Ken Thomases
<
ken@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
14035b6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
opengl.c
dlls/winemac.drv/opengl.c
+11
-8
No files found.
dlls/winemac.drv/opengl.c
View file @
40c5184a
...
...
@@ -1539,8 +1539,7 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
}
context
->
major
=
major
;
if
(
allow_vsync
)
InterlockedExchange
(
&
context
->
update_swap_interval
,
TRUE
);
InterlockedExchange
(
&
context
->
update_swap_interval
,
TRUE
);
TRACE
(
"created context %p/%p/%p
\n
"
,
context
,
context
->
context
,
context
->
cglcontext
);
...
...
@@ -1742,7 +1741,9 @@ static void sync_swap_interval(struct wgl_context *context)
{
int
interval
;
if
(
context
->
draw_hwnd
)
if
(
!
allow_vsync
)
interval
=
0
;
else
if
(
context
->
draw_hwnd
)
{
struct
macdrv_win_data
*
data
=
get_win_data
(
context
->
draw_hwnd
);
if
(
data
)
...
...
@@ -3478,7 +3479,7 @@ static int macdrv_wglGetSwapIntervalEXT(void)
release_win_data
(
data
);
if
(
InterlockedCompareExchange
(
&
context
->
update_swap_interval
,
FALSE
,
TRUE
))
set_swap_interval
(
context
,
value
);
set_swap_interval
(
context
,
allow_vsync
?
value
:
0
);
}
else
{
...
...
@@ -3543,8 +3544,8 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w
return
FALSE
;
}
if
(
allow_vsync
&&
(
InterlockedCompareExchange
(
&
context
->
update_swap_interval
,
FALSE
,
TRUE
)
||
hwnd
!=
context
->
draw_hwnd
)
)
set_swap_interval
(
context
,
data
->
swap_interval
);
if
(
InterlockedCompareExchange
(
&
context
->
update_swap_interval
,
FALSE
,
TRUE
)
||
hwnd
!=
context
->
draw_hwnd
)
set_swap_interval
(
context
,
allow_vsync
?
data
->
swap_interval
:
0
);
context
->
draw_hwnd
=
hwnd
;
context
->
draw_view
=
data
->
client_cocoa_view
;
...
...
@@ -3569,8 +3570,7 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w
return
FALSE
;
}
if
(
allow_vsync
&&
(
InterlockedCompareExchange
(
&
context
->
update_swap_interval
,
FALSE
,
TRUE
)
||
pbuffer
!=
context
->
draw_pbuffer
))
if
(
InterlockedCompareExchange
(
&
context
->
update_swap_interval
,
FALSE
,
TRUE
)
||
pbuffer
!=
context
->
draw_pbuffer
)
set_swap_interval
(
context
,
0
);
}
else
...
...
@@ -4115,6 +4115,9 @@ static BOOL macdrv_wglSwapIntervalEXT(int interval)
else
/* pbuffer */
interval
=
0
;
if
(
!
allow_vsync
)
interval
=
0
;
InterlockedExchange
(
&
context
->
update_swap_interval
,
FALSE
);
if
(
!
set_swap_interval
(
context
,
interval
))
{
...
...
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