diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 2e50634fec1..61173fbe60a 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -29,19 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); #define GLINFO_LOCATION (*gl_info) -/* The last used device. - * - * If the application creates multiple devices and switches between them, ActivateContext has to - * change the opengl context. This flag allows to keep track which device is active - */ -static IWineD3DDeviceImpl *last_device; static DWORD wined3d_context_tls_idx; -void context_set_last_device(IWineD3DDeviceImpl *device) -{ - last_device = device; -} - /* FBO helper functions */ /* GL locking is done by the caller */ @@ -1193,7 +1182,6 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } LEAVE_GL(); - context_set_last_device(This); This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE); return ret; @@ -1283,8 +1271,6 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) context_destroy_gl_resources(context); destroy = TRUE; - context_set_last_device(NULL); - if (This->activeContext == context) { This->activeContext = NULL; @@ -1840,7 +1826,6 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU } } This->activeContext = context; - context_set_last_device(This); switch (usage) { case CTXUSAGE_CLEAR: diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9daffaacdbc..e6fb1c73d5c 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -284,7 +284,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx) ERR_(d3d_caps)("Failed to make fake GL context current.\n"); goto fail; } - context_set_last_device(NULL); return TRUE; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 363eb13a34d..a28878e8f11 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1271,7 +1271,6 @@ void context_attach_depth_stencil_fbo(struct WineD3DContext *context, GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer); void context_attach_surface_fbo(const struct WineD3DContext *context, GLenum fbo_target, DWORD idx, IWineD3DSurface *surface); -void context_set_last_device(IWineD3DDeviceImpl *device); struct WineD3DContext *context_get_current(void); DWORD context_get_tls_idx(void); BOOL context_set_current(struct WineD3DContext *ctx);