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
06ef87ce
Commit
06ef87ce
authored
Mar 18, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
Apr 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Better handle some instances when we can't make the required GL context current.
parent
0322114c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
context.c
dlls/wined3d/context.c
+11
-0
No files found.
dlls/wined3d/context.c
View file @
06ef87ce
...
@@ -1017,12 +1017,20 @@ BOOL context_set_current(struct wined3d_context *ctx)
...
@@ -1017,12 +1017,20 @@ BOOL context_set_current(struct wined3d_context *ctx)
if
(
ctx
)
if
(
ctx
)
{
{
if
(
!
ctx
->
valid
)
{
ERR
(
"Trying to make invalid context %p current
\n
"
,
ctx
);
return
FALSE
;
}
TRACE
(
"Switching to D3D context %p, GL context %p, device context %p.
\n
"
,
ctx
,
ctx
->
glCtx
,
ctx
->
hdc
);
TRACE
(
"Switching to D3D context %p, GL context %p, device context %p.
\n
"
,
ctx
,
ctx
->
glCtx
,
ctx
->
hdc
);
if
(
!
pwglMakeCurrent
(
ctx
->
hdc
,
ctx
->
glCtx
))
if
(
!
pwglMakeCurrent
(
ctx
->
hdc
,
ctx
->
glCtx
))
{
{
DWORD
err
=
GetLastError
();
DWORD
err
=
GetLastError
();
ERR
(
"Failed to make GL context %p current on device context %p, last error %#x.
\n
"
,
ERR
(
"Failed to make GL context %p current on device context %p, last error %#x.
\n
"
,
ctx
->
glCtx
,
ctx
->
hdc
,
err
);
ctx
->
glCtx
,
ctx
->
hdc
,
err
);
ctx
->
valid
=
0
;
pwglMakeCurrent
(
NULL
,
NULL
);
TlsSetValue
(
wined3d_context_tls_idx
,
NULL
);
TlsSetValue
(
wined3d_context_tls_idx
,
NULL
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -1063,6 +1071,7 @@ void context_release(struct wined3d_context *context)
...
@@ -1063,6 +1071,7 @@ void context_release(struct wined3d_context *context)
DWORD
err
=
GetLastError
();
DWORD
err
=
GetLastError
();
ERR
(
"Failed to restore GL context %p on device context %p, last error %#x.
\n
"
,
ERR
(
"Failed to restore GL context %p on device context %p, last error %#x.
\n
"
,
context
->
restore_ctx
,
context
->
restore_dc
,
err
);
context
->
restore_ctx
,
context
->
restore_dc
,
err
);
context_set_current
(
NULL
);
}
}
context
->
restore_ctx
=
NULL
;
context
->
restore_ctx
=
NULL
;
context
->
restore_dc
=
NULL
;
context
->
restore_dc
=
NULL
;
...
@@ -2305,6 +2314,8 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf
...
@@ -2305,6 +2314,8 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf
DWORD
err
=
GetLastError
();
DWORD
err
=
GetLastError
();
ERR
(
"Failed to make GL context %p current on device context %p, last error %#x.
\n
"
,
ERR
(
"Failed to make GL context %p current on device context %p, last error %#x.
\n
"
,
context
->
glCtx
,
context
->
hdc
,
err
);
context
->
glCtx
,
context
->
hdc
,
err
);
context
->
valid
=
0
;
pwglMakeCurrent
(
NULL
,
NULL
);
}
}
}
}
...
...
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