wined3d: Don't use ENTER_GL/LEAVE_GL on systems without winex11.drv.

This commit is contained in:
Roderick Colenbrander 2007-08-14 12:03:29 +02:00 committed by Alexandre Julliard
parent aab98fc6ea
commit b78923d015
1 changed files with 9 additions and 0 deletions

View File

@ -94,6 +94,10 @@ static inline DWORD get_config_key(HKEY defkey, HKEY appkey, const char* name, c
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
} }
static void wined3d_do_nothing(void)
{
}
/* At process attach */ /* At process attach */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{ {
@ -138,6 +142,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" ); wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" ); wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
} }
else /* We are most likely on Windows */
{
wine_tsx11_lock_ptr = wined3d_do_nothing;
wine_tsx11_unlock_ptr = wined3d_do_nothing;
}
/* @@ Wine registry key: HKCU\Software\Wine\Direct3D */ /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */
if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0; if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0;