From: Rémi Bernon rbernon@codeweavers.com
--- dlls/opengl32/make_opengl | 1 + dlls/opengl32/unix_thunks.c | 16 +--------------- dlls/opengl32/unix_wgl.c | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index f0cdd136bcf..312e7acc964 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -170,6 +170,7 @@ my %manual_win_thunks = my %manual_wow64_thunks = ( "glPathGlyphIndexRangeNV" => 1, + "wglGetProcAddress" => 1, );
# diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index b424bac922b..c710d2141ec 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -27294,21 +27294,6 @@ static NTSTATUS wow64_wgl_wglGetPixelFormat( void *args ) return status; }
-static NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) -{ - struct - { - PTR32 lpszProc; - PTR32 ret; - } *params32 = args; - struct wglGetProcAddress_params params = - { - .lpszProc = ULongToPtr(params32->lpszProc), - }; - FIXME( "params32 %p, params %p stub!\n", params32, ¶ms ); - return STATUS_NOT_IMPLEMENTED; -} - static NTSTATUS wow64_wgl_wglMakeCurrent( void *args ) { struct @@ -61088,6 +61073,7 @@ static NTSTATUS wow64_ext_wglSetPixelFormatWINE( void *args ) return status; }
+extern NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) DECLSPEC_HIDDEN; extern NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN;
const unixlib_entry_t __wine_unix_call_wow64_funcs[] = diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 0daaf597ff3..7fd044182d7 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -542,6 +542,9 @@ static PROC WINAPI wrap_wglGetProcAddress( LPCSTR name ) *func_ptr = driver_func; }
+ /* Return the index into the extension registry instead of a useless + * function pointer, PE side will returns its own function pointers. + */ return (void *)(UINT_PTR)(found - extension_registry); }
@@ -1057,6 +1060,23 @@ typedef ULONG PTR32;
extern NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) DECLSPEC_HIDDEN;
+NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) +{ + struct + { + PTR32 lpszProc; + PTR32 ret; + } *params32 = args; + struct wglGetProcAddress_params params = + { + .lpszProc = ULongToPtr(params32->lpszProc), + }; + NTSTATUS status; + if ((status = wgl_wglGetProcAddress( ¶ms ))) return status; + params32->ret = (UINT_PTR)params.ret; + return STATUS_SUCCESS; +} + NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) { struct