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
f57967c9
Commit
f57967c9
authored
Jun 29, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Always check the result of wglMakeCurrent().
parent
40565211
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
context.c
dlls/wined3d/context.c
+9
-2
directx.c
dlls/wined3d/directx.c
+5
-2
No files found.
dlls/wined3d/context.c
View file @
f57967c9
...
...
@@ -1073,7 +1073,10 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
* but enable it for the first context we create, and reenable it on the old context
*/
if
(
oldDrawable
&&
oldCtx
)
{
pwglMakeCurrent
(
oldDrawable
,
oldCtx
);
if
(
!
pwglMakeCurrent
(
oldDrawable
,
oldCtx
))
{
ERR
(
"Failed to make previous GL context %p current.
\n
"
,
oldCtx
);
}
}
else
{
last_device
=
This
;
}
...
...
@@ -1201,7 +1204,11 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) {
}
/* Cleanup the GL context */
pwglMakeCurrent
(
NULL
,
NULL
);
if
(
!
pwglMakeCurrent
(
NULL
,
NULL
))
{
ERR
(
"Failed to disable GL context.
\n
"
);
}
if
(
context
->
isPBuffer
)
{
GL_EXTCALL
(
wglReleasePbufferDCARB
(
context
->
pbuffer
,
context
->
hdc
));
GL_EXTCALL
(
wglDestroyPbufferARB
(
context
->
pbuffer
));
...
...
dlls/wined3d/directx.c
View file @
f57967c9
...
...
@@ -230,7 +230,10 @@ static void WineD3D_ReleaseFakeGLContext(void) {
if
(
0
==
(
--
wined3d_fake_gl_context_ref
)
)
{
if
(
!
wined3d_fake_gl_context_foreign
&&
glCtx
)
{
TRACE_
(
d3d_caps
)(
"destroying fake GL context
\n
"
);
pwglMakeCurrent
(
NULL
,
NULL
);
if
(
!
pwglMakeCurrent
(
NULL
,
NULL
))
{
ERR
(
"Failed to disable fake GL context.
\n
"
);
}
pwglDeleteContext
(
glCtx
);
}
if
(
wined3d_fake_gl_context_hdc
)
...
...
@@ -301,7 +304,7 @@ static BOOL WineD3D_CreateFakeGLContext(void) {
/* Make it the current GL context */
if
(
!
pwglMakeCurrent
(
wined3d_fake_gl_context_hdc
,
glCtx
))
{
WARN_
(
d3d_caps
)(
"Error setting default context as current for capabilities initialization
\n
"
);
ERR_
(
d3d_caps
)(
"Failed to make fake GL context current.
\n
"
);
goto
fail
;
}
}
...
...
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