diff --git a/build/dxwnd.dll b/build/dxwnd.dll index 50375db..c612fee 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c41e3a123c1b71a51f0f3eebd344a4c96b760b10fa30c715d323825501aad96f +oid sha256:0f5388e87978467245275dcb12d802fcb1ce55d4f4a0ee2217711fcef520bd3a size 506368 diff --git a/build/dxwnd.ini b/build/dxwnd.ini index 88543b8..cbf8478 100644 --- a/build/dxwnd.ini +++ b/build/dxwnd.ini @@ -1,7 +1,6 @@ [window] -posx=492 -posy=330 +posx=1207 +posy=326 sizx=320 -sizy=274 +sizy=200 lang=automatic - diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index c98db8c..fab13f9 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -600,3 +600,6 @@ v2.02.92 fix: "Keep aspect ratio" fixed for AERO environment fix: improved "Oprtimized for AERO mode" compatibility, both when set / unset. fix: Skip / Limit FPS now acting on full scren blits only. For instance, they no longer slow cursor sprite. + +v2.02.93 +fix: handling of primary / backbuffer surfaces when DDSCAPS_3DDEVICE is set (es. Fifa 99 in Direct3D mode) diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index e17b0e7..020f419 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -3,7 +3,7 @@ #define _CRT_SECURE_NO_WARNINGS #define INITGUID -#define FULLHEXDUMP +//#define FULLHEXDUMP #include #include @@ -19,6 +19,7 @@ extern BOOL IsChangeDisplaySettingsHotPatched; BOOL bDontReleaseBackBuffer = FALSE; +BOOL bIs3DPrimarySurfaceDevice = FALSE; // DirectDraw API HRESULT WINAPI extDirectDrawCreate(GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *); @@ -2557,13 +2558,17 @@ static HRESULT BuildPrimaryDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf DDSURFACEDESC2 ddsd; HRESULT res; - // v2.02.92: don't move primary / backbuf surfaces on systemmemory when 3DDEVICE is requested - // if(lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) dxw.dwFlags5 &= ~SYSTEMMEMORY; - // genuine primary surface memcpy((void *)&ddsd, lpddsd, lpddsd->dwSize); ddsd.dwFlags &= ~(DDSD_WIDTH|DDSD_HEIGHT|DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE|DDSD_PIXELFORMAT); ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_FLIP|DDSCAPS_COMPLEX); + // v2.02.93: don't move primary / backbuf surfaces on systemmemory when 3DDEVICE is requested + // this impact also on capabilities for temporary surfaces for AERO optimized handling + bIs3DPrimarySurfaceDevice = FALSE; + if(lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) { + ddsd.ddsCaps.dwCaps &= ~DDSCAPS_SYSTEMMEMORY; + bIs3DPrimarySurfaceDevice = TRUE; + } // create Primary surface DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Primary]" , __LINE__); @@ -2657,7 +2662,11 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS ddsd.dwFlags &= ~(DDSD_WIDTH|DDSD_HEIGHT|DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE|DDSD_PIXELFORMAT); ddsd.dwFlags |= (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH); ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX); - ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; + // v2.02.93: don't move primary / backbuf surfaces on systemmemory when 3DDEVICE is requested + if(lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) + ddsd.ddsCaps.dwCaps &= ~DDSCAPS_SYSTEMMEMORY; + else + ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; if (dxversion >= 4) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = dxw.GetScreenWidth(); ddsd.dwHeight = dxw.GetScreenHeight(); @@ -3117,7 +3126,8 @@ HRESULT WINAPI PrimaryStretchBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, L TmpRect.bottom = ddsd.dwHeight = lpdestrect->bottom - lpdestrect->top; TmpRect.right = ddsd.dwWidth = lpdestrect->right - lpdestrect->left; ddsd.dwFlags = (DDSD_HEIGHT | DDSD_WIDTH | DDSD_CAPS); - ddsd.ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); + // capabilities must cope with primary / backbuffer surface capabilities to get speedy operations + ddsd.ddsCaps.dwCaps = bIs3DPrimarySurfaceDevice ? DDSCAPS_OFFSCREENPLAIN : (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); res=(*pCreateSurface1)(lpPrimaryDD, &ddsd, &lpddsTmp, NULL); if(res) OutTraceE("CreateSurface: ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__); // stretch-blit to target size on OFFSCREENPLAIN temp surface diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index 48f95b6..a2aee83 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -94,7 +94,7 @@ static char *Flag4Names[32]={ static char *Flag5Names[32]={ "DIABLOTWEAK", "CLEARTARGET", "NOWINPOSCHANGES", "SYSTEMMEMORY", - "NOBLT", "-----", "DOFASTBLT", "AEROBOOST", + "NOBLT", "--DOSTRETCHBLT---", "DOFASTBLT", "AEROBOOST", "", "", "", "", "", "", "", "", "", "", "", "", diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index c9acb62..8701f59 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "dxwnd.h" #include "dxwcore.hpp" -#define VERSION "2.02.92" +#define VERSION "2.02.93.f1" #define DDTHREADLOCK 1 diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 0fd5be2..440c27a 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index f76224a..db99b62 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ