Prototype patch that solves bug 11897
Artur Szymiec
artur.szymiec at gmail.com
Wed Mar 12 17:47:47 CDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This is a prototype patch
that solves bug 11897. It also makes my favourite game GTR2 playable
under wine.
I was right that GTR2 looping between config dialog and game exe was
related
to d3d adapter GUID.
Best regards
Artur
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 8b1db3a..67296c7 100644
- --- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -105,7 +105,7 @@ static HRESULT WINAPI
IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, U
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
WINED3DADAPTER_IDENTIFIER adapter_id;
HRESULT hr;
- -
+
/* dx8 and dx9 have different structures to be filled in, with
incompatible
layouts so pass in pointers to the places to be filled via an
internal
structure
*/
@@ -119,7 +119,12 @@ static HRESULT WINAPI
IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, U
adapter_id.Revision = &pIdentifier->Revision;
adapter_id.DeviceIdentifier = &pIdentifier->DeviceIdentifier;
adapter_id.WHQLLevel = &pIdentifier->WHQLLevel;
- -
+ /* Unfortunately correct UID code can't be placed at the moment
in IWineD3DImpl_GetAdapterIdentifier
+ cause simply it breaks the Direct sound somehow - app reports
no direct sound card !!!)
+ Fixed temprorary for GTR2 && TR_LEGENDS - see BUG 11897 */
+ FIXME("Filling GUID fields with 0x1 -> need real implementation\n");
+ memset(&pIdentifier->DeviceIdentifier,1,sizeof(GUID));
+
EnterCriticalSection(&d3d9_cs);
hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, Adapter, Flags,
&adapter_id);
LeaveCriticalSection(&d3d9_cs);
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 04af700..75a872a 100644
- --- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1596,6 +1596,14 @@ static HRESULT WINAPI
IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
*(pIdentifier->Revision) = 0;
/*FIXME: memcpy(&pIdentifier->DeviceIdentifier, ??,
sizeof(??GUID)); */
+ //GUID mGUID;
+ //GUID *pmGUID = &pIdentifier->DeviceIdentifier;
+ //pmGUID->Data1=0;
+ //pmGUID->Data2=0;
+ //pmGUID->Data3=0;
+ //pmGUID->Data4[0]=1;
+ //Data4
+ //memset(&pIdentifier->DeviceIdentifier,1,sizeof(GUID));
if (Flags & WINED3DENUM_NO_WHQL_LEVEL) {
*(pIdentifier->WHQLLevel) = 0;
} else {
- --
- --------------------------------------------------------------------------
Registered User No 397465
Linux Debian 2.6.24.2 AMD Athlon(tm) 64 X2 Dual Core 5000+
Conquer your Desktop! http://www.kde.org/trykde/
Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird/
- --------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH2F2TbB2ld6kq2MsRAsVIAKDCshMNKMiDh1MxhFIzcTg4cunqRgCdGyqA
N2a+iqp2FfLjh2q5r5EhdCE=
=pGKx
-----END PGP SIGNATURE-----
More information about the wine-patches
mailing list