mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_03_84_src
Former-commit-id: 44f86a910079133c39c744e710ca17f736bf2051
This commit is contained in:
parent
06afb3514d
commit
ffbdf3bca0
Binary file not shown.
@ -234,6 +234,9 @@
|
||||
#define SUPPRESSDIERRORS 0x00010000 // Suppress DirectInput common errors
|
||||
#define HOOKNORUN 0x00020000 // Hook process but don't start it from DxWnd interface
|
||||
#define FIXBINDTEXTURE 0x00040000 // Fix the problems caused by the lack of glActiveTexture on some Windows OpenGL32.dll versions
|
||||
#define ENUM16BITMODES 0x00080000 // Enumerates 16 bit video modes when using DirectDraw8/9::EnumAdapterModes on a Win10 OS
|
||||
#define SHAREDKEYBOARD 0x00100000 // Forces DirectInput cooperative level to NONEXCLUSIVE mode for the keyboard
|
||||
#define HOOKNOUPDATE 0x00200000 // Updates the original addresses when changed
|
||||
|
||||
// eighth flags DWORD dxw.dwFlags8:
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ffb381fe04bba437bffb3771d0aef016931d9c10f751d7dea21a711537ccbd87
|
||||
size 678400
|
||||
oid sha256:3c9903cd38ba533b4ed2c7e2d0d9023411b0a32e056d35845630c5e9abc61705
|
||||
size 680448
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad75238bb04366e33af8a86a0cfb4c8fc760794f5029c2a194fe3af1615f901d
|
||||
size 655360
|
||||
oid sha256:61b16a6740d6ee40062f21cfafc50b64e7340636e9148c7a861b48f8ed86d697
|
||||
size 655872
|
||||
|
32
build/exports/Chaos Overlords.dxw
Normal file
32
build/exports/Chaos Overlords.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Chaos Overlords
|
||||
path0=D:\Games\Chaos Overlords\Chaos Overlords.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=327680
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
32
build/exports/Dragon Heart.dxw
Normal file
32
build/exports/Dragon Heart.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Dragon Heart
|
||||
path0=D:\Games\DRAGONH\DRAGON.EXE
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=Set game video mode to fullscreen for DxWnd intervention
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=681574434
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
32
build/exports/Extreme-G_2.dxw
Normal file
32
build/exports/Extreme-G_2.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Extreme-G_2
|
||||
path0=D:\Games\Extreme-G_2\xg2pc.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE\ACCLAIM]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\ACCLAIM\Extreme-G 2]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\ACCLAIM\Extreme-G 2\1.00.000]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Acclaim Entertainment]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Acclaim Entertainment\XGII]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Acclaim Entertainment\XGII\1.00]\n"cont1digital"=hex:00,80,00,00,22,00,00,04,00,40,00,00,25,00,00,04,20,00,00,00,\\n 31,00,00,04,10,00,00,00,23,00,00,04,00,20,00,00,24,00,00,04,00,10,00,00,01,\\n 00,00,04,00,08,00,00,17,00,00,04,00,02,00,00,00,00,00,00,00,01,00,00,00,00,\\n 00,00,00,04,00,00,18,00,00,04,08,00,00,00,32,00,00,04,02,00,00,00,20,00,00,\\n 04,01,00,00,00,21,00,00,04,04,00,00,00,39,00,00,04\n"cont1analogue"=hex:cb,00,00,04,cd,00,80,4c,d0,00,00,4d,c8,00,00,04\n"cont2digital"=hex:00,80,00,00,00,00,00,00,00,40,00,00,00,00,00,00,20,00,00,00,\\n 00,00,00,00,10,00,00,00,00,00,00,00,00,20,00,00,00,00,00,00,00,10,00,00,00,\\n 00,00,00,00,08,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,01,00,00,00,00,\\n 00,00,00,04,00,00,00,00,00,00,08,00,00,00,00,00,00,00,02,00,00,00,00,00,00,\\n 00,01,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00\n"cont2analogue"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00\n"cont3digital"=hex:00,80,00,00,00,00,00,00,00,40,00,00,00,00,00,00,20,00,00,00,\\n 00,00,00,00,10,00,00,00,00,00,00,00,00,20,00,00,00,00,00,00,00,10,00,00,00,\\n 00,00,00,00,08,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,01,00,00,00,00,\\n 00,00,00,04,00,00,00,00,00,00,08,00,00,00,00,00,00,00,02,00,00,00,00,00,00,\\n 00,01,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00\n"cont3analogue"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00\n"cont4digital"=hex:00,80,00,00,00,00,00,00,00,40,00,00,00,00,00,00,20,00,00,00,\\n 00,00,00,00,10,00,00,00,00,00,00,00,00,20,00,00,00,00,00,00,00,10,00,00,00,\\n 00,00,00,00,08,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,01,00,00,00,00,\\n 00,00,00,04,00,00,00,00,00,00,08,00,00,00,00,00,00,00,02,00,00,00,00,00,00,\\n 00,01,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00\n"cont4analogue"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00\n
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=136314880
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=8192
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
32
build/exports/Fatal Abyss.dxw
Normal file
32
build/exports/Fatal Abyss.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Fatal Abyss
|
||||
path0=D:\Games\Fatal Abyss\FABYSS.EXE
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=681574434
|
||||
flagg0=1208090752
|
||||
flagh0=20
|
||||
flagi0=138543108
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
32
build/exports/Planet of the Apes.dxw
Normal file
32
build/exports/Planet of the Apes.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=Planet of the Apes
|
||||
path0=D:\Games\Planet of the Apes\pota.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=203423795
|
||||
flagg0=1207959552
|
||||
flagh0=524308
|
||||
flagi0=138412036
|
||||
flagj0=67113088
|
||||
flagk0=-1879044096
|
||||
flagl0=1048576
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=-1050
|
||||
posy0=100
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
32
build/exports/ZugyA.dxw
Normal file
32
build/exports/ZugyA.dxw
Normal file
@ -0,0 +1,32 @@
|
||||
[target]
|
||||
title0=ZugyA
|
||||
path0=D:\Games\ZugyA\zugya.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
coord0=0
|
||||
flag0=136314914
|
||||
flagg0=1209008128
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=-1
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
@ -1225,4 +1225,13 @@ v2.03.83
|
||||
fix: cleared surface list on primary surface creation: "Daytona USA" keeps creating new primary surfaces, so it saturated the surface list.
|
||||
fix: calling the proper GetGDISurface pointer in Lock wrapper
|
||||
fix: HookProc routine causing crash with GTA3, fixed for Win7 and Win10
|
||||
fix: LoadLibrayA/W after a SetWorkingDir invocation didn't load the local modules. Fixes "The Rage".
|
||||
fix: LoadLibrayA/W after a SetWorkingDir invocation didn't load the local modules. Fixes "The Rage".
|
||||
|
||||
v2.03.84
|
||||
add: new flag "No hook update" (HOOKNOUPDATE) to disable update of original call address in case of change
|
||||
add: hint message for "No hook update" condition
|
||||
add: hint message for memory signed integer overflow
|
||||
add: GUI flag "Name by Folder" to default the program name field with the program folder instead of program filename
|
||||
add: new flag "Set keyboard shared coop. level" (SHAREDKEYBOARD) to change directinput keyboard cooperative level mode
|
||||
add: new flag Direct3D / "Enumerate 16bit modes" (ENUM16BITMODES) to force enumeration of 16 bit video modes on Win10 desktop when not listed
|
||||
fix: GUI randomic value for Injection mode selector when adding new entry
|
||||
|
@ -10,6 +10,47 @@
|
||||
|
||||
extern unsigned int HashSurface(BYTE *, int, int, int);
|
||||
|
||||
static WORD Melt_123(WORD c1, WORD c2)
|
||||
{
|
||||
WORD r1, r2, g1, g2, b1, b2;
|
||||
WORD r, g, b;
|
||||
r1 = (c1 & 0xF800) >> 11;
|
||||
r2 = (c2 & 0xF800) >> 11;
|
||||
g1 = (c1 & 0x07E0) >> 5;
|
||||
g2 = (c2 & 0x07E0) >> 5;
|
||||
b1 = (c1 & 0x001F) >> 0;
|
||||
b2 = (c2 & 0x001F) >> 0;
|
||||
r = (((r2 * 2) + r1) / 3) & 0x1F;
|
||||
g = (((g2 * 2) + g1) / 3) & 0x3F;
|
||||
b = (((b2 * 2) + b1) / 3) & 0x1F;
|
||||
return (r << 11) | (g << 5) | (b << 0);
|
||||
}
|
||||
|
||||
static DWORD Melt32_123(WORD c1, WORD c2)
|
||||
{
|
||||
WORD r1, r2, g1, g2, b1, b2;
|
||||
DWORD r, g, b;
|
||||
r1 = (c1 & 0xF800) >> 11;
|
||||
r2 = (c2 & 0xF800) >> 11;
|
||||
g1 = (c1 & 0x07E0) >> 5;
|
||||
g2 = (c2 & 0x07E0) >> 5;
|
||||
b1 = (c1 & 0x001F) >> 0;
|
||||
b2 = (c2 & 0x001F) >> 0;
|
||||
r = (((r2 * 2) + r1) / 3) & 0x1F;
|
||||
g = (((g2 * 2) + g1) / 3) & 0x3F;
|
||||
b = (((b2 * 2) + b1) / 3) & 0x1F;
|
||||
return (r << (16+3)) | (g << (8+2)) | (b << (0+3));
|
||||
}
|
||||
|
||||
static DWORD Conv32(WORD c)
|
||||
{
|
||||
DWORD r, g, b;
|
||||
r = ((c & 0xF800) >> 11) & 0x1F;
|
||||
g = ((c & 0x07E0) >> 5) & 0x3F;
|
||||
b = ((c & 0x001F) >> 0) & 0x1F;
|
||||
return (r << (16+3)) | (g << (8+2)) | (b << (0+3));
|
||||
}
|
||||
|
||||
char *ExplainD3DSurfaceFormat(DWORD dwFormat)
|
||||
{
|
||||
char *s;
|
||||
@ -83,47 +124,6 @@ char *ExplainD3DSurfaceFormat(DWORD dwFormat)
|
||||
return s;
|
||||
}
|
||||
|
||||
static WORD Melt_123(WORD c1, WORD c2)
|
||||
{
|
||||
WORD r1, r2, g1, g2, b1, b2;
|
||||
WORD r, g, b;
|
||||
r1 = (c1 & 0xF800) >> 11;
|
||||
r2 = (c2 & 0xF800) >> 11;
|
||||
g1 = (c1 & 0x07E0) >> 5;
|
||||
g2 = (c2 & 0x07E0) >> 5;
|
||||
b1 = (c1 & 0x001F) >> 0;
|
||||
b2 = (c2 & 0x001F) >> 0;
|
||||
r = (((r2 * 2) + r1) / 3) & 0x1F;
|
||||
g = (((g2 * 2) + g1) / 3) & 0x3F;
|
||||
b = (((b2 * 2) + b1) / 3) & 0x1F;
|
||||
return (r << 11) | (g << 5) | (b << 0);
|
||||
}
|
||||
|
||||
static DWORD Melt32_123(WORD c1, WORD c2)
|
||||
{
|
||||
WORD r1, r2, g1, g2, b1, b2;
|
||||
DWORD r, g, b;
|
||||
r1 = (c1 & 0xF800) >> 11;
|
||||
r2 = (c2 & 0xF800) >> 11;
|
||||
g1 = (c1 & 0x07E0) >> 5;
|
||||
g2 = (c2 & 0x07E0) >> 5;
|
||||
b1 = (c1 & 0x001F) >> 0;
|
||||
b2 = (c2 & 0x001F) >> 0;
|
||||
r = (((r2 * 2) + r1) / 3) & 0x1F;
|
||||
g = (((g2 * 2) + g1) / 3) & 0x3F;
|
||||
b = (((b2 * 2) + b1) / 3) & 0x1F;
|
||||
return (r << (16+3)) | (g << (8+2)) | (b << (0+3));
|
||||
}
|
||||
|
||||
static DWORD Conv32(WORD c)
|
||||
{
|
||||
DWORD r, g, b;
|
||||
r = ((c & 0xF800) >> 11) & 0x1F;
|
||||
g = ((c & 0x07E0) >> 5) & 0x3F;
|
||||
b = ((c & 0x001F) >> 0) & 0x1F;
|
||||
return (r << (16+3)) | (g << (8+2)) | (b << (0+3));
|
||||
}
|
||||
|
||||
#define GRIDSIZE 16
|
||||
|
||||
void D3DTextureHighlight(D3DSURFACE_DESC Desc, D3DLOCKED_RECT LockedRect)
|
||||
|
@ -1471,6 +1471,9 @@ static void MaskCapsD(LPDDCAPS c1, LPDDCAPS c2)
|
||||
|
||||
static void HandleCapsD(char *sLabel, LPDDCAPS c)
|
||||
{
|
||||
const DWORD dwMaxMem = 0x70000000;
|
||||
const DWORD dwHugeMem = 0xFFFFFFFF;
|
||||
|
||||
OutTraceDDRAW(
|
||||
"GetCaps(%s): caps=%x(%s) caps2=%x(%s) palcaps=%x(%s) "
|
||||
"fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n",
|
||||
@ -1485,14 +1488,17 @@ static void HandleCapsD(char *sLabel, LPDDCAPS c)
|
||||
sLabel, c->dwVidMemTotal, c->dwVidMemFree, c->dwZBufferBitDepths, ExplainZBufferBitDepths(c->dwZBufferBitDepths));
|
||||
OutTraceDDRAW("GetCaps(%s): MaxVisibleOverlays=%x CurrVisibleOverlays=%x\n",
|
||||
sLabel, c->dwMaxVisibleOverlays, c->dwCurrVisibleOverlays);
|
||||
|
||||
if(dxw.bHintActive){
|
||||
if(c->dwVidMemTotal > dwMaxMem) ShowHint(HINT_LIMITMEM);
|
||||
if(c->dwVidMemFree > dwMaxMem) ShowHint(HINT_LIMITMEM);
|
||||
}
|
||||
|
||||
if(dxw.dwFlags2 & LIMITRESOURCES){ // check for memory value overflow
|
||||
const DWORD dwMaxMem = 0x70000000;
|
||||
if(c->dwVidMemTotal > dwMaxMem) c->dwVidMemTotal = dwMaxMem;
|
||||
if(c->dwVidMemFree > dwMaxMem) c->dwVidMemFree = dwMaxMem;
|
||||
}
|
||||
if(dxw.dwFlags5 & STRESSRESOURCES){
|
||||
//const DWORD dwHugeMem = 0xF0000000;
|
||||
const DWORD dwHugeMem = 0xFFFFFFFF;
|
||||
c->dwVidMemTotal = dwHugeMem;
|
||||
c->dwVidMemFree = dwHugeMem;
|
||||
}
|
||||
@ -5334,8 +5340,17 @@ static HRESULT WINAPI extGetCapsS(int dxInterface, GetCapsS_Type pGetCapsS, LPDI
|
||||
|
||||
// v2.03.82: fixed logic for ZBUFFER capabilities: "The Creed" may have two, in SYSTEMMEMORY or in VIDEOMEMORY ...
|
||||
if(caps->dwCaps & DDSCAPS_ZBUFFER) {
|
||||
caps->dwCaps = dxwcdb.GetCaps(lpdds);
|
||||
OutTraceDW("GetCaps: FIXED ZBUFFER caps=%x(%s)\n", caps->dwCaps, ExplainDDSCaps(caps->dwCaps));
|
||||
DWORD dwCaps;
|
||||
dwCaps = dxwcdb.GetCaps(lpdds);
|
||||
// beware! the ZBUFFER surface could have never been registered!
|
||||
// in this case better keep the original capabilities (or adapt to the primary/backbuffer ones?)
|
||||
if(dwCaps) {
|
||||
caps->dwCaps = dwCaps;
|
||||
OutTraceDW("GetCaps: FIXED ZBUFFER caps=%x(%s)\n", caps->dwCaps, ExplainDDSCaps(caps->dwCaps));
|
||||
}
|
||||
else {
|
||||
OutTraceDW("GetCaps: UNREGISTERED ZBUFFER caps=%x(%s)\n", caps->dwCaps, ExplainDDSCaps(caps->dwCaps));
|
||||
}
|
||||
}
|
||||
|
||||
// v2.03.78: fix for "Gothik 2": pretend that 3DDEVICE surface are ALWAYS in video memory
|
||||
@ -5825,6 +5840,12 @@ static HRESULT WINAPI extGetAvailableVidMem(int dxversion, GetAvailableVidMem4_T
|
||||
|
||||
if(!(dxw.dwFlags2 & LIMITRESOURCES)) return res;
|
||||
|
||||
// may need hints ....
|
||||
if(dxw.bHintActive){
|
||||
if(lpdwTotal && (*lpdwTotal > dwMaxMem)) ShowHint(HINT_LIMITMEM);
|
||||
if(lpdwFree && (*lpdwFree > dwMaxMem)) ShowHint(HINT_LIMITMEM);
|
||||
}
|
||||
|
||||
// simulate a value overflow condition
|
||||
if(dxw.dwFlags5 & STRESSRESOURCES){
|
||||
if(lpdwTotal) *lpdwTotal = dwHugeMem;
|
||||
|
@ -778,6 +778,10 @@ HRESULT WINAPI extDISetCooperativeLevel(LPDIRECTINPUTDEVICE lpdid, HWND hwnd, DW
|
||||
if(dxw.IsRealDesktop(hwnd)) hwnd=dxw.GethWnd();
|
||||
|
||||
if(lpdid == lpDIDSysMouse) dwflags = (DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
|
||||
// v2.03.84: SHAREDKEYBOARD option to prevent situations like "Planet of the Apes"
|
||||
// not processing the PrintScreen syskeys.
|
||||
if((lpdid == lpDIDKeyboard) && (dxw.dwFlags7 & SHAREDKEYBOARD))
|
||||
dwflags = (DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
|
||||
|
||||
res = (*pDISetCooperativeLevel)(lpdid, hwnd, dwflags);
|
||||
if(res != DD_OK){
|
||||
|
@ -1954,4 +1954,5 @@ char *GetObjectTypeStr(HDC hdc)
|
||||
default: s="unknown"; break;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,3 +55,4 @@ extern char *ExplainRegionType(DWORD);
|
||||
extern char *ExplainPixelFormat(LPDDPIXELFORMAT);
|
||||
extern char *ExplainZBufferBitDepths(DWORD);
|
||||
extern char *GetObjectTypeStr(HDC);
|
||||
extern char *ExplainD3DSurfaceFormat(DWORD);
|
@ -132,8 +132,8 @@ static char *Flag7Names[32]={
|
||||
"HOOKSMACKW32", "BLOCKPRIORITYCLASS", "CPUSLOWDOWN", "CPUMAXUSAGE",
|
||||
"NOWINERRORS", "SUPPRESSOVERLAY", "INIT24BPP", "INIT32BPP",
|
||||
"FIXGLOBALUNLOCK", "SHOWHINTS", "SKIPDEVTYPEHID", "INJECTSUSPENDED",
|
||||
"SSUPPRESSDIERRORS", "", "", "",
|
||||
"", "", "", "",
|
||||
"SSUPPRESSDIERRORS", "HOOKNORUN", "FIXBINDTEXTURE", "ENUM16BITMODES",
|
||||
"SHAREDKEYBOARD", "HOOKNOUPDATE", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
};
|
||||
@ -276,6 +276,17 @@ void OutTrace(const char *format, ...)
|
||||
dxw.dwTFlags = tFlags; // restore settings
|
||||
}
|
||||
|
||||
// from MSDN:
|
||||
// GetVersionEx may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions
|
||||
//
|
||||
// With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the
|
||||
// operating system version. The value returned by the GetVersionEx function now depends on how the application is manifested.
|
||||
//
|
||||
// Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2).
|
||||
// Once an application is manifested for a given operating system version, GetVersionEx will always return the version
|
||||
// that the application is manifested for in future releases.
|
||||
// To manifest your applications for Windows 8.1 or Windows 10, refer to Targeting your application for Windows.
|
||||
|
||||
static BOOL CheckCompatibilityFlags()
|
||||
{
|
||||
typedef DWORD (WINAPI *GetFileVersionInfoSizeA_Type)(LPCSTR, LPDWORD);
|
||||
@ -572,7 +583,9 @@ void SetHook(void *target, void *hookproc, void **hookedproc, char *hookname)
|
||||
sprintf(msg,"SetHook: proc=%s oldhook=%x->%x newhook=%x\n", hookname, hookedproc, *(DWORD *)hookedproc, tmp);
|
||||
OutTraceDW(msg);
|
||||
if (IsAssertEnabled) MessageBox(0, msg, "SetHook", MB_OK | MB_ICONEXCLAMATION);
|
||||
// tmp = *hookedproc; -- commented out in v2.03.83, causing crash in GTA3
|
||||
if (dxw.bHintActive) ShowHint(HINT_HOOKUPDATE);
|
||||
// v2.03.83: updating the pointer sometimes is good, sometimes is bad!
|
||||
if(!(dxw.dwFlags7 & HOOKNOUPDATE)) tmp = *hookedproc;
|
||||
}
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER){
|
||||
|
@ -357,6 +357,7 @@ typedef enum {
|
||||
HINT_D3D11, HINT_OPENGL, HINT_DSOUND, HINT_DINPUT,
|
||||
HINT_DINPUT8, HINT_MOVIES, HINT_D3D, HINT_IHLP,
|
||||
HINT_FAKEOS, HINT_OBFUSCATED,HINT_SAFEDISC, HINT_SECUROM,
|
||||
HINT_LIMITMEM, HINT_HOOKUPDATE,
|
||||
HINT_LAST
|
||||
} HintEnumIds;
|
||||
|
||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "TlHelp32.h"
|
||||
|
||||
#define VERSION "2.03.83"
|
||||
#define VERSION "2.03.84.fx1"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
//#define LOCKTHREADS
|
||||
|
Binary file not shown.
74
dll/hd3d.cpp
74
dll/hd3d.cpp
@ -55,7 +55,8 @@ D3DPERF_SetOptions_Type pD3DPERF_SetOptions = 0;
|
||||
|
||||
typedef UINT (WINAPI *GetAdapterCount_Type)(void *);
|
||||
typedef HRESULT (WINAPI *GetAdapterIdentifier_Type)(void *, UINT, DWORD, D3DADAPTER_IDENTIFIER9 *);
|
||||
typedef UINT (WINAPI *GetAdapterModeCount_Type)(void *, UINT, D3DFORMAT);
|
||||
typedef UINT (WINAPI *GetAdapterModeCount8_Type)(void *, UINT);
|
||||
typedef UINT (WINAPI *GetAdapterModeCount9_Type)(void *, UINT, D3DFORMAT);
|
||||
typedef HRESULT (WINAPI *EnumAdapterModes8_Type)(void *, UINT, UINT, D3DDISPLAYMODE *);
|
||||
typedef HRESULT (WINAPI *EnumAdapterModes9_Type)(void *, UINT, D3DFORMAT ,UINT, D3DDISPLAYMODE *);
|
||||
typedef HRESULT (WINAPI *GetAdapterDisplayMode_Type)(void *, UINT, D3DDISPLAYMODE *);
|
||||
@ -71,6 +72,8 @@ UINT WINAPI extGetAdapterCount8(void *);
|
||||
UINT WINAPI extGetAdapterCount9(void *);
|
||||
HRESULT WINAPI extGetAdapterIdentifier8(void *, UINT, DWORD, D3DADAPTER_IDENTIFIER9 *);
|
||||
HRESULT WINAPI extGetAdapterIdentifier9(void *, UINT, DWORD, D3DADAPTER_IDENTIFIER9 *);
|
||||
UINT WINAPI extGetAdapterModeCount8(void *, UINT);
|
||||
UINT WINAPI extGetAdapterModeCount9(void *, UINT, D3DFORMAT);
|
||||
HRESULT WINAPI extCheckDeviceType8(void *, UINT, D3DDEVTYPE, D3DFORMAT, D3DFORMAT, BOOL);
|
||||
HRESULT WINAPI extCheckDeviceType9(void *, UINT, D3DDEVTYPE, D3DFORMAT, D3DFORMAT, BOOL);
|
||||
HRESULT WINAPI extD3DGetDeviceCaps8(void *, UINT, D3DDEVTYPE, D3DCAPS8 *);
|
||||
@ -82,6 +85,8 @@ HRESULT WINAPI extCreateDevice9(void *, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESEN
|
||||
HRESULT WINAPI extCreateDeviceEx(void *, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS *, D3DDISPLAYMODEEX *, void **);
|
||||
|
||||
GetAdapterCount_Type pGetAdapterCount8, pGetAdapterCount9;
|
||||
GetAdapterModeCount8_Type pGetAdapterModeCount8;
|
||||
GetAdapterModeCount9_Type pGetAdapterModeCount9;
|
||||
GetAdapterIdentifier_Type pGetAdapterIdentifier8, pGetAdapterIdentifier9;
|
||||
CheckDeviceType_Type pCheckDeviceType8, pCheckDeviceType9;
|
||||
D3DGetDeviceCaps8_Type pD3DGetDeviceCaps8 = 0;
|
||||
@ -553,6 +558,7 @@ void HookDirect3D8(void *lpd3d)
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 0), extQueryInterfaceD3D8, (void **)&pQueryInterfaceD3D8, "QueryInterface(D8)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 16), extGetAdapterCount8, (void **)&pGetAdapterCount8, "GetAdapterCount(D8)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 20), extGetAdapterIdentifier8, (void **)&pGetAdapterIdentifier8, "GetAdapterIdentifier(D8)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 24), extGetAdapterModeCount8, (void **)&pGetAdapterModeCount8, "GetAdapterGetAdapterModeCount(D8)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 28), extEnumAdapterModes8, (void **)&pEnumAdapterModes8, "EnumAdapterModes(D8)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 32), extGetAdapterDisplayMode8, (void **)&pGetAdapterDisplayMode8, "GetAdapterDisplayMode(D8)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 36), extCheckDeviceType8, (void **)&pCheckDeviceType8, "CheckDeviceType(D8)");
|
||||
@ -589,6 +595,7 @@ void HookDirect3D9(void *lpd3d, BOOL ex)
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 0), extQueryInterfaceD3D9, (void **)&pQueryInterfaceD3D9, "QueryInterface(D9)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 16), extGetAdapterCount9, (void **)&pGetAdapterCount9, "GetAdapterCount(D9)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 20), extGetAdapterIdentifier9, (void **)&pGetAdapterIdentifier9, "GetAdapterIdentifier(D9)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 24), extGetAdapterModeCount9, (void **)&pGetAdapterModeCount9, "GetAdapterGetAdapterModeCount(D9)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 28), extEnumAdapterModes9, (void **)&pEnumAdapterModes9, "EnumAdapterModes(D9)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 32), extGetAdapterDisplayMode9, (void **)&pGetAdapterDisplayMode9, "GetAdapterDisplayMode(D9)");
|
||||
SetHook((void *)(*(DWORD *)lpd3d + 36), extCheckDeviceType9, (void **)&pCheckDeviceType9, "CheckDeviceType(D9)");
|
||||
@ -925,8 +932,21 @@ HRESULT WINAPI extEnumAdapterModes8(void *lpd3d, UINT Adapter, UINT Mode, D3DDIS
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD3D("EnumAdapterModes(8): adapter=%d mode=%d pMode=%x\n", Adapter, Mode, pMode);
|
||||
res=(*pEnumAdapterModes8)(lpd3d, Adapter, Mode, pMode);
|
||||
if(res) OutTraceE("EnumAdapterModes ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
if(dxw.dwFlags7 & ENUM16BITMODES){
|
||||
res=(*pEnumAdapterModes8)(lpd3d, Adapter, Mode/2, pMode);
|
||||
if((res == D3D_OK) && (Mode % 2)){
|
||||
pMode->Format = (dxw.dwFlags1 & USERGB565)? D3DFMT_R5G6B5 : D3DFMT_A1R5G5B5;
|
||||
}
|
||||
}
|
||||
else
|
||||
res=(*pEnumAdapterModes8)(lpd3d, Adapter, Mode, pMode);
|
||||
if(res) {
|
||||
OutTraceE("EnumAdapterModes ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
}
|
||||
else {
|
||||
OutTraceD3D("EnumAdapterModes(8): res=(%dx%d) refresh=%dHz format=%d(%s)\n",
|
||||
pMode->Width, pMode->Height, pMode->RefreshRate, pMode->Format, ExplainD3DSurfaceFormat(pMode->Format));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -934,8 +954,21 @@ HRESULT WINAPI extEnumAdapterModes9(void *lpd3d, UINT Adapter, D3DFORMAT Format,
|
||||
{
|
||||
HRESULT res;
|
||||
OutTraceD3D("EnumAdapterModes(9): adapter=%d format=%x mode=%d pMode=%x\n", Adapter, Format, Mode, pMode);
|
||||
res=(*pEnumAdapterModes9)(lpd3d, Adapter, Format, Mode, pMode);
|
||||
if(res) OutTraceE("EnumAdapterModes ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
if(dxw.dwFlags7 & ENUM16BITMODES){
|
||||
res=(*pEnumAdapterModes9)(lpd3d, Adapter, Format, Mode/2, pMode);
|
||||
if((res == D3D_OK) && (Mode % 2)){
|
||||
pMode->Format = (dxw.dwFlags1 & USERGB565)? D3DFMT_R5G6B5 : D3DFMT_A1R5G5B5;
|
||||
}
|
||||
}
|
||||
else
|
||||
res=(*pEnumAdapterModes9)(lpd3d, Adapter, Format, Mode, pMode);
|
||||
if(res) {
|
||||
OutTraceE("EnumAdapterModes ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
}
|
||||
else {
|
||||
OutTraceD3D("EnumAdapterModes(9): res=(%dx%d) refresh=%dHz format=%d(%s)\n",
|
||||
pMode->Width, pMode->Height, pMode->RefreshRate, pMode->Format, ExplainD3DSurfaceFormat(pMode->Format));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -2098,11 +2131,15 @@ static UINT WINAPI extGetAvailableTextureMem(GetAvailableTextureMem_Type pGetAva
|
||||
// const DWORD dwMaxMem = 0x70000000; = 1.8G
|
||||
UINT AvailableTextureMem = (*pGetAvailableTextureMem)(lpd3dd);
|
||||
OutTraceD3D("GetAvailableTextureMem: lpd3dd=%x AvailableTextureMem=%u(%dMB)\n", lpd3dd, AvailableTextureMem, AvailableTextureMem>>20);
|
||||
|
||||
if(dxw.bHintActive && (AvailableTextureMem > TextureMemoryLimit)) ShowHint(HINT_LIMITMEM);
|
||||
|
||||
if((dxw.dwFlags2 & LIMITRESOURCES) && (AvailableTextureMem > TextureMemoryLimit)){
|
||||
OutTraceDW("GetAvailableTextureMem: LIMIT AvailableTextureMem=%u->%u\n", AvailableTextureMem, TextureMemoryLimit);
|
||||
AvailableTextureMem = TextureMemoryLimit;
|
||||
}
|
||||
if(dxw.dwFlags5 & STRESSRESOURCES) AvailableTextureMem = 0xFFFFFFFF;
|
||||
|
||||
return AvailableTextureMem;
|
||||
}
|
||||
|
||||
@ -2281,3 +2318,30 @@ void RestoreD3DSurfaces(BOOL bFullScreen)
|
||||
// param[0], param[1], res, ExplainDDError(res));
|
||||
//}
|
||||
}
|
||||
|
||||
UINT WINAPI extGetAdapterModeCount8(void *lpd3d, UINT Adapter)
|
||||
{
|
||||
UINT ret;
|
||||
OutTraceD3D("GetAdapterModeCount(8): d3d=%x adapter=%d\n", lpd3d, Adapter);
|
||||
ret = (*pGetAdapterModeCount8)(lpd3d, Adapter);
|
||||
if(dxw.dwFlags7 & ENUM16BITMODES){
|
||||
OutTraceDW("GetAdapterModeCount(8): DOUBLED MODES %d->%d\n", ret, ret*2);
|
||||
ret = ret * 2;
|
||||
}
|
||||
OutTraceD3D("GetAdapterModeCount(8): ret=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
UINT WINAPI extGetAdapterModeCount9(void *lpd3d, UINT Adapter, D3DFORMAT Format)
|
||||
{
|
||||
UINT ret;
|
||||
OutTraceD3D("GetAdapterModeCount(9): d3d=%x adapter=%d format=%d(%s)\n",
|
||||
lpd3d, Adapter, Format, ExplainD3DSurfaceFormat(Format));
|
||||
ret = (*pGetAdapterModeCount9)(lpd3d, Adapter, Format);
|
||||
if(dxw.dwFlags7 & ENUM16BITMODES){
|
||||
OutTraceDW("GetAdapterModeCount(9): DOUBLED MODES %d->%d\n", ret, ret*2);
|
||||
ret = ret * 2;
|
||||
}
|
||||
OutTraceD3D("GetAdapterModeCount(9): ret=%d\n", ret);
|
||||
return ret;
|
||||
}
|
@ -27,11 +27,15 @@ HintEntry_Type HintTable[]={
|
||||
{FALSE, "Executable obfuscation detected. Impossible to hook this file"},
|
||||
{FALSE, "SafeDisk dependency detected. Check for compatibility with current OS"},
|
||||
{FALSE, "SecuRom dependency detected. Check for compatibility with current OS"},
|
||||
{FALSE, "Integer32 memory size overflow. May need limit resources flag"},
|
||||
{FALSE, "Hooked address update. May need to check the \"No hook update\" (HOOKNOUPDATE) flag"},
|
||||
{FALSE, ""}
|
||||
};
|
||||
|
||||
void ShowHint(int HintId)
|
||||
{
|
||||
//if(!dxw.bHintActive) return;
|
||||
|
||||
// boundary checks
|
||||
if ((HintId < HINT_HINT) || (HintId >= HINT_LAST)) return;
|
||||
|
||||
|
1
filter/.gitattributes
vendored
1
filter/.gitattributes
vendored
@ -1 +0,0 @@
|
||||
*.{dll,exe} filter=lfs diff=lfs merge=lfs -text
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a7c2da0983c367d99dc34346e23221b5804268adba8f9124bf1b2ceb68848e74
|
||||
size 14336
|
Binary file not shown.
BIN
filter/mp.suo
BIN
filter/mp.suo
Binary file not shown.
@ -90,6 +90,7 @@ void CGlobalSettings::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_CONFIG_DEBUGMODE, m_DebugMode);
|
||||
DDX_Check(pDX, IDC_CONFIG_AUTOHIDE, m_AutoHideMode);
|
||||
DDX_Check(pDX, IDC_CONFIG_CHECKADMIN, m_CheckAdminRights);
|
||||
DDX_Check(pDX, IDC_CONFIG_NAMEFROMFOLDER, m_NameFromFolder);
|
||||
DDX_Check(pDX, IDC_CONFIG_SAVEPATHS, m_UpdatePaths);
|
||||
DDX_Text (pDX, IDC_TEX_MINX, m_TexMinX);
|
||||
DDX_Text (pDX, IDC_TEX_MINY, m_TexMinY);
|
||||
@ -155,6 +156,7 @@ BOOL CGlobalSettings::OnInitDialog()
|
||||
m_DebugMode = GetPrivateProfileInt("window", "debug", 0, gInitPath);
|
||||
m_AutoHideMode = GetPrivateProfileInt("window", "autohide", 0, gInitPath);
|
||||
m_CheckAdminRights = GetPrivateProfileInt("window", "checkadmin", 0, gInitPath);
|
||||
m_NameFromFolder = GetPrivateProfileInt("window", "namefromfolder", 0, gInitPath);
|
||||
m_UpdatePaths = GetPrivateProfileInt("window", "updatepaths", 1, gInitPath);
|
||||
m_TexMinX = GetPrivateProfileInt("texture", "MinTexX", 0, gInitPath);
|
||||
m_TexMinY = GetPrivateProfileInt("texture", "MinTexY", 0, gInitPath);
|
||||
@ -176,6 +178,8 @@ void CGlobalSettings::OnOK()
|
||||
WritePrivateProfileString("window", "autohide", val, gInitPath);
|
||||
sprintf_s(val, sizeof(val), "%i", m_CheckAdminRights);
|
||||
WritePrivateProfileString("window", "checkadmin", val, gInitPath);
|
||||
sprintf_s(val, sizeof(val), "%i", m_NameFromFolder);
|
||||
WritePrivateProfileString("window", "namefromfolder", val, gInitPath);
|
||||
sprintf_s(val, sizeof(val), "%i", m_UpdatePaths);
|
||||
WritePrivateProfileString("window", "updatepaths", val, gInitPath);
|
||||
// texture limits
|
||||
|
@ -33,6 +33,7 @@ protected:
|
||||
BOOL m_UpdatePaths;
|
||||
BOOL m_AutoHideMode;
|
||||
BOOL m_CheckAdminRights;
|
||||
BOOL m_NameFromFolder;
|
||||
int m_TexMinX;
|
||||
int m_TexMinY;
|
||||
int m_TexMaxX;
|
||||
|
@ -33,6 +33,7 @@ void CTabDirect3D::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_NOPOWER2FIX, cTarget->m_NoPower2Fix);
|
||||
DDX_Check(pDX, IDC_NOD3DRESET, cTarget->m_NoD3DReset);
|
||||
DDX_Check(pDX, IDC_SUPPRESSD3DEXT, cTarget->m_SuppressD3DExt);
|
||||
DDX_Check(pDX, IDC_ENUM16BITMODES, cTarget->m_Enum16bitModes);
|
||||
|
||||
// Texture management
|
||||
DDX_Radio(pDX, IDC_TEXTURENONE, cTarget->m_TextureHandling);
|
||||
|
@ -35,6 +35,7 @@ void CTabHook::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_HOOKDLLS, cTarget->m_HookDLLs);
|
||||
DDX_Check(pDX, IDC_ANSIWIDE, cTarget->m_AnsiWide);
|
||||
DDX_Check(pDX, IDC_HOOKNORUN, cTarget->m_HookNoRun);
|
||||
DDX_Check(pDX, IDC_HOOKNOUPDATE, cTarget->m_HookNoUpdate);
|
||||
DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin);
|
||||
|
||||
// Kernel32
|
||||
|
@ -49,6 +49,7 @@ void CTabInput::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Check(pDX, IDC_EMULATERELMOUSE, cTarget->m_EmulateRelMouse);
|
||||
DDX_Check(pDX, IDC_SKIPDEVTYPEHID, cTarget->m_SkipDevTypeHID);
|
||||
DDX_Check(pDX, IDC_SUPPRESSDIERRORS, cTarget->m_SuppressDIErrors);
|
||||
DDX_Check(pDX, IDC_SHAREDKEYBOARD, cTarget->m_SharedKeyboard);
|
||||
// Message processing
|
||||
DDX_Radio(pDX, IDC_PROCESSALLMESSAGES, cTarget->m_OffendingMessages);
|
||||
//DDX_Check(pDX, IDC_FILTERMESSAGES, cTarget->m_FilterMessages);
|
||||
|
@ -56,6 +56,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
||||
m_HandleExceptions = FALSE;
|
||||
m_SuppressIME = FALSE;
|
||||
m_SuppressD3DExt = FALSE;
|
||||
m_Enum16bitModes = FALSE;
|
||||
m_SetCompatibility = TRUE; // default true !!
|
||||
m_AEROBoost = TRUE; // default true !!
|
||||
m_DiabloTweak = FALSE;
|
||||
@ -113,6 +114,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
||||
m_HookDLLs = TRUE; // default true !!
|
||||
m_AnsiWide = FALSE;
|
||||
m_HookNoRun = FALSE;
|
||||
m_HookNoUpdate = FALSE;
|
||||
m_TerminateOnClose = FALSE;
|
||||
m_ConfirmOnClose = FALSE;
|
||||
m_HookEnabled = TRUE; // default true !!
|
||||
@ -238,6 +240,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
||||
m_MaxFPS = 0;
|
||||
m_InitTS = 8;
|
||||
m_SwapEffect = 0;
|
||||
m_InjectionMode = 0;
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
BOOL m_EmulateRelMouse;
|
||||
BOOL m_SkipDevTypeHID;
|
||||
BOOL m_SuppressDIErrors;
|
||||
BOOL m_SharedKeyboard;
|
||||
BOOL m_ModifyMouse;
|
||||
BOOL m_VirtualJoystick;
|
||||
BOOL m_Unacquire;
|
||||
@ -68,6 +69,7 @@ public:
|
||||
BOOL m_HookDLLs;
|
||||
BOOL m_AnsiWide;
|
||||
BOOL m_HookNoRun;
|
||||
BOOL m_HookNoUpdate;
|
||||
BOOL m_TerminateOnClose;
|
||||
BOOL m_ConfirmOnClose;
|
||||
BOOL m_EmulateRegistry;
|
||||
@ -245,6 +247,7 @@ public:
|
||||
BOOL m_NoTextures;
|
||||
BOOL m_BlackWhite;
|
||||
BOOL m_SuppressD3DExt;
|
||||
BOOL m_Enum16bitModes;
|
||||
BOOL m_Force16BPP;
|
||||
BOOL m_LimitScreenRes;
|
||||
int m_PosX;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -206,6 +206,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
||||
if(dlg->m_HookDLLs) t->flags3 |= HOOKDLLS;
|
||||
if(dlg->m_AnsiWide) t->flags5 |= ANSIWIDE;
|
||||
if(dlg->m_HookNoRun) t->flags7 |= HOOKNORUN;
|
||||
if(dlg->m_HookNoUpdate) t->flags7 |= HOOKNOUPDATE;
|
||||
if(dlg->m_TerminateOnClose) t->flags6 |= TERMINATEONCLOSE;
|
||||
if(dlg->m_ConfirmOnClose) t->flags6 |= CONFIRMONCLOSE;
|
||||
if(dlg->m_EmulateRegistry) t->flags3 |= EMULATEREGISTRY;
|
||||
@ -305,6 +306,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
||||
if(dlg->m_EmulateRelMouse) t->flags6 |= EMULATERELMOUSE;
|
||||
if(dlg->m_SkipDevTypeHID) t->flags7 |= SKIPDEVTYPEHID;
|
||||
if(dlg->m_SuppressDIErrors) t->flags7 |= SUPPRESSDIERRORS;
|
||||
if(dlg->m_SharedKeyboard) t->flags7 |= SHAREDKEYBOARD;
|
||||
if(dlg->m_ModifyMouse) t->flags |= MODIFYMOUSE;
|
||||
if(dlg->m_VirtualJoystick) t->flags6 |= VIRTUALJOYSTICK;
|
||||
if(dlg->m_Unacquire) t->flags6 |= UNACQUIRE;
|
||||
@ -344,6 +346,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
||||
if(dlg->m_Power2Width) t->flags6 |= POWER2WIDTH;
|
||||
if(dlg->m_SuppressIME) t->flags2 |= SUPPRESSIME;
|
||||
if(dlg->m_SuppressD3DExt) t->flags3 |= SUPPRESSD3DEXT;
|
||||
if(dlg->m_Enum16bitModes) t->flags7 |= ENUM16BITMODES;
|
||||
if(dlg->m_SetCompatibility) t->flags2 |= SETCOMPATIBILITY;
|
||||
if(dlg->m_AEROBoost) t->flags5 |= AEROBOOST;
|
||||
if(dlg->m_DiabloTweak) t->flags5 |= DIABLOTWEAK;
|
||||
@ -504,6 +507,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
||||
dlg->m_HookDLLs = t->flags3 & HOOKDLLS ? 1 : 0;
|
||||
dlg->m_AnsiWide = t->flags5 & ANSIWIDE ? 1 : 0;
|
||||
dlg->m_HookNoRun = t->flags7 & HOOKNORUN ? 1 : 0;
|
||||
dlg->m_HookNoUpdate = t->flags7 & HOOKNOUPDATE ? 1 : 0;
|
||||
dlg->m_TerminateOnClose = t->flags6 & TERMINATEONCLOSE ? 1 : 0;
|
||||
dlg->m_ConfirmOnClose = t->flags6 & CONFIRMONCLOSE ? 1 : 0;
|
||||
dlg->m_EmulateRegistry = t->flags3 & EMULATEREGISTRY ? 1 : 0;
|
||||
@ -580,6 +584,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
||||
dlg->m_EmulateRelMouse = t->flags6 & EMULATERELMOUSE ? 1 : 0;
|
||||
dlg->m_SkipDevTypeHID = t->flags7 & SKIPDEVTYPEHID ? 1 : 0;
|
||||
dlg->m_SuppressDIErrors = t->flags7 & SUPPRESSDIERRORS ? 1 : 0;
|
||||
dlg->m_SharedKeyboard = t->flags7 & SHAREDKEYBOARD ? 1 : 0;
|
||||
dlg->m_ModifyMouse = t->flags & MODIFYMOUSE ? 1 : 0;
|
||||
dlg->m_VirtualJoystick = t->flags6 & VIRTUALJOYSTICK ? 1 : 0;
|
||||
dlg->m_Unacquire = t->flags6 & UNACQUIRE ? 1 : 0;
|
||||
@ -599,6 +604,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
||||
dlg->m_HandleExceptions = t->flags & HANDLEEXCEPTIONS ? 1 : 0;
|
||||
dlg->m_SuppressIME = t->flags2 & SUPPRESSIME ? 1 : 0;
|
||||
dlg->m_SuppressD3DExt = t->flags3 & SUPPRESSD3DEXT ? 1 : 0;
|
||||
dlg->m_Enum16bitModes = t->flags7 & ENUM16BITMODES ? 1 : 0;
|
||||
dlg->m_SetCompatibility = t->flags2 & SETCOMPATIBILITY ? 1 : 0;
|
||||
dlg->m_AEROBoost = t->flags5 & AEROBOOST ? 1 : 0;
|
||||
dlg->m_DiabloTweak = t->flags5 & DIABLOTWEAK ? 1 : 0;
|
||||
@ -1906,10 +1912,14 @@ void CDxwndhostView::OnAdd(char *sInitialPath)
|
||||
CString FilePath;
|
||||
FilePath=TargetMaps[i].path;
|
||||
len=FilePath.ReverseFind('\\');
|
||||
if(GetPrivateProfileInt("window", "namefromfolder", 0, gInitPath)){
|
||||
FilePath=FilePath.Left(len);
|
||||
len=FilePath.ReverseFind('\\');
|
||||
}
|
||||
FilePath=FilePath.Right(FilePath.GetLength()-len-1);
|
||||
strncpy_s(PrivateMaps[i].title, sizeof(PrivateMaps[i].title), FilePath.GetString(), sizeof(PrivateMaps[i].title)-1);
|
||||
TargetMaps[i].index = i;
|
||||
}
|
||||
TargetMaps[i].index = i;
|
||||
listitem.pszText = PrivateMaps[i].title;
|
||||
listctrl.InsertItem(&listitem);
|
||||
Resize();
|
||||
|
BIN
host/resource
BIN
host/resource
Binary file not shown.
BIN
proxy/d3d8.suo
BIN
proxy/d3d8.suo
Binary file not shown.
BIN
proxy/d3d9.suo
BIN
proxy/d3d9.suo
Binary file not shown.
BIN
proxy/ddraw.suo
BIN
proxy/ddraw.suo
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user