From ea2caa9ba190bd3aae91d85ee4f949e3382e5d9d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 23 Jul 2009 10:54:36 +0200 Subject: [PATCH] wined3d: Return the activated context from ActivateContext(). --- dlls/wined3d/context.c | 5 ++++- dlls/wined3d/wined3d_private.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 1d25afc87e3..5afbda791d1 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1794,7 +1794,8 @@ static void context_apply_draw_buffer(struct WineD3DContext *context, BOOL blit) * usage: Prepares the context for blitting, drawing or other actions * *****************************************************************************/ -void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextUsage usage) { +struct WineD3DContext *ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage) +{ struct WineD3DContext *current_context = context_get_current(); DWORD tid = GetCurrentThreadId(); DWORD i, dirtyState, idx; @@ -1929,4 +1930,6 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU default: FIXME("Unexpected context usage requested\n"); } + + return context; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a28878e8f11..bb648757599 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1262,7 +1262,7 @@ typedef enum ContextUsage { CTXUSAGE_CLEAR = 4, /* Drawable and states are set up for clearing */ } ContextUsage; -void ActivateContext(IWineD3DDeviceImpl *device, IWineD3DSurface *target, ContextUsage usage); +struct WineD3DContext *ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage); WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, HWND win, BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *pPresentParms); void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context); void context_resource_released(IWineD3DDevice *iface, IWineD3DResource *resource, WINED3DRESOURCETYPE type);