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
50e9ad66
Commit
50e9ad66
authored
Jul 02, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Clear the last device in WineD3D_CreateFakeGLContext().
parent
670d9ad9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
context.c
dlls/wined3d/context.c
+8
-3
directx.c
dlls/wined3d/directx.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/context.c
View file @
50e9ad66
...
...
@@ -36,6 +36,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
*/
static
IWineD3DDeviceImpl
*
last_device
;
void
context_set_last_device
(
IWineD3DDeviceImpl
*
device
)
{
last_device
=
device
;
}
/* FBO helper functions */
/* GL locking is done by the caller */
...
...
@@ -1078,7 +1083,7 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
ERR
(
"Failed to make previous GL context %p current.
\n
"
,
oldCtx
);
}
}
else
{
last_device
=
This
;
context_set_last_device
(
This
)
;
}
This
->
frag_pipe
->
enable_extension
((
IWineD3DDevice
*
)
This
,
TRUE
);
...
...
@@ -1167,7 +1172,7 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) {
/* The correct GL context needs to be active to cleanup the GL resources below */
has_glctx
=
pwglMakeCurrent
(
context
->
hdc
,
context
->
glCtx
);
last_device
=
NULL
;
context_set_last_device
(
NULL
)
;
if
(
!
has_glctx
)
WARN
(
"Failed to activate context. Window already destroyed?
\n
"
);
...
...
@@ -1750,7 +1755,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
sizeof
(
*
This
->
activeContext
->
pshader_const_dirty
)
*
GL_LIMITS
(
pshader_constantsF
));
}
This
->
activeContext
=
context
;
last_device
=
This
;
context_set_last_device
(
This
)
;
}
switch
(
usage
)
{
...
...
dlls/wined3d/directx.c
View file @
50e9ad66
...
...
@@ -308,6 +308,7 @@ static BOOL WineD3D_CreateFakeGLContext(void) {
goto
fail
;
}
}
context_set_last_device
(
NULL
);
ret:
TRACE
(
"incrementing ref from %i
\n
"
,
wined3d_fake_gl_context_ref
);
...
...
dlls/wined3d/wined3d_private.h
View file @
50e9ad66
...
...
@@ -1256,6 +1256,7 @@ void context_resource_released(IWineD3DDevice *iface, IWineD3DResource *resource
void
context_bind_fbo
(
IWineD3DDevice
*
iface
,
GLenum
target
,
GLuint
*
fbo
);
void
context_attach_depth_stencil_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
);
void
context_attach_surface_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
);
void
context_set_last_device
(
IWineD3DDeviceImpl
*
device
);
void
delete_opengl_contexts
(
IWineD3DDevice
*
iface
,
IWineD3DSwapChain
*
swapchain
);
HRESULT
create_primary_opengl_context
(
IWineD3DDevice
*
iface
,
IWineD3DSwapChain
*
swapchain
);
...
...
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