From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 1 - dlls/opengl32/unix_thunks.c | 17 ++++++++++++++++- dlls/opengl32/unix_thunks.h | 2 -- dlls/opengl32/unix_wgl.c | 19 ------------------- 4 files changed, 16 insertions(+), 23 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index cbb7e4c0bc8..753639982a6 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -241,7 +241,6 @@ my %manual_wow64_thunks = "wglCreateContext" => 1, "wglCreateContextAttribsARB" => 1, "wglCreatePbufferARB" => 1, - "wglDeleteContext" => 1, "wglGetExtensionsStringARB" => 1, "wglGetExtensionsStringEXT" => 1, "wglGetPbufferDCARB" => 1, diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index cb8cfe2dc0d..d7e0a9301a0 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -43,7 +43,7 @@ NTSTATUS wgl_wglCreateContext( void *args ) return STATUS_SUCCESS; }
-NTSTATUS wgl_wglDeleteContext( void *args ) +static NTSTATUS wgl_wglDeleteContext( void *args ) { struct wglDeleteContext_params *params = args; pthread_mutex_lock( &wgl_lock ); @@ -29927,6 +29927,21 @@ static NTSTATUS wow64_wgl_wglCopyContext( void *args ) return STATUS_SUCCESS; }
+static NTSTATUS wow64_wgl_wglDeleteContext( void *args ) +{ + struct + { + PTR32 teb; + PTR32 oldContext; + BOOL ret; + } *params = args; + TEB *teb = get_teb64( params->teb ); + pthread_mutex_lock( &wgl_lock ); + params->ret = wrap_wglDeleteContext( teb, ULongToPtr(params->oldContext) ); + pthread_mutex_unlock( &wgl_lock ); + return STATUS_SUCCESS; +} + static NTSTATUS wow64_wgl_wglGetPixelFormat( void *args ) { struct diff --git a/dlls/opengl32/unix_thunks.h b/dlls/opengl32/unix_thunks.h index 2384f6f5cab..dc6174b6516 100644 --- a/dlls/opengl32/unix_thunks.h +++ b/dlls/opengl32/unix_thunks.h @@ -34,8 +34,6 @@ extern BOOL wrap_wglSetPbufferAttribARB( TEB *teb , HPBUFFERARB hPbuffer, const
extern NTSTATUS wgl_wglCreateContext( void *args ); extern NTSTATUS wow64_wgl_wglCreateContext( void *args ); -extern NTSTATUS wgl_wglDeleteContext( void *args ); -extern NTSTATUS wow64_wgl_wglDeleteContext( void *args ); extern NTSTATUS wgl_wglGetProcAddress( void *args ); extern NTSTATUS wow64_wgl_wglGetProcAddress( void *args ); extern NTSTATUS gl_glGetString( void *args ); diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index ea50bac6bab..5b730ea4def 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1509,25 +1509,6 @@ NTSTATUS wow64_ext_wglCreatePbufferARB( void *args ) return STATUS_SUCCESS; }
-NTSTATUS wow64_wgl_wglDeleteContext( void *args ) -{ - struct - { - PTR32 teb; - PTR32 oldContext; - BOOL ret; - } *params32 = args; - struct wglDeleteContext_params params = - { - .teb = get_teb64(params32->teb), - .oldContext = ULongToPtr(params32->oldContext), - }; - NTSTATUS status; - if (!(status = wgl_wglDeleteContext( ¶ms ))) update_teb32_context( params.teb ); - params32->ret = params.ret; - return status; -} - NTSTATUS wow64_ext_wglGetPbufferDCARB( void *args ) { struct