Created
June 11, 2015 03:44
-
-
Save sarnex/adbfd6b25815d3fc47b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dlls/winex11.drv/d3dadapter.c b/dlls/winex11.drv/d3dadapter.c | |
index 28494ef..7607445 100644 | |
--- a/dlls/winex11.drv/d3dadapter.c | |
+++ b/dlls/winex11.drv/d3dadapter.c | |
@@ -907,8 +907,48 @@ has_d3dadapter( void ) | |
return FALSE; | |
} | |
- handle = wine_dlopen(D3D_MODULE_DIR "/" SONAME_D3DADAPTER9, | |
- RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ | |
+ if(sizeof(void*) != 8) { /* 32 bit */ | |
+ handle = wine_dlopen("/usr/lib32/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/usr/lib/i386-linux-gnu/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/usr/local/lib32/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/lib32/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/usr/lib/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/lib/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ | |
+ } | |
+ else { /* 64 bit */ | |
+ | |
+ handle = wine_dlopen("/usr/lib64/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/usr/lib/x86_64-linux-gnu/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/usr/local/lib64/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/lib64/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/usr/lib/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ if(!handle) | |
+ handle = wine_dlopen("/lib/d3d/" SONAME_D3DADAPTER9, | |
+ RTLD_GLOBAL | RTLD_NOW, errbuf, sizeof(errbuf)); | |
+ } | |
+ | |
if (!handle) { | |
ERR("Failed to load %s: %s\n", SONAME_D3DADAPTER9, errbuf); | |
goto cleanup; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment