Henri Verbeet : wined3d: Let "FindContext()" figure out the thread id on its own.

Alexandre Julliard julliard at winehq.org
Mon Dec 28 09:16:07 CST 2009


Module: wine
Branch: master
Commit: 57ff4b4dead687f7184305731da2dbee678f87a1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=57ff4b4dead687f7184305731da2dbee678f87a1

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Sun Dec 27 19:57:22 2009 +0100

wined3d: Let "FindContext()" figure out the thread id on its own.

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;
 




More information about the wine-cvs mailing list