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
1902e1cb
Commit
1902e1cb
authored
Mar 16, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Fix wglMakeContextCurrent with an invalid drawable.
parent
868974c6
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
-4
opengl.c
dlls/winex11.drv/opengl.c
+6
-0
No files found.
dlls/opengl32/tests/opengl.c
View file @
1902e1cb
...
...
@@ -1129,10 +1129,10 @@ static void test_destroy_read(HDC oldhdc)
SetLastError
(
0xdeadbeef
);
ret
=
pwglMakeContextCurrentARB
(
draw_dc
,
read_dc
,
ctx
);
err
=
GetLastError
();
todo_wine
ok
(
!
ret
&&
(
err
==
ERROR_INVALID_HANDLE
||
err
==
0xc0070006
),
ok
(
!
ret
&&
(
err
==
ERROR_INVALID_HANDLE
||
err
==
0xc0070006
),
"Unexpected behavior when making context current, ret %d, last error %#x.
\n
"
,
ret
,
err
);
todo_wine
ok
(
wglGetCurrentContext
()
==
NULL
,
"Wrong current context.
\n
"
);
ok
(
wglGetCurrentContext
()
==
NULL
,
"Wrong current context.
\n
"
);
wglMakeCurrent
(
NULL
,
NULL
);
...
...
@@ -1142,10 +1142,10 @@ static void test_destroy_read(HDC oldhdc)
SetLastError
(
0xdeadbeef
);
ret
=
pwglMakeContextCurrentARB
(
draw_dc
,
read_dc
,
ctx
);
err
=
GetLastError
();
todo_wine
ok
(
!
ret
&&
(
err
==
ERROR_INVALID_HANDLE
||
err
==
0xc0070006
),
ok
(
!
ret
&&
(
err
==
ERROR_INVALID_HANDLE
||
err
==
0xc0070006
),
"Unexpected behavior when making context current, last error %#x.
\n
"
,
err
);
todo_wine
ok
(
wglGetCurrentContext
()
==
oldctx
,
"Wrong current context.
\n
"
);
ok
(
wglGetCurrentContext
()
==
oldctx
,
"Wrong current context.
\n
"
);
ret
=
wglDeleteContext
(
ctx
);
ok
(
ret
,
"Failed to delete GL context, last error %#x.
\n
"
,
GetLastError
());
...
...
dlls/winex11.drv/opengl.c
View file @
1902e1cb
...
...
@@ -1972,6 +1972,12 @@ BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEV
ret
=
pglXMakeCurrent
(
gdi_display
,
None
,
NULL
);
NtCurrentTeb
()
->
glContext
=
NULL
;
}
else
if
(
!
pDrawDev
->
current_pf
)
{
WARN
(
"Trying to use an invalid drawable
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
ret
=
FALSE
;
}
else
{
if
(
NULL
==
pglXMakeContextCurrent
)
{
...
...
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