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
868974c6
Commit
868974c6
authored
Mar 11, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Don't modify state if glXMakeContextCurrent fails.
parent
8818c1d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
opengl.c
dlls/winex11.drv/opengl.c
+16
-11
No files found.
dlls/winex11.drv/opengl.c
View file @
868974c6
...
...
@@ -1977,22 +1977,27 @@ BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEV
if
(
NULL
==
pglXMakeContextCurrent
)
{
ret
=
FALSE
;
}
else
{
Wine_GLContext
*
prev_ctx
=
NtCurrentTeb
()
->
glContext
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
Drawable
d_draw
=
get_glxdrawable
(
pDrawDev
);
Drawable
d_read
=
get_glxdrawable
(
pReadDev
);
if
(
prev_ctx
)
prev_ctx
->
tid
=
0
;
ctx
->
has_been_current
=
TRUE
;
ctx
->
tid
=
GetCurrentThreadId
();
ctx
->
hdc
=
pDrawDev
->
hdc
;
ctx
->
read_hdc
=
pReadDev
->
hdc
;
ctx
->
drawables
[
0
]
=
d_draw
;
ctx
->
drawables
[
1
]
=
d_read
;
ctx
->
refresh_drawables
=
FALSE
;
ret
=
pglXMakeContextCurrent
(
gdi_display
,
d_draw
,
d_read
,
ctx
->
ctx
);
NtCurrentTeb
()
->
glContext
=
ctx
;
if
(
ret
)
{
Wine_GLContext
*
prev_ctx
=
NtCurrentTeb
()
->
glContext
;
if
(
prev_ctx
)
prev_ctx
->
tid
=
0
;
ctx
->
has_been_current
=
TRUE
;
ctx
->
tid
=
GetCurrentThreadId
();
ctx
->
hdc
=
pDrawDev
->
hdc
;
ctx
->
read_hdc
=
pReadDev
->
hdc
;
ctx
->
drawables
[
0
]
=
d_draw
;
ctx
->
drawables
[
1
]
=
d_read
;
ctx
->
refresh_drawables
=
FALSE
;
NtCurrentTeb
()
->
glContext
=
ctx
;
}
else
SetLastError
(
ERROR_INVALID_HANDLE
);
}
}
wine_tsx11_unlock
();
...
...
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