Commit e9c065e5 authored by Alexandre Julliard's avatar Alexandre Julliard

opengl32: Use the Unix call helpers.

parent 3b50ca0f
...@@ -1054,8 +1054,7 @@ print OUT " GLsizei length;\n"; ...@@ -1054,8 +1054,7 @@ print OUT " GLsizei length;\n";
print OUT " const GLchar *message;\n"; print OUT " const GLchar *message;\n";
print OUT "};\n\n"; print OUT "};\n\n";
print OUT "extern unixlib_handle_t unixlib_handle DECLSPEC_HIDDEN;\n"; print OUT "#define UNIX_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )\n\n";
print OUT "#define UNIX_CALL( func, params ) __wine_unix_call( unixlib_handle, unix_ ## func, params )\n\n";
print OUT "#endif /* __WINE_OPENGL32_UNIXLIB_H */\n"; print OUT "#endif /* __WINE_OPENGL32_UNIXLIB_H */\n";
close OUT; close OUT;
......
...@@ -25351,7 +25351,6 @@ struct wine_gl_debug_message_params ...@@ -25351,7 +25351,6 @@ struct wine_gl_debug_message_params
const GLchar *message; const GLchar *message;
}; };
extern unixlib_handle_t unixlib_handle DECLSPEC_HIDDEN; #define UNIX_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
#define UNIX_CALL( func, params ) __wine_unix_call( unixlib_handle, unix_ ## func, params )
#endif /* __WINE_OPENGL32_UNIXLIB_H */ #endif /* __WINE_OPENGL32_UNIXLIB_H */
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(opengl); WINE_DEFAULT_DEBUG_CHANNEL(opengl);
WINE_DECLARE_DEBUG_CHANNEL(fps); WINE_DECLARE_DEBUG_CHANNEL(fps);
unixlib_handle_t unixlib_handle = 0;
static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} }; static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
#ifndef _WIN64 #ifndef _WIN64
...@@ -1257,8 +1255,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) ...@@ -1257,8 +1255,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
switch(reason) switch(reason)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
if ((status = NtQueryVirtualMemory( GetCurrentProcess(), hinst, MemoryWineUnixFuncs, if ((status = __wine_init_unix_call()))
&unixlib_handle, sizeof(unixlib_handle), NULL )))
{ {
ERR( "Failed to load unixlib, status %#lx\n", status ); ERR( "Failed to load unixlib, status %#lx\n", status );
return FALSE; return FALSE;
...@@ -1276,12 +1273,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) ...@@ -1276,12 +1273,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
if (!unixlib_handle) return TRUE; UNIX_CALL( process_detach, NULL );
if ((status = UNIX_CALL( process_detach, NULL )))
{
WARN( "Failed to detach opengl32 unixlib, status %#lx\n", status );
return FALSE;
}
#ifndef _WIN64 #ifndef _WIN64
cleanup_wow64_strings(); cleanup_wow64_strings();
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment