wined3d: Get rid of last_device.
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 2e50634..61173fb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -29,19 +29,8 @@
#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 @@
}
LEAVE_GL();
- context_set_last_device(This);
This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE);
return ret;
@@ -1283,8 +1271,6 @@
context_destroy_gl_resources(context);
destroy = TRUE;
- context_set_last_device(NULL);
-
if (This->activeContext == context)
{
This->activeContext = NULL;
@@ -1840,7 +1826,6 @@
}
}
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 9daffaa..e6fb1c7 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -284,7 +284,6 @@
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 363eb13..a28878e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1271,7 +1271,6 @@
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);