[PATCH 4/5] wined3d: Let "FindContext()" figure out the thread id on its own.

Henri Verbeet hverbeet at codeweavers.com
Sun Dec 27 12:57:22 CST 2009


It doesn't work with anything other than the current thread anyway.
---
 dlls/wined3d/context.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 797dd6b..a0d16c9 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1857,11 +1857,12 @@ static struct wined3d_context *findThreadContextForSwapChain(IWineD3DSwapChain *
  * Returns: The needed context
  *
  *****************************************************************************/
-static inline struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, DWORD tid)
+static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target)
 {
     IWineD3DSwapChain *swapchain = NULL;
     struct wined3d_context *current_context = context_get_current();
     const struct StateEntry *StateTable = This->StateTable;
+    DWORD tid = GetCurrentThreadId();
     struct wined3d_context *context;
     BOOL old_render_offscreen;
 
@@ -2234,7 +2235,7 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf
 
     TRACE("device %p, target %p, usage %#x.\n", device, target, usage);
 
-    context = FindContext(device, target, GetCurrentThreadId());
+    context = FindContext(device, target);
     context_enter(context);
     if (!context->valid) return context;
 
-- 
1.6.4.4




More information about the wine-patches mailing list