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
ae8e8ac7
Commit
ae8e8ac7
authored
Jul 15, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Check the return values for some wgl calls.
parent
476c8352
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
context.c
dlls/wined3d/context.c
+14
-2
directx.c
dlls/wined3d/directx.c
+6
-1
No files found.
dlls/wined3d/context.c
View file @
ae8e8ac7
...
...
@@ -944,7 +944,15 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
}
ctx
=
pwglCreateContext
(
hdc
);
if
(
This
->
numContexts
)
pwglShareLists
(
This
->
contexts
[
0
]
->
glCtx
,
ctx
);
if
(
This
->
numContexts
)
{
if
(
!
pwglShareLists
(
This
->
contexts
[
0
]
->
glCtx
,
ctx
))
{
DWORD
err
=
GetLastError
();
ERR
(
"wglShareLists(%p, %p) failed, last error %#x.
\n
"
,
This
->
contexts
[
0
]
->
glCtx
,
ctx
,
err
);
}
}
if
(
!
ctx
)
{
ERR
(
"Failed to create a WGL context
\n
"
);
...
...
@@ -957,7 +965,11 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
ret
=
AddContextToArray
(
This
,
win_handle
,
hdc
,
ctx
,
pbuffer
);
if
(
!
ret
)
{
ERR
(
"Failed to add the newly created context to the context list
\n
"
);
pwglDeleteContext
(
ctx
);
if
(
!
pwglDeleteContext
(
ctx
))
{
DWORD
err
=
GetLastError
();
ERR
(
"wglDeleteContext(%p) failed, last error %#x.
\n
"
,
ctx
,
err
);
}
if
(
create_pbuffer
)
{
GL_EXTCALL
(
wglReleasePbufferDCARB
(
pbuffer
,
hdc
));
GL_EXTCALL
(
wglDestroyPbufferARB
(
pbuffer
));
...
...
dlls/wined3d/directx.c
View file @
ae8e8ac7
...
...
@@ -213,7 +213,12 @@ static void WineD3D_ReleaseFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
ERR_
(
d3d_caps
)(
"Failed to disable fake GL context.
\n
"
);
}
pwglDeleteContext
(
ctx
->
gl_ctx
);
if
(
!
pwglDeleteContext
(
ctx
->
gl_ctx
))
{
DWORD
err
=
GetLastError
();
ERR
(
"wglDeleteContext(%p) failed, last error %#x.
\n
"
,
ctx
->
gl_ctx
,
err
);
}
ReleaseDC
(
ctx
->
wnd
,
ctx
->
dc
);
DestroyWindow
(
ctx
->
wnd
);
}
...
...
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