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
5943c580
Commit
5943c580
authored
Mar 21, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Fix wglSwapBuffers() to operate on the HDC, not the current GL context.
parent
81994306
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
opengl.c
dlls/winemac.drv/opengl.c
+45
-4
No files found.
dlls/winemac.drv/opengl.c
View file @
5943c580
...
...
@@ -3553,17 +3553,58 @@ static BOOL macdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de
static
BOOL
macdrv_wglSwapBuffers
(
HDC
hdc
)
{
struct
wgl_context
*
context
=
NtCurrentTeb
()
->
glContext
;
BOOL
match
=
FALSE
;
HWND
hwnd
;
TRACE
(
"hdc %p context %p/%p/%p
\n
"
,
hdc
,
context
,
(
context
?
context
->
context
:
NULL
),
(
context
?
context
->
cglcontext
:
NULL
));
if
(
!
context
)
if
(
(
hwnd
=
WindowFromDC
(
hdc
))
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
struct
macdrv_win_data
*
data
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
context
&&
context
->
draw_view
==
data
->
gl_view
)
match
=
TRUE
;
release_win_data
(
data
);
}
else
{
struct
wgl_pbuffer
*
pbuffer
;
EnterCriticalSection
(
&
dc_pbuffers_section
);
pbuffer
=
(
struct
wgl_pbuffer
*
)
CFDictionaryGetValue
(
dc_pbuffers
,
hdc
);
LeaveCriticalSection
(
&
dc_pbuffers_section
);
if
(
!
pbuffer
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
context
&&
context
->
draw_pbuffer
==
pbuffer
)
match
=
TRUE
;
}
if
(
match
)
macdrv_flush_opengl_context
(
context
->
context
);
else
{
FIXME
(
"current context %p doesn't match hdc %p; can't swap
\n
"
,
context
,
hdc
);
/* If there is a current context, then wglSwapBuffers should do an implicit
glFlush(). That would be taken care of by macdrv_flush_opengl_context()
in the other branch, but we have to do it explicitly here. */
if
(
context
)
pglFlush
();
}
macdrv_flush_opengl_context
(
context
->
context
);
return
TRUE
;
}
...
...
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