Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ed4271fa
Commit
ed4271fa
authored
Nov 19, 2016
by
Daniel Lehman
Committed by
Alexandre Julliard
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Set last error on invalid hdc to wglCreateContextAttribsARB.
Signed-off-by:
Daniel Lehman
<
dlehman25@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4def77e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
opengl.c
dlls/opengl32/tests/opengl.c
+4
-3
wgl.c
dlls/opengl32/wgl.c
+6
-1
No files found.
dlls/opengl32/tests/opengl.c
View file @
ed4271fa
...
...
@@ -884,12 +884,13 @@ static void test_opengl3(HDC hdc)
{
HGLRC
gl3Ctx
;
DWORD
error
;
SetLastError
(
0xdeadbeef
);
gl3Ctx
=
pwglCreateContextAttribsARB
((
HDC
)
0xdeadbeef
,
0
,
0
);
ok
(
gl3Ctx
==
0
,
"pwglCreateContextAttribsARB using an invalid HDC passed
\n
"
);
error
=
GetLastError
();
todo_wine
ok
(
error
==
ERROR_DC_NOT_FOUND
||
broken
(
error
==
NVIDIA_HRESULT_FROM_WIN32
(
ERROR_INVALID_DATA
)),
/* Nvidia Vista + Win7 */
"Expected ERROR_DC_NOT_FOUND, got error=%x
\n
"
,
error
);
ok
(
error
==
ERROR_DC_NOT_FOUND
||
broken
(
error
==
NVIDIA_HRESULT_FROM_WIN32
(
ERROR_INVALID_DATA
)),
/* Nvidia Vista + Win7 */
"Expected ERROR_DC_NOT_FOUND, got error=%x
\n
"
,
error
);
wglDeleteContext
(
gl3Ctx
);
}
...
...
dlls/opengl32/wgl.c
View file @
ed4271fa
...
...
@@ -274,7 +274,12 @@ HGLRC WINAPI wglCreateContextAttribsARB( HDC hdc, HGLRC share, const int *attrib
struct
opengl_context
*
context
;
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
if
(
!
funcs
||
!
funcs
->
ext
.
p_wglCreateContextAttribsARB
)
return
0
;
if
(
!
funcs
)
{
SetLastError
(
ERROR_DC_NOT_FOUND
);
return
0
;
}
if
(
!
funcs
->
ext
.
p_wglCreateContextAttribsARB
)
return
0
;
if
(
share
&&
!
(
share_ptr
=
get_handle_ptr
(
share
,
HANDLE_CONTEXT
)))
return
0
;
if
((
drv_ctx
=
funcs
->
ext
.
p_wglCreateContextAttribsARB
(
hdc
,
share_ptr
?
share_ptr
->
u
.
context
->
drv_ctx
:
NULL
,
attribs
)))
...
...
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