mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_02_92_src
Former-commit-id: 19851345e357f6112c9376fc426ba5a834ebe080
This commit is contained in:
parent
741188c055
commit
065d2de677
@ -152,9 +152,10 @@
|
||||
#define NOWINPOSCHANGES 0x00000004 // suppress WM_WINDOWPOSCHANGING/CHANGED messages (RollerCoaster Tycoon...)
|
||||
#define SYSTEMMEMORY 0x00000008 // forces usage of DDSCAPS_SYSTEMMEMORY capability on front & backbuffer surfaces
|
||||
#define NOBLT 0x00000010 // suppress blit to primary surface
|
||||
#define DOSTRETCHBLT 0x00000020 // use StretchBlt to primary surface
|
||||
#define UNUSEDFLAG1 0x00000020 // unused - mapped to AEROBOOST
|
||||
#define DOFASTBLT 0x00000040 // use FastBlt to primary surface
|
||||
#define AEROBOOST 0x00000080 // Optimize for AERO environment: set DOSTRETCHBLT + SYSTEMMEMORY
|
||||
#define AEROBOOST 0x00000080 // Optimize for AERO environment: does all stretching in sysmemory surfaces
|
||||
#define LIMITFULLBLT 0x00000100 // Limit FPS only for blt operation of the whole primary surface
|
||||
|
||||
// logging Tflags DWORD:
|
||||
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general
|
||||
@ -235,6 +236,7 @@ void HookInit(TARGETMAP *, HWND);
|
||||
void *SetHook(void *, void *);
|
||||
void SetHook(void *, void *, void **, char *);
|
||||
void OutTrace(const char *, ...);
|
||||
void OutTraceHex(BYTE *, int);
|
||||
void *HookAPI(HMODULE, char *, void *, const char *, void *);
|
||||
void AdjustWindowFrame(HWND, DWORD, DWORD);
|
||||
LRESULT CALLBACK extWindowProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5d35410b205f27b7d0447ec515ce1e5206dd29e67c080744e352b15bfc3bd2bb
|
||||
oid sha256:84f85cf7b70b388793e41f61533229ee60eab599aa6a44407cde99c1ceaa5fdf
|
||||
size 132096
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5a0dc4ed7afe922e53af8aa3eb554e1dc91848b05b0d42ded1aff037f4ff38ad
|
||||
oid sha256:642c9b8d73a7154b70bbb29ebfc13935cd6a26d178eef9989581b4ae8329457f
|
||||
size 137728
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:775ca5f29d0af8b8b9fbf8592148248a64d371fd211475d6205b84801451b029
|
||||
oid sha256:2a8bd736f7b90333f36f1de42e4d8804431732488e553d89391f5daae705a152
|
||||
size 138752
|
||||
|
6
build/dxwnd.0.ini
Normal file
6
build/dxwnd.0.ini
Normal file
@ -0,0 +1,6 @@
|
||||
[window]
|
||||
posx=50
|
||||
posy=50
|
||||
sizx=320
|
||||
sizy=200
|
||||
lang=automatic
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c88b48ffa3289a31b2b1297c3d42d787145913b6224797d744ae7558a346ab6
|
||||
oid sha256:c41e3a123c1b71a51f0f3eebd344a4c96b760b10fa30c715d323825501aad96f
|
||||
size 506368
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3422d3b5f715371e64e4d5fa4db1455eb6418fbdf6ac97e717e6f68f4b26d6d2
|
||||
size 558080
|
||||
oid sha256:46e406641683f8f3314bd14855187c086991f84bd234780f15e49f4de3f5c197
|
||||
size 557568
|
||||
|
@ -1,6 +1,7 @@
|
||||
[window]
|
||||
posx=1236
|
||||
posy=678
|
||||
posx=492
|
||||
posy=330
|
||||
sizx=320
|
||||
sizy=200
|
||||
sizy=274
|
||||
lang=automatic
|
||||
|
||||
|
@ -5,10 +5,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=671088674
|
||||
flag0=939524146
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
flagh0=16
|
||||
flagi0=138412036
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -6,10 +6,10 @@ opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134234210
|
||||
flagg0=1480589320
|
||||
flagg0=1480589312
|
||||
flagh0=2580
|
||||
flagi0=16388
|
||||
tflag0=6211
|
||||
flagi0=4210692
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -24,3 +24,5 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
flagj0=128
|
||||
|
@ -5,10 +5,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=12
|
||||
coord0=0
|
||||
flag0=269492738
|
||||
flagg0=537002497
|
||||
flag0=269492772
|
||||
flagg0=671220225
|
||||
flagh0=20
|
||||
flagi0=0
|
||||
flagi0=4194304
|
||||
tflag0=2
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -8,7 +8,7 @@ coord0=0
|
||||
flag0=679493664
|
||||
flagg0=1207959552
|
||||
flagh0=65556
|
||||
flagi0=4
|
||||
flagi0=69206020
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -24,3 +24,4 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
|
@ -6,10 +6,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=671088672
|
||||
flag0=671105072
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagh0=16
|
||||
flagi0=-2009071612
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,6 +22,6 @@ posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
initts0=-4
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
|
@ -6,9 +6,9 @@ opengllib0=
|
||||
ver0=1
|
||||
coord0=0
|
||||
flag0=138428450
|
||||
flagg0=1108344848
|
||||
flagg0=1242562576
|
||||
flagh0=20
|
||||
flagi0=0
|
||||
flagi0=4194304
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=640
|
||||
sizy0=480
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -6,9 +6,9 @@ opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=16418
|
||||
flagg0=574619648
|
||||
flagg0=708837376
|
||||
flagh0=20
|
||||
flagi0=0
|
||||
flagi0=4194304
|
||||
tflag0=263
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
28
build/exports/Fifa 99 (Direct3D).dxw
Normal file
28
build/exports/Fifa 99 (Direct3D).dxw
Normal file
@ -0,0 +1,28 @@
|
||||
[target]
|
||||
title0=Fifa 99 (Direct3D)
|
||||
path0=D:\Games\Fifa 99\fifa99.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=7
|
||||
coord0=0
|
||||
flag0=671105312
|
||||
flagg0=-937410560
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=128
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
28
build/exports/Fifa 99 (sw renderer).dxw
Normal file
28
build/exports/Fifa 99 (sw renderer).dxw
Normal file
@ -0,0 +1,28 @@
|
||||
[target]
|
||||
title0=Fifa 99 (sw renderer)
|
||||
path0=D:\Games\Fifa 99\fifa99.exe
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=1
|
||||
coord0=0
|
||||
flag0=134234146
|
||||
flagg0=1210073088
|
||||
flagh0=65556
|
||||
flagi0=205520900
|
||||
flagj0=128
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
miny0=0
|
||||
maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
@ -8,8 +8,8 @@ coord0=0
|
||||
flag0=134283430
|
||||
flagg0=134217856
|
||||
flagh0=29
|
||||
flagi0=0
|
||||
tflag0=3
|
||||
flagi0=4194308
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -8,7 +8,7 @@ coord0=0
|
||||
flag0=134217762
|
||||
flagg0=1209008384
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
flagi0=4194308
|
||||
tflag0=64
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -24,3 +24,4 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
|
@ -8,7 +8,7 @@ coord0=0
|
||||
flag0=150994976
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
flagi0=4194308
|
||||
tflag0=259
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=D:\Games\International Football 2000\MSIF2000.EXE
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -8,8 +8,8 @@ coord0=0
|
||||
flag0=134217762
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=1028
|
||||
tflag0=6163
|
||||
flagi0=4194308
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -5,10 +5,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134217762
|
||||
flagg0=1207959552
|
||||
flag0=134217760
|
||||
flagg0=134217728
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
flagi0=541065216
|
||||
tflag0=64
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -24,3 +24,4 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
|
@ -6,9 +6,9 @@ opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=138428450
|
||||
flagg0=1275068416
|
||||
flagh0=8388628
|
||||
flagi0=0
|
||||
flagg0=201326592
|
||||
flagh0=20
|
||||
flagi0=4194304
|
||||
tflag0=259
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -4,11 +4,11 @@ path0=D:\Games\O.R.B\orb.exe
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=2
|
||||
coord0=0
|
||||
flag0=134234144
|
||||
flagg0=1207959568
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
flagi0=4194308
|
||||
tflag0=6163
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -24,3 +24,4 @@ maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
launchpath0=
|
||||
|
@ -1,15 +1,15 @@
|
||||
[target]
|
||||
title0=Project IGI
|
||||
path0=D:\Games\Project IGI\pc\IGI.exe
|
||||
path0=D:\Games\Project IGI\PC\IGI.exe
|
||||
module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=671105060
|
||||
flagg0=-939524096
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=4
|
||||
tflag0=67
|
||||
flagi0=4194308
|
||||
tflag0=64
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -5,10 +5,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=2082
|
||||
flagg0=143654912
|
||||
flag0=134219810
|
||||
flagg0=135266304
|
||||
flagh0=16
|
||||
flagi0=0
|
||||
flagi0=4194304
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -10,7 +10,7 @@ flag0=134217760
|
||||
flagg0=134217728
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
tflag0=6147
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
minx0=0
|
||||
|
@ -5,10 +5,10 @@ module0=
|
||||
opengllib0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=134234146
|
||||
flagg0=1073741840
|
||||
flag0=671105058
|
||||
flagg0=1207959568
|
||||
flagh0=16
|
||||
flagi0=0
|
||||
flagi0=4194304
|
||||
tflag0=0
|
||||
initx0=0
|
||||
inity0=0
|
||||
@ -22,3 +22,6 @@ sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
launchpath0=
|
||||
winver0=0
|
||||
maxres0=0
|
||||
|
@ -19,9 +19,10 @@ maxx0=0
|
||||
maxy0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=1280
|
||||
sizy0=960
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
flagj0=0
|
||||
|
5
build/exports/dxwnd.ini
Normal file
5
build/exports/dxwnd.ini
Normal file
@ -0,0 +1,5 @@
|
||||
[window]
|
||||
posx=1036
|
||||
posy=444
|
||||
sizx=320
|
||||
sizy=200
|
@ -595,3 +595,8 @@ added: GetTempFileName fix to handle Win95 differences. This makes "Powerslide"
|
||||
v2.02.91
|
||||
fix: bug in bilinear filtering mode causing possible game crashes when blitting partial rectangles (es. Age of Empires II cursor)
|
||||
added: AERO friendly mode - brings AERO compatibility and incredible performance boost for ddraw games in surface emulation mode
|
||||
|
||||
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.
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
||||
// comment defines to get rid of some proxy logs....
|
||||
#define TRACECOMMETHODS YES
|
||||
//#define TRACECOMMETHODS YES
|
||||
#define HOOKDDRAW YES
|
||||
#define HOOKCLIPPER YES
|
||||
#define HOOKSURFACE YES
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define INITGUID
|
||||
#define FULLHEXDUMP
|
||||
|
||||
#include <windows.h>
|
||||
#include <ddraw.h>
|
||||
@ -429,6 +430,13 @@ static void LogSurfaceAttributes(LPDDSURFACEDESC lpddsd, char *label, int line)
|
||||
if (lpddsd->dwFlags & DDSD_CKSRCOVERLAY ) OutTrace(" CKSrcOverlay=(%x,%x)", lpddsd->ddckCKSrcOverlay.dwColorSpaceLowValue, lpddsd->ddckCKSrcOverlay.dwColorSpaceHighValue);
|
||||
if (lpddsd->dwFlags & DDSD_PIXELFORMAT ) OutTrace("%s", DumpPixelFormat((LPDDSURFACEDESC2)lpddsd));
|
||||
if (lpddsd->dwFlags & DDSD_LPSURFACE) OutTrace(" Surface=%x", lpddsd->lpSurface);
|
||||
if (lpddsd->dwFlags & DDSD_ZBUFFERBITDEPTH) OutTrace(" ZBufferBitDepth=%d", lpddsd->dwZBufferBitDepth);
|
||||
if (lpddsd->dwFlags & DDSD_ALPHABITDEPTH) OutTrace(" AlphaBitDepth=%d", lpddsd->dwAlphaBitDepth);
|
||||
if (lpddsd->dwFlags & DDSD_REFRESHRATE) OutTrace(" RefreshRate=%d", lpddsd->dwRefreshRate);
|
||||
if (lpddsd->dwFlags & DDSD_LINEARSIZE) OutTrace(" LinearSize=%d", lpddsd->dwLinearSize);
|
||||
//if (lpddsd->dwFlags & DDSD_TEXTURESTAGE) OutTrace(" TextureStage=%x", lpddsd->dwTextureStage);
|
||||
//if (lpddsd->dwFlags & DDSD_FVF) OutTrace(" FVF=%x", lpddsd->dwFVF);
|
||||
|
||||
OutTrace("\n");
|
||||
}
|
||||
|
||||
@ -656,6 +664,8 @@ static void ddSetCompatibility()
|
||||
res=(*pSetAppCompatData)(2, 0);
|
||||
OutTraceDW("HookDirectDraw: SetAppCompatData(2,0) ret=%x(%s)\n", res, ExplainDDError(res));
|
||||
}
|
||||
else
|
||||
OutTraceDW("HookDirectDraw: missing SetAppCompatData call\n");
|
||||
FreeLibrary(hinst);
|
||||
}
|
||||
|
||||
@ -2381,7 +2391,7 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion)
|
||||
if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_TEXTURE)){
|
||||
if (dxw.dwFlags3 & FORCESHEL) {
|
||||
lpddsd->ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) lpddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
lpddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
}
|
||||
// no further changes...
|
||||
return;
|
||||
@ -2452,8 +2462,7 @@ static HRESULT BuildPrimaryEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf
|
||||
ddsd.dwFlags |= (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT);
|
||||
ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM);
|
||||
// DDSCAPS_OFFSCREENPLAIN seems required to support the palette in memory surfaces
|
||||
ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN);
|
||||
ddsd.dwWidth = dxw.GetScreenWidth();
|
||||
ddsd.dwHeight = dxw.GetScreenHeight();
|
||||
|
||||
@ -2518,8 +2527,7 @@ static HRESULT BuildPrimaryEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf
|
||||
if(lpDDSEmu_Back==NULL){
|
||||
ClearSurfaceDesc((void *)&ddsd, dxversion);
|
||||
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.dwWidth = dxw.GetScreenWidth();
|
||||
ddsd.dwHeight = dxw.GetScreenHeight();
|
||||
if(dxw.dwFlags4 & BILINEARFILTER){
|
||||
@ -2549,6 +2557,9 @@ 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);
|
||||
@ -2613,8 +2624,7 @@ static HRESULT BuildBackBufferEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS
|
||||
ddsd.dwFlags |= (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT);
|
||||
ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_BACKBUFFER|DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM);
|
||||
// DDSCAPS_OFFSCREENPLAIN seems required to support the palette in memory surfaces
|
||||
ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN);
|
||||
ddsd.dwWidth = dxw.GetScreenWidth();
|
||||
ddsd.dwHeight = dxw.GetScreenHeight();
|
||||
GetPixFmt(&ddsd);
|
||||
@ -2647,7 +2657,7 @@ 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);
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
if (dxversion >= 4) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN;
|
||||
ddsd.dwWidth = dxw.GetScreenWidth();
|
||||
ddsd.dwHeight = dxw.GetScreenHeight();
|
||||
@ -2669,7 +2679,7 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS
|
||||
if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res==DDERR_OUTOFVIDEOMEMORY)){
|
||||
OutTraceDW("CreateSurface: CreateSurface DDERR_OUTOFVIDEOMEMORY ERROR at %d, retry in SYSTEMMEMORY\n", __LINE__);
|
||||
ddsd.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0);
|
||||
}
|
||||
if(res){
|
||||
@ -2694,14 +2704,13 @@ static HRESULT BuildGenericEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf
|
||||
|
||||
memcpy(&ddsd, lpddsd, lpddsd->dwSize); // Copy over ....
|
||||
FixSurfaceCaps(&ddsd, dxversion);
|
||||
if(!(dxw.dwFlags5 & SYSTEMMEMORY)) ddsd.ddsCaps.dwCaps &= ~DDSCAPS_SYSTEMMEMORY;
|
||||
|
||||
DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Emu Generic]" , __LINE__);
|
||||
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, pu);
|
||||
if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res==DDERR_OUTOFVIDEOMEMORY)){
|
||||
OutTraceDW("CreateSurface ERROR: res=%x(%s) at %d, retry\n", res, ExplainDDError(res), __LINE__);
|
||||
ddsd.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, pu);
|
||||
}
|
||||
if (res) {
|
||||
@ -2740,7 +2749,7 @@ static HRESULT BuildGenericDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf
|
||||
if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && ((res==DDERR_OUTOFVIDEOMEMORY)||(res==DDERR_UNSUPPORTED))){
|
||||
OutTraceDW("CreateSurface ERROR: res=%x(%s) at %d, retry\n", res, ExplainDDError(res), __LINE__);
|
||||
lpddsd->ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) lpddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
lpddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
res = (*pCreateSurface)(lpdd, lpddsd, lplpdds, 0);
|
||||
}
|
||||
if(res){
|
||||
@ -3090,15 +3099,25 @@ HRESULT WINAPI PrimaryStretchBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, L
|
||||
DDSURFACEDESC ddsd;
|
||||
RECT TmpRect;
|
||||
LPDIRECTDRAWSURFACE lpddsTmp;
|
||||
LPDIRECTDRAWSURFACE lpddsBak;
|
||||
DDSCAPS caps;
|
||||
caps.dwCaps = DDSCAPS_BACKBUFFER;
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
lpddssrc->GetSurfaceDesc(&ddsd);
|
||||
if(lpddssrc==NULL){
|
||||
// blit from backbuffer
|
||||
lpdds->GetAttachedSurface(&caps, &lpddsBak);
|
||||
if(lpddsBak) lpddsBak->GetSurfaceDesc(&ddsd);
|
||||
}
|
||||
else{
|
||||
// blit from surface
|
||||
lpddssrc->GetSurfaceDesc(&ddsd);
|
||||
}
|
||||
TmpRect.left = TmpRect.top = 0;
|
||||
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;
|
||||
if(dxw.dwFlags5 & SYSTEMMEMORY) ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.ddsCaps.dwCaps = (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
|
||||
@ -3271,7 +3290,9 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
// Blit to primary surface
|
||||
// =========================
|
||||
|
||||
if(dxw.HandleFPS()) return DD_OK;
|
||||
if(!lpdestrect ||
|
||||
(lpdestrect && (lpdestrect->bottom == dxw.GetScreenHeight()) && (lpdestrect->right == dxw.GetScreenWidth())))
|
||||
if(dxw.HandleFPS()) return DD_OK;
|
||||
if(dxw.dwFlags5 & NOBLT) return DD_OK;
|
||||
|
||||
destrect=dxw.MapWindowRect(lpdestrect);
|
||||
@ -3289,7 +3310,6 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
|
||||
if (lpdds != lpddssrc) {
|
||||
dxw.ShowOverlay(lpddssrc);
|
||||
if (IsDebug) BlitTrace("PRIM-NOEMU", lpsrcrect, &destrect, __LINE__);
|
||||
//res= (*pBlt)(lpdds, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
|
||||
res=(*pPrimaryBlt)(lpdds, &destrect, lpddssrc, lpsrcrect);
|
||||
}
|
||||
if(res){
|
||||
@ -4102,6 +4122,12 @@ HRESULT WINAPI EnumModesCallbackDumper(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID l
|
||||
OutTrace("\tdwRefreshRate=%d\n", lpDDSurfaceDesc->dwRefreshRate);
|
||||
OutTrace("\tlpSurface=%x\n", lpDDSurfaceDesc->lpSurface);
|
||||
OutTrace("\tddpfPixelFormat %s\n", DumpPixelFormat((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
||||
|
||||
#ifdef FULLHEXDUMP
|
||||
OutTrace("DDSurfaceDesc=");
|
||||
OutTraceHex((BYTE *)lpDDSurfaceDesc, sizeof(DDSURFACEDESC));
|
||||
#endif
|
||||
|
||||
return DDENUMRET_OK;
|
||||
}
|
||||
|
||||
@ -4224,9 +4250,10 @@ HRESULT WINAPI extEnumDisplayModes(EnumDisplayModes1_Type pEnumDisplayModes, LPD
|
||||
HRESULT res;
|
||||
SupportedRes_Type *SupportedRes;
|
||||
NewContext_Type NewContext;
|
||||
|
||||
OutTraceDDRAW("EnumDisplayModes(D): lpdd=%x flags=%x lpddsd=%x callback=%x\n", lpdd, dwflags, lpddsd, cb);
|
||||
|
||||
if((dxw.dwFlags4 & NATIVERES)){
|
||||
if(dxw.dwFlags4 & NATIVERES){
|
||||
NewContext.dwWidth = 0;
|
||||
NewContext.dwHeight = 0;
|
||||
NewContext.lpContext=lpContext;
|
||||
@ -4244,11 +4271,15 @@ HRESULT WINAPI extEnumDisplayModes(EnumDisplayModes1_Type pEnumDisplayModes, LPD
|
||||
int SupportedDepths[5]={8,16,24,32,0};
|
||||
int ResIdx, DepthIdx;
|
||||
DDSURFACEDESC2 EmuDesc;
|
||||
DWORD dwSize;
|
||||
|
||||
EmuDesc.dwRefreshRate = 0;
|
||||
EmuDesc.ddpfPixelFormat.dwFlags = DDPF_RGB;
|
||||
if (lpddsd) EmuDesc.dwSize=lpddsd->dwSize; // sizeof either DDSURFACEDESC or DDSURFACEDESC2 !!!
|
||||
else EmuDesc.dwSize = sizeof(DDSURFACEDESC2);
|
||||
if (lpddsd) dwSize=lpddsd->dwSize; // sizeof either DDSURFACEDESC or DDSURFACEDESC2 !!!
|
||||
else dwSize = sizeof(DDSURFACEDESC2);
|
||||
if(dwSize > sizeof(DDSURFACEDESC2)) dwSize=sizeof(DDSURFACEDESC2);
|
||||
memset(&EmuDesc, 0, dwSize);
|
||||
EmuDesc.dwSize=dwSize;
|
||||
EmuDesc.dwFlags=DDSD_PIXELFORMAT|DDSD_REFRESHRATE|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PITCH;
|
||||
SupportedRes = (dxw.dwFlags4 & SUPPORTHDTV) ? &SupportedHDTVRes[0] : &SupportedSVGARes[0];
|
||||
for (ResIdx=0; SupportedRes[ResIdx].h; ResIdx++){
|
||||
@ -4260,9 +4291,8 @@ HRESULT WINAPI extEnumDisplayModes(EnumDisplayModes1_Type pEnumDisplayModes, LPD
|
||||
EmuDesc.ddpfPixelFormat.dwRGBBitCount=SupportedDepths[DepthIdx];
|
||||
EmuDesc.lPitch=SupportedRes[ResIdx].w * SupportedDepths[DepthIdx] / 8;
|
||||
FixPixelFormat(EmuDesc.ddpfPixelFormat.dwRGBBitCount, &(EmuDesc.ddpfPixelFormat));
|
||||
EnumModesCallbackDumper((LPDDSURFACEDESC)&EmuDesc, lpContext);
|
||||
res=(*cb)((LPDDSURFACEDESC)&EmuDesc, lpContext);
|
||||
OutTraceDW("EnumDisplayModes(D): proposed depth[%d]=%d size[%d]=(%d,%d) res=%x\n",
|
||||
DepthIdx, SupportedDepths[DepthIdx], ResIdx, SupportedRes[ResIdx].w, SupportedRes[ResIdx].h, res);
|
||||
if(res==DDENUMRET_CANCEL) break;
|
||||
}
|
||||
if(res==DDENUMRET_CANCEL) break;
|
||||
@ -4784,6 +4814,13 @@ HRESULT WINAPI extGetSurfaceDesc(GetSurfaceDesc_Type pGetSurfaceDesc, LPDIRECTDR
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef EXPERIMENTAL_2
|
||||
if(1) {
|
||||
IsFixed=TRUE;
|
||||
lpddsd->ddpfPixelFormat.dwFlags |= DDPF_ALPHAPIXELS;
|
||||
lpddsd->ddsCaps.dwCaps |= DDSCAPS_3DDEVICE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(IsFixed) LogSurfaceAttributes(lpddsd, "GetSurfaceDesc [FIXED]", __LINE__);
|
||||
|
||||
|
@ -1587,8 +1587,8 @@ void SetBltTransformations()
|
||||
}
|
||||
|
||||
pPrimaryBlt = PrimaryBlt;
|
||||
if(dxw.dwFlags5 & DOFASTBLT) pPrimaryBlt = PrimaryFastBlt;
|
||||
if(dxw.dwFlags5 & DOSTRETCHBLT) pPrimaryBlt = PrimaryStretchBlt;
|
||||
if(dxw.dwFlags5 & NOBLT) pPrimaryBlt = PrimaryNoBlt;
|
||||
if(dxw.dwFlags5 & AEROBOOST) pPrimaryBlt = PrimaryStretchBlt;
|
||||
if(dxw.dwFlags5 & DOFASTBLT) pPrimaryBlt = PrimaryFastBlt; // debug opt
|
||||
if(dxw.dwFlags5 & NOBLT) pPrimaryBlt = PrimaryNoBlt; // debug opt
|
||||
return;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ static char *Flag4Names[32]={
|
||||
|
||||
static char *Flag5Names[32]={
|
||||
"DIABLOTWEAK", "CLEARTARGET", "NOWINPOSCHANGES", "SYSTEMMEMORY",
|
||||
"NOBLT", "DOSTRETCHBLT", "DOFASTBLT", "AEROBOOST",
|
||||
"NOBLT", "-----", "DOFASTBLT", "AEROBOOST",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
@ -211,6 +211,12 @@ static BOOL CheckCompatibilityFlags()
|
||||
}
|
||||
#endif
|
||||
|
||||
void OutTraceHex(BYTE *bBuf, int iLen)
|
||||
{
|
||||
for(int i=0; i<iLen; i++) OutTrace("%02X ", *(bBuf++));
|
||||
OutTrace("\n");
|
||||
}
|
||||
|
||||
static void dx_ToggleLogging()
|
||||
{
|
||||
// toggle LOGGING
|
||||
|
@ -82,7 +82,6 @@ void dxwCore::InitTarget(TARGETMAP *target)
|
||||
dwFlags4 = target->flags4;
|
||||
dwFlags5 = target->flags5;
|
||||
dwTFlags = target->tflags;
|
||||
if(dwFlags5 & AEROBOOST) dwFlags5 |= (SYSTEMMEMORY|DOSTRETCHBLT);
|
||||
Windowize = (dwFlags2 & WINDOWIZE) ? TRUE : FALSE;
|
||||
if(dwFlags3 & FULLSCREENONLY) FullScreen=TRUE;
|
||||
gsModules = target->module;
|
||||
|
@ -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.91"
|
||||
#define VERSION "2.02.92"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
|
||||
|
Binary file not shown.
@ -720,11 +720,10 @@ HRESULT WINAPI extCreateDevice2(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE
|
||||
dxw.dwFlags1 &= ~EMULATESURFACE;
|
||||
dxw.dwFlags1 |= LOCKEDSURFACE;
|
||||
res=(*pCreateDevice2)(lpd3d, Guid, lpdds, lplpd3dd);
|
||||
if (res) OutTraceE("CreateDevice(D3D2) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
else OutTraceD3D("CreateDevice(D3D2): Emulation OFF\n");
|
||||
}
|
||||
if (res) {
|
||||
OutTraceE("CreateDevice(D3D2) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
if(res) return res;
|
||||
}
|
||||
|
||||
OutTraceD3D("CreateDevice(D3D2): lpd3dd=%x\n", lpd3d, *lplpd3dd);
|
||||
@ -744,11 +743,10 @@ HRESULT WINAPI extCreateDevice3(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE4
|
||||
dxw.dwFlags1 &= ~EMULATESURFACE;
|
||||
dxw.dwFlags1 |= LOCKEDSURFACE;
|
||||
res=(*pCreateDevice3)(lpd3d, Guid, lpdds, lplpd3dd, unk);
|
||||
if (res) OutTraceE("CreateDevice(D3D3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
else OutTraceD3D("CreateDevice(D3D3): Emulation OFF\n");
|
||||
}
|
||||
if (res) {
|
||||
OutTraceE("CreateDevice(D3D3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
if(res) return res;
|
||||
}
|
||||
|
||||
OutTraceD3D("CreateDevice(D3D3): lpd3dd=%x\n", lpd3d, *lplpd3dd);
|
||||
@ -778,11 +776,10 @@ HRESULT WINAPI extCreateDevice7(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE7
|
||||
bDontReleaseBackBuffer = TRUE;
|
||||
res=(*pCreateDevice7)(lpd3d, Guid, lpdds, lplpd3dd);
|
||||
bDontReleaseBackBuffer = FALSE;
|
||||
if (res) OutTraceE("CreateDevice(D3D7) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
else OutTraceD3D("CreateDevice(D3D7): Emulation OFF\n");
|
||||
}
|
||||
if (res) {
|
||||
OutTraceE("CreateDevice(D3D7) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
|
||||
return res;
|
||||
}
|
||||
if(res) return res;
|
||||
}
|
||||
|
||||
OutTraceD3D("CreateDevice(D3D7): lpd3dd=%x\n", lpd3d, *lplpd3dd);
|
||||
|
3930
dll/hddraw.cpp
3930
dll/hddraw.cpp
File diff suppressed because it is too large
Load Diff
@ -357,11 +357,28 @@ void dxwFixWindowPos(char *ApiName, HWND hwnd, LPARAM lParam)
|
||||
// note: v2.1.93: compensation must refer to the client area, not the wp
|
||||
// window dimensions that include the window borders.
|
||||
if(BorderX==-1){
|
||||
#if 0
|
||||
RECT client, full;
|
||||
(*pGetClientRect)(hwnd, &client);
|
||||
(*pGetWindowRect)(hwnd, &full);
|
||||
BorderX= full.right - full.left - client.right;
|
||||
BorderY= full.bottom - full.top - client.bottom;
|
||||
#else
|
||||
// v2.02.92: Fixed for AERO mode, where GetWindowRect substantially LIES!
|
||||
RECT client, full;
|
||||
LONG dwStyle, dwExStyle;
|
||||
HMENU hMenu;
|
||||
extern GetWindowLong_Type pGetWindowLongA;
|
||||
(*pGetClientRect)(hwnd, &client);
|
||||
full=client;
|
||||
dwStyle=(*pGetWindowLongA)(hwnd, GWL_STYLE);
|
||||
dwExStyle=(*pGetWindowLongA)(hwnd, GWL_EXSTYLE);
|
||||
hMenu = (dwStyle & WS_CHILD) ? NULL : GetMenu(hwnd);
|
||||
AdjustWindowRectEx(&full, dwStyle, (hMenu!=NULL), dwExStyle);
|
||||
if (hMenu) CloseHandle(hMenu);
|
||||
BorderX= full.right - full.left - client.right;
|
||||
BorderY= full.bottom - full.top - client.bottom;
|
||||
#endif
|
||||
OutTraceDW("%s: KEEPASPECTRATIO window borders=(%d,%d)\n", ApiName, BorderX, BorderY);
|
||||
}
|
||||
extern LRESULT LastCursorPos;
|
||||
|
@ -34,7 +34,7 @@ void CTabDebug::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_MARKBLIT, cTarget->m_MarkBlit);
|
||||
DDX_Check(pDX, IDC_SYSTEMMEMORY, cTarget->m_SystemMemory);
|
||||
DDX_Check(pDX, IDC_NOBLT, cTarget->m_NoBlt);
|
||||
DDX_Check(pDX, IDC_STRETCHBLT, cTarget->m_StretchBlt);
|
||||
// DDX_Check(pDX, IDC_STRETCHBLT, cTarget->m_StretchBlt);
|
||||
DDX_Check(pDX, IDC_FASTBLT, cTarget->m_FastBlt);
|
||||
DDX_Check(pDX, IDC_ANALYTICMODE, cTarget->m_AnalyticMode);
|
||||
DDX_Check(pDX, IDC_SURFACEWARN, cTarget->m_SurfaceWarn);
|
||||
|
@ -107,7 +107,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
||||
m_MarkBlit = FALSE;
|
||||
m_SystemMemory = FALSE;
|
||||
m_NoBlt = FALSE;
|
||||
m_StretchBlt = FALSE;
|
||||
// m_StretchBlt = FALSE;
|
||||
m_FastBlt = FALSE;
|
||||
m_PreventMaximize = FALSE;
|
||||
m_ClientRemapping = TRUE; // default true !!
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
BOOL m_MarkBlit;
|
||||
BOOL m_SystemMemory;
|
||||
BOOL m_NoBlt;
|
||||
BOOL m_StretchBlt;
|
||||
// BOOL m_StretchBlt;
|
||||
BOOL m_FastBlt;
|
||||
BOOL m_PreventMaximize;
|
||||
BOOL m_ClientRemapping;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -224,7 +224,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
||||
if(dlg->m_MarkBlit) t->flags3 |= MARKBLIT;
|
||||
if(dlg->m_SystemMemory) t->flags5 |= SYSTEMMEMORY;
|
||||
if(dlg->m_NoBlt) t->flags5 |= NOBLT;
|
||||
if(dlg->m_StretchBlt) t->flags5 |= DOSTRETCHBLT;
|
||||
//if(dlg->m_StretchBlt) t->flags5 |= DOSTRETCHBLT;
|
||||
if(dlg->m_FastBlt) t->flags5 |= DOFASTBLT;
|
||||
if(dlg->m_PreventMaximize) t->flags |= PREVENTMAXIMIZE;
|
||||
if(dlg->m_ClientRemapping) t->flags |= CLIENTREMAPPING;
|
||||
@ -409,7 +409,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
||||
dlg->m_MarkBlit = t->flags3 & MARKBLIT ? 1 : 0;
|
||||
dlg->m_SystemMemory = t->flags5 & SYSTEMMEMORY ? 1 : 0;
|
||||
dlg->m_NoBlt = t->flags5 & NOBLT ? 1 : 0;
|
||||
dlg->m_StretchBlt = t->flags5 & DOSTRETCHBLT ? 1 : 0;
|
||||
//dlg->m_StretchBlt = t->flags5 & DOSTRETCHBLT ? 1 : 0;
|
||||
dlg->m_FastBlt = t->flags5 & DOFASTBLT ? 1 : 0;
|
||||
dlg->m_PreventMaximize = t->flags & PREVENTMAXIMIZE ? 1 : 0;
|
||||
dlg->m_ClientRemapping = t->flags & CLIENTREMAPPING ? 1 : 0;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user