1
0
mirror of https://github.com/DxWnd/DxWnd.reloaded synced 2024-12-30 09:25:35 +01:00

v2_02_93_src

Former-commit-id: 34653f7f041378ba8ceb1e842ff4e8cd9760634b
This commit is contained in:
gho tik 2014-09-21 12:39:48 -04:00 committed by Refael ACkermann
parent 065d2de677
commit 654b8fa644
8 changed files with 25 additions and 13 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c41e3a123c1b71a51f0f3eebd344a4c96b760b10fa30c715d323825501aad96f
oid sha256:0f5388e87978467245275dcb12d802fcb1ce55d4f4a0ee2217711fcef520bd3a
size 506368

View File

@ -1,7 +1,6 @@
[window]
posx=492
posy=330
posx=1207
posy=326
sizx=320
sizy=274
sizy=200
lang=automatic

View File

@ -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)

View File

@ -3,7 +3,7 @@
#define _CRT_SECURE_NO_WARNINGS
#define INITGUID
#define FULLHEXDUMP
//#define FULLHEXDUMP
#include <windows.h>
#include <ddraw.h>
@ -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

View File

@ -94,7 +94,7 @@ static char *Flag4Names[32]={
static char *Flag5Names[32]={
"DIABLOTWEAK", "CLEARTARGET", "NOWINPOSCHANGES", "SYSTEMMEMORY",
"NOBLT", "-----", "DOFASTBLT", "AEROBOOST",
"NOBLT", "--DOSTRETCHBLT---", "DOFASTBLT", "AEROBOOST",
"", "", "", "",
"", "", "", "",
"", "", "", "",

View File

@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dxwnd.h"
#include "dxwcore.hpp"
#define VERSION "2.02.92"
#define VERSION "2.02.93.f1"
#define DDTHREADLOCK 1

Binary file not shown.

Binary file not shown.