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

v2_03_99_srcfx3

Former-commit-id: ed8db9edaef28a3bab663963660a937ed93e447c
This commit is contained in:
gho tik 2016-10-12 12:48:37 -04:00 committed by Refael ACkermann
parent ad7dcb62d7
commit a5f4e868f5
27 changed files with 261 additions and 268 deletions

View File

@ -27,7 +27,7 @@
#define FIXWINFRAME 0x00002000 #define FIXWINFRAME 0x00002000
#define HIDEHWCURSOR 0x00004000 #define HIDEHWCURSOR 0x00004000
#define SLOWDOWN 0x00008000 #define SLOWDOWN 0x00008000
#define ENABLECLIPPING 0x00010000 #define DISABLECLIPPING 0x00010000
#define LOCKWINSTYLE 0x00020000 #define LOCKWINSTYLE 0x00020000
#define MAPGDITOPRIMARY 0x00040000 #define MAPGDITOPRIMARY 0x00040000
#define FIXTEXTOUT 0x00080000 #define FIXTEXTOUT 0x00080000
@ -255,6 +255,9 @@
#define FORCENOVSYNC 0x00000008 // Forces NO hardware VSync #define FORCENOVSYNC 0x00000008 // Forces NO hardware VSync
#define VSYNCSCANLINE 0x00000010 // Activates WaitForVerticalBlank algorythm based on reaching a given scan line #define VSYNCSCANLINE 0x00000010 // Activates WaitForVerticalBlank algorythm based on reaching a given scan line
#define TRIMTEXTUREFORMATS 0x00000020 // Emulates "DirectXTrimTextureFormats" shim to fix textures in Heavy Gear II #define TRIMTEXTUREFORMATS 0x00000020 // Emulates "DirectXTrimTextureFormats" shim to fix textures in Heavy Gear II
#define NOHALDEVICE 0x00000040 // Simulates a situation of lack of 3D hardware support, like in presence of remote desktop
#define CLIPLOCKED 0x00000080 // never destroy cursor clipper on window move events ....
#define PRETENDVISIBLE 0x00000100 // Pretend the main window is visible (IsWindowVisible) and on Z-order top (GetTopWindow)
// logging Tflags DWORD: // logging Tflags DWORD:
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general
@ -355,6 +358,7 @@ void OutTraceHex(BYTE *, int);
void *HookAPI(HMODULE, char *, void *, const char *, void *); void *HookAPI(HMODULE, char *, void *, const char *, void *);
void AdjustWindowFrame(HWND, DWORD, DWORD); void AdjustWindowFrame(HWND, DWORD, DWORD);
char *hexdump(unsigned char *, int); char *hexdump(unsigned char *, int);
void HexTrace(unsigned char *, int);
LRESULT CALLBACK extWindowProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK extWindowProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK extChildWindowProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK extChildWindowProc(HWND, UINT, WPARAM, LPARAM);

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:d026c47f6a552131246762e9b1f03400fa5031ea484d5d72ffb555a8df94f99a oid sha256:cf023536d20b33dd428096f18a29788e47eba0691547598d6de7ef7cc877956f
size 709120 size 710144

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:7f6b72cb6b9aacee5a608ebf28b57d92c9f814cb8b8e300ab867338c5abed17d oid sha256:3840ce99c26e25e77df3d855fbd91c5533f0fcff4e4a876dc88b62a465d66b62
size 667648 size 668160

View File

@ -1,25 +1,13 @@
[window] [window]
exportpath=D:\DxWnd\exports.ok\ exportpath=D:\DxWnd.develop\v2_03_99fx2_src\build\exports\
posx=-1195 exepath=F:\Games\The Sting!\TheSting!\
posy=557 posx=1154
posy=553
sizx=320 sizx=320
sizy=200 sizy=200
debug=0
autohide=0
checkadmin=0
namefromfolder=1
multiprocesshook=0
warnonexit=0
updatepaths=1
defaultcoord=0
defaultposx=50
defaultposy=50
defaultsizx=800
defaultsizy=600
exepath=D:\Games\Heavy Gear 2\
[target] [target]
title0=Star Trek Armada title0=The Sting!
path0=D:\Games\Star Trek Armada\Armada.exe path0=F:\Games\The Sting!\TheSting!\Sting.exe
startfolder0= startfolder0=
launchpath0= launchpath0=
module0= module0=
@ -29,18 +17,18 @@ registry0=
ver0=0 ver0=0
monitorid0=0 monitorid0=0
coord0=0 coord0=0
flag0=-1474297757 flag0=136314914
flagg0=1544552448 flagg0=1207959552
flagh0=73744 flagh0=16
flagi0=136314884 flagi0=138412036
flagj0=4224 flagj0=4224
flagk0=69632 flagk0=65536
flagl0=0 flagl0=0
flagm0=0 flagm0=0
tflag0=-2147477245 tflag0=0
dflag0=0 dflag0=0
posx0=100 posx0=50
posy0=100 posy0=50
sizx0=800 sizx0=800
sizy0=600 sizy0=600
maxfps0=0 maxfps0=0
@ -53,132 +41,3 @@ slowratio0=1
scanline0=1 scanline0=1
initresw0=0 initresw0=0
initresh0=0 initresh0=0
title1=Jazz Jackrabbit 2
path1=D:\Games\Jazz Jackrabbit 2\Jazz2.exe
startfolder1=
launchpath1=
module1=
opengllib1=
notes1=
registry1=
ver1=0
monitorid1=-1
coord1=0
flag1=673185826
flagg1=1207959552
flagh1=8212
flagi1=138412036
flagj1=5248
flagk1=65536
flagl1=0
flagm1=0
tflag1=-2147477245
dflag1=0
posx1=50
posy1=50
sizx1=800
sizy1=600
maxfps1=0
initts1=0
winver1=0
maxres1=-1
swapeffect1=0
maxddinterface1=7
slowratio1=2
scanline1=0
initresw1=800
initresh1=600
title2=Armor Command
path2=D:\Games\Armor Command\armrcmd.exe
startfolder2=
launchpath2=
module2=
opengllib2=
notes2=Needs a copy of S3DTKW.dll in game folder.\n
registry2=
ver2=0
monitorid2=-1
coord2=0
flag2=673185826
flagg2=1207959552
flagh2=8212
flagi2=138412036
flagj2=4224
flagk2=65536
flagl2=268435456
flagm2=0
tflag2=0
dflag2=0
posx2=50
posy2=50
sizx2=800
sizy2=600
maxfps2=0
initts2=0
winver2=0
maxres2=-1
swapeffect2=0
maxddinterface2=7
slowratio2=2
scanline2=0
initresw2=800
initresh2=600
title3=Heavy Gear 2
path3=D:\Games\Heavy Gear 2\Heavy Gear 2.exe
startfolder3=
launchpath3=
module3=
opengllib3=
notes3=
registry3=
ver3=0
monitorid3=-1
coord3=0
flag3=673185826
flagg3=1208221696
flagh3=8212
flagi3=-2009071612
flagj3=4224
flagk3=98304
flagl3=0
flagm3=0
tflag3=0
dflag3=0
posx3=50
posy3=50
sizx3=800
sizy3=600
maxfps3=0
initts3=0
winver3=0
maxres3=-1
swapeffect3=0
maxddinterface3=7
slowratio3=2
scanline3=0
initresw3=800
initresh3=600
[texture]
MinTexX=0
MinTexY=0
MaxTexX=0
MaxTexY=0
[keymapping]
timetoggle=
timefast=
timeslow=
altf4=
cliptoggle=
refresh=
logtoggle=
plogtoggle=
fpstoggle=
printscreen=
corner=
freezetime=
fullscreen=
workarea=
desktop=
minimize=
restore=
kill=

View File

@ -1,6 +1,6 @@
[target] [target]
title0=The Sting! title0=The Sting!
path0=D:\Games\sting\Sting.exe path0=F:\Games\The Sting!\TheSting!\Sting.exe
launchpath0= launchpath0=
module0= module0=
opengllib0= opengllib0=
@ -12,7 +12,7 @@ flagg0=1207959552
flagh0=16 flagh0=16
flagi0=138412036 flagi0=138412036
flagj0=4224 flagj0=4224
flagk0=0 flagk0=65536
tflag0=0 tflag0=0
initx0=0 initx0=0
inity0=0 inity0=0
@ -29,3 +29,14 @@ initts0=0
winver0=0 winver0=0
maxres0=-1 maxres0=-1
swapeffect0=0 swapeffect0=0
startfolder0=
registry0=
monitorid0=0
flagl0=0
flagm0=0
dflag0=0
maxddinterface0=7
slowratio0=1
scanline0=1
initresw0=0
initresh0=0

View File

@ -1372,9 +1372,15 @@ fix: recovered DEFAULTMESSAGES option
fix: normalized output for ddraw GetScanLine() method fix: normalized output for ddraw GetScanLine() method
fix: fixed the policy for redrecting the WindowProc routine. Fixes "Ultimate Spiderman" clipping problems, and possibly much more fix: fixed the policy for redrecting the WindowProc routine. Fixes "Ultimate Spiderman" clipping problems, and possibly much more
v2.03.99 v2.03.99/fx1-3
fix: unwanted hook to directsound when passing by CoCreateInstance() fix: unwanted hook to directsound when passing by CoCreateInstance()
fix: transient mode, now checks for both the target and the launcher to be dead before terminating fix: transient mode, now checks for both the target and the launcher to be dead before terminating
add: Direct3D TRIMTEXTUREFORMAT flag, to mimic MS "DirectXTrimTextureFormat" shim. Fixes problems in .... add: Direct3D TRIMTEXTUREFORMAT flag, to mimic MS "DirectXTrimTextureFormat" shim. Fixes problems in "Heavy Gear 2" and "Star Wars: Rogue Squardon 3D".
add: D3DDevice GetCaps hooking and full dump of D3DDevice capabilities add: D3DDevice GetCaps hooking and full dump of D3DDevice capabilities
add: "No HAL Device" flag, making it unavailable the IID_Direct3DHALDevice device. Fixes "Grand Prix World" when the 3D car models are invisible.
add: reorganization of mouse clipper fields, with the addition of LOCK mode (useful for Tribal Rage)
fix: handling of Lock/Unlock methods differentiated in ddraw 4 vs. 7. Fixes "Hoyle Casino Empire"
fix: texture hack now search for hacked textures in the texture.in folder, as stated in the documentation
fix: D3D7 EnumDevices hexdump fixed
add: flag "Pretend Win visible on top" (PRETENDVISIBLE) to let the program believe that the main window is always visible and on z-order top as a fullscreen window should be
fix: fixed some divide by 0 conditions when window is minimized

View File

@ -1555,6 +1555,7 @@ static void HandleCapsD(char *sLabel, LPDDCAPS c)
sLabel, c->dwVidMemTotal, c->dwVidMemFree, c->dwZBufferBitDepths, ExplainZBufferBitDepths(c->dwZBufferBitDepths)); sLabel, c->dwVidMemTotal, c->dwVidMemFree, c->dwZBufferBitDepths, ExplainZBufferBitDepths(c->dwZBufferBitDepths));
OutTraceDDRAW("GetCaps(%s): MaxVisibleOverlays=%x CurrVisibleOverlays=%x\n", OutTraceDDRAW("GetCaps(%s): MaxVisibleOverlays=%x CurrVisibleOverlays=%x\n",
sLabel, c->dwMaxVisibleOverlays, c->dwCurrVisibleOverlays); sLabel, c->dwMaxVisibleOverlays, c->dwCurrVisibleOverlays);
if(IsDebug) HexTrace((unsigned char *)c, c->dwSize);
if(dxw.bHintActive){ if(dxw.bHintActive){
if(c->dwVidMemTotal > dwMaxMem) ShowHint(HINT_LIMITMEM); if(c->dwVidMemTotal > dwMaxMem) ShowHint(HINT_LIMITMEM);
@ -1591,13 +1592,14 @@ static HRESULT WINAPI extGetCapsD(int dxversion, GetCapsD_Type pGetCapsD, LPDIRE
HRESULT res; HRESULT res;
OutTraceDDRAW("GetCaps(D%d): lpdd=%x %s %s\n", dxversion, lpdd, c1?"c1":"NULL", c2?"c2":"NULL"); OutTraceDDRAW("GetCaps(D%d): lpdd=%x %s %s\n", dxversion, lpdd, c1?"c1":"NULL", c2?"c2":"NULL");
res=(*pGetCapsD)(lpdd, c1, c2); res=(*pGetCapsD)(lpdd, c1, c2);
if(res) if(res) {
OutTraceE("GetCaps(D): ERROR res=%x(%s)\n", res, ExplainDDError(res)); OutTraceE("GetCaps(D): ERROR res=%x(%s)\n", res, ExplainDDError(res));
else { return res;
if (c1) HandleCapsD("D-HW", c1);
if (c2) HandleCapsD("D-SW", c2);
} }
if (c1) HandleCapsD("D-HW", c1);
if (c2) HandleCapsD("D-SW", c2);
if((dxw.dwFlags3 & FORCESHEL) && c1) { if((dxw.dwFlags3 & FORCESHEL) && c1) {
DDCAPS_DX7 swcaps; // DDCAPS_DX7 because it is the bigger in size DDCAPS_DX7 swcaps; // DDCAPS_DX7 because it is the bigger in size
int size; int size;
@ -1619,6 +1621,20 @@ static HRESULT WINAPI extGetCapsD(int dxversion, GetCapsD_Type pGetCapsD, LPDIRE
if (c2) HandleCapsD("D-SW(fixed)", c2); if (c2) HandleCapsD("D-SW(fixed)", c2);
} }
if((dxw.dwFlags8 & NOHALDEVICE) && c1) {
OutTraceDW("GetCaps(D): NOHALDEVICE\n");
c1->ddsCaps.dwCaps = DDCAPS_NOHARDWARE;
c1->ddsCaps.dwCaps2 = DDCAPS2_CANRENDERWINDOWED;
c1->dwPalCaps = 0;
c1->dwFXCaps = 0;
c1->dwFXAlphaCaps = 0;
c1->dwCKeyCaps = 0;
c1->dwVidMemTotal = c1->dwVidMemFree = 0;
c1->dwZBufferBitDepths = 0;
c1->dwMaxVisibleOverlays = c1->dwCurrVisibleOverlays = 0;
HandleCapsD("D-HW(NoHAL)", c1);
}
if((dxw.dwFlags3 & MINIMALCAPS)) SetMinimalCaps(c1, c2); if((dxw.dwFlags3 & MINIMALCAPS)) SetMinimalCaps(c1, c2);
if(dxw.dwFlags3 & CAPMASK) MaskCapsD(c1, c2); if(dxw.dwFlags3 & CAPMASK) MaskCapsD(c1, c2);
@ -2602,6 +2618,13 @@ HRESULT WINAPI extGetAttachedSurface(int dxversion, GetAttachedSurface_Type pGet
return DDERR_NOTFOUND; return DDERR_NOTFOUND;
} }
} }
if((dxw.dwFlags8 & NOHALDEVICE) && (lpddsc->dwCaps & DDSCAPS_ZBUFFER)){
// tested with "Grand Prix World": if a ZBUFFER is returned, CreateDevice fails!
*lplpddas = NULL;
OutTraceDW("GetAttachedSurface(%d): NOHALDEVICE no attached ZBUFFER\n", dxversion);
return DDERR_NOTFOUND;
}
} }
else { else {
// Virtual primary surfaces are created with no DDSCAPS_3DDEVICE caps, so don't look for it .... // Virtual primary surfaces are created with no DDSCAPS_3DDEVICE caps, so don't look for it ....
@ -3831,7 +3854,7 @@ static HRESULT WINAPI extLockDir(int dxversion, Lock_Type pLock, LPDIRECTDRAWSUR
if(res==DDERR_SURFACELOST){ if(res==DDERR_SURFACELOST){
lpdds->Restore(); lpdds->Restore();
res = (*pLock)(lpdds, lprect, lpDDSurfaceDesc, flags, hEvent); res = (*pLock)(lpdds, lprect, lpDDSurfaceDesc, flags, hEvent);
OutTraceDW("Lock SURFACELOST RETRY: ret=%x(%s)\n", res, ExplainDDError(res)); OutTraceDW("Lock SURFACELOST RETRY: ret=%x(%s)\n", res, ExplainDDError(res));
} }
if(res) OutTraceE("Lock ERROR: ret=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); if(res) OutTraceE("Lock ERROR: ret=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
@ -3872,6 +3895,7 @@ static HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRA
BOOL IsPrim; BOOL IsPrim;
BOOL IsBack; BOOL IsBack;
Blt_Type pBlt; Blt_Type pBlt;
RECT rect;
IsPrim=dxwss.IsAPrimarySurface(lpdds); IsPrim=dxwss.IsAPrimarySurface(lpdds);
IsBack=dxwss.IsABackBufferSurface(lpdds); IsBack=dxwss.IsABackBufferSurface(lpdds);
@ -3901,13 +3925,22 @@ static HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRA
case 7: pBlt=pBlt7; break; case 7: pBlt=pBlt7; break;
} }
if(dxversion >= 4){ switch(dxversion){
// v2.03.20: apparently, it seems that in ddraw 7 you can set an empty rectangle to mean the whole area .... case 4:
// this fixes the black screen otherwise present in "Arcanum". // v2.02.92: found in Fifa 2000: lpRect is completely ignored, receiving bogus values like (-1, -1, -1, -1}
// v2.02.92: found in Fifa 2000: lpRect is completely ignored, receiving bogus values like (-1, -1, -1, -1} // or {0, 0, 0, 0}, or {-109119151, -109119151, -109119151, -109119151}.
// or {0, 0, 0, 0}, or {-109119151, -109119151, -109119151, -109119151}. // better use the Lock-ed rect
// better use the Lock-ed rect lprect = PopLockedRect(lpdds, lprect);
lprect = PopLockedRect(lpdds, lprect); break;
case 7:
if(lprect){
rect = *lprect;
lprect = ▭
// v2.03.20: apparently, it seems that in ddraw 7 you can set an empty rectangle to mean the whole area ....
// this fixes the black screen otherwise present in "Arcanum".
if(IsPrim && ((lprect->right - lprect->left) == 0) && ((lprect->bottom - lprect->top) == 0)) lprect = NULL;
}
break;
} }
if((dxw.dwFlags6 & FIXPITCH) && !(IsPrim||IsBack) && (lpdds == SaveSurface)){ if((dxw.dwFlags6 & FIXPITCH) && !(IsPrim||IsBack) && (lpdds == SaveSurface)){
@ -3989,17 +4022,27 @@ static HRESULT WINAPI extUnlockDir(int dxversion, Unlock4_Type pUnlock, LPDIRECT
LPDIRECTDRAWSURFACE lpDDSPrim; LPDIRECTDRAWSURFACE lpDDSPrim;
GetGDISurface_Type pGetGDISurface; GetGDISurface_Type pGetGDISurface;
Blt_Type pBlt; Blt_Type pBlt;
RECT rect;
IsPrim=dxwss.IsAPrimarySurface(lpdds); IsPrim=dxwss.IsAPrimarySurface(lpdds);
IsBack=dxwss.IsABackBufferSurface(lpdds); IsBack=dxwss.IsABackBufferSurface(lpdds);
if(dxversion >= 4){ switch(dxversion){
// v2.03.20: apparently, it seems that in ddraw 7 you can set an empty rectangle to mean the whole area .... case 4:
// this fixes the black screen otherwise present in "Arcanum". // v2.02.92: found in Fifa 2000: lpRect is completely ignored, receiving bogus values like (-1, -1, -1, -1}
// v2.02.92: found in Fifa 2000: lpRect is completely ignored, receiving bogus values like (-1, -1, -1, -1} // or {0, 0, 0, 0}, or {-109119151, -109119151, -109119151, -109119151}.
// or {0, 0, 0, 0}, or {-109119151, -109119151, -109119151, -109119151}. // better use the Lock-ed rect
// better use the Lock-ed rect lprect = PopLockedRect(lpdds, lprect);
lprect = PopLockedRect(lpdds, lprect); break;
case 7:
if(lprect){
rect = *lprect;
lprect = ▭
// v2.03.20: apparently, it seems that in ddraw 7 you can set an empty rectangle to mean the whole area ....
// this fixes the black screen otherwise present in "Arcanum".
if(IsPrim && ((lprect->right - lprect->left) == 0) && ((lprect->bottom - lprect->top) == 0)) lprect = NULL;
}
break;
} }
if(IsTraceDDRAW){ if(IsTraceDDRAW){
@ -4797,6 +4840,7 @@ static HRESULT WINAPI extGetCapsS(int dxInterface, GetCapsS_Type pGetCapsS, LPDI
caps->dwCaps |= (DDSCAPS_BACKBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_FLIP|DDSCAPS_LOCALVIDMEM); // you never know.... caps->dwCaps |= (DDSCAPS_BACKBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_FLIP|DDSCAPS_LOCALVIDMEM); // you never know....
caps->dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // backbuffer surfaces can't be this way caps->dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // backbuffer surfaces can't be this way
if(caps->dwCaps & DDSCAPS_3DDEVICE) caps->dwCaps |= DDSCAPS_LOCALVIDMEM; if(caps->dwCaps & DDSCAPS_3DDEVICE) caps->dwCaps |= DDSCAPS_LOCALVIDMEM;
//if(caps->dwCaps & DDSCAPS_3DDEVICE) caps->dwCaps |= (DDSCAPS_LOCALVIDMEM | DDSCAPS_COMPLEX);
} }
// v2.03.82: fixed logic for ZBUFFER capabilities: "The Creed" may have two, in SYSTEMMEMORY or in VIDEOMEMORY ... // v2.03.82: fixed logic for ZBUFFER capabilities: "The Creed" may have two, in SYSTEMMEMORY or in VIDEOMEMORY ...

View File

@ -347,7 +347,7 @@ static void TextureHack(LPDIRECTDRAWSURFACE s, int dxversion)
if(!hash) break; // almost certainly, an empty black surface! if(!hash) break; // almost certainly, an empty black surface!
// Look for the .BMP file. // Look for the .BMP file.
sprintf_s(pszFile, MAX_PATH, "%s\\texture.out\\texture.%03d.%03d.%s.%08X.bmp", sprintf_s(pszFile, MAX_PATH, "%s\\texture.in\\texture.%03d.%03d.%s.%08X.bmp",
GetDxWndPath(), ddsd.dwWidth, ddsd.dwHeight, SurfaceType(ddsd.ddpfPixelFormat), hash); GetDxWndPath(), ddsd.dwWidth, ddsd.dwHeight, SurfaceType(ddsd.ddpfPixelFormat), hash);
hf = fopen(pszFile, "rb"); hf = fopen(pszFile, "rb");
if(!hf) break; // no updated texture to load if(!hf) break; // no updated texture to load

View File

@ -67,7 +67,7 @@ static char *FlagNames[32]={
"HOOKDI", "MODIFYMOUSE", "HANDLEEXCEPTIONS", "SAVELOAD", "HOOKDI", "MODIFYMOUSE", "HANDLEEXCEPTIONS", "SAVELOAD",
"EMULATEBUFFER", "HOOKDI8", "BLITFROMBACKBUFFER", "SUPPRESSCLIPPING", "EMULATEBUFFER", "HOOKDI8", "BLITFROMBACKBUFFER", "SUPPRESSCLIPPING",
"AUTOREFRESH", "FIXWINFRAME", "HIDEHWCURSOR", "SLOWDOWN", "AUTOREFRESH", "FIXWINFRAME", "HIDEHWCURSOR", "SLOWDOWN",
"ENABLECLIPPING", "LOCKWINSTYLE", "MAPGDITOPRIMARY", "FIXTEXTOUT", "DISABLECLIPPING", "LOCKWINSTYLE", "MAPGDITOPRIMARY", "FIXTEXTOUT",
"KEEPCURSORWITHIN", "USERGB565", "SUPPRESSDXERRORS", "PREVENTMAXIMIZE", "KEEPCURSORWITHIN", "USERGB565", "SUPPRESSDXERRORS", "PREVENTMAXIMIZE",
"LOCKEDSURFACE", "FIXPARENTWIN", "SWITCHVIDEOMEMORY", "CLIENTREMAPPING", "LOCKEDSURFACE", "FIXPARENTWIN", "SWITCHVIDEOMEMORY", "CLIENTREMAPPING",
"HANDLEALTF4", "LOCKWINPOS", "HOOKCHILDWIN", "MESSAGEPROC" "HANDLEALTF4", "LOCKWINPOS", "HOOKCHILDWIN", "MESSAGEPROC"
@ -141,7 +141,7 @@ static char *Flag7Names[32]={
static char *Flag8Names[32]={ static char *Flag8Names[32]={
"FORCEWAIT", "FORCENOWAIT", "FORCEVSYNC", "FORCENOVSYNC", "FORCEWAIT", "FORCENOWAIT", "FORCEVSYNC", "FORCENOVSYNC",
"VSYNCSCANLINES", "TRIMTEXTUREFORMATS", "", "", "VSYNCSCANLINES", "TRIMTEXTUREFORMATS", "NOHALDEVICE", "CLIPLOCK",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
@ -277,6 +277,23 @@ void OutTrace(const char *format, ...)
dxw.dwTFlags = tFlags; // restore settings dxw.dwTFlags = tFlags; // restore settings
} }
void HexTrace(unsigned char *buf, int len)
{
char line[3*32 + 40];
char hex[6];
int count=0;
while(len){
sprintf(line,"%04X: ", count);
for(int i=32; i && len; i--, len--, buf++){
sprintf(hex, "%02X.", *buf);
strcat(line, hex);
}
strcat(line, "\n");
OutTrace(line);
count += 32;
}
}
// from MSDN: // from MSDN:
// GetVersionEx may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions // GetVersionEx may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions
// //

View File

@ -82,15 +82,17 @@ POINT dxwCore::GetFrameOffset()
POINT dxwCore::ClientOffset(HWND hwnd) POINT dxwCore::ClientOffset(HWND hwnd)
{ {
POINT upleft, ret; POINT upleft, ret = {0, 0};
upleft.x = upleft.y = 0; if(iSizX && iSizY) {
(*pClientToScreen)(hwnd, &upleft); upleft.x = upleft.y = 0;
ret.x = (((upleft.x - iPosX) * dwScreenWidth) + (iSizX >> 1)) / iSizX; (*pClientToScreen)(hwnd, &upleft);
ret.y = (((upleft.y - iPosY) * dwScreenHeight) + (iSizY >> 1)) / iSizY; ret.x = (((upleft.x - iPosX) * dwScreenWidth) + (iSizX >> 1)) / iSizX;
if(ret.x < 0) ret.x = 0; ret.y = (((upleft.y - iPosY) * dwScreenHeight) + (iSizY >> 1)) / iSizY;
if(ret.y < 0) ret.y = 0; if(ret.x < 0) ret.x = 0;
OutTraceB("ClientOffset: hwnd=%x offset=(%d,%d)\n", hwnd, ret.x, ret.y); if(ret.y < 0) ret.y = 0;
OutTraceB("ClientOffset: hwnd=%x offset=(%d,%d)\n", hwnd, ret.x, ret.y);
}
return ret; return ret;
} }
@ -98,10 +100,12 @@ POINT dxwCore::ClientOffset(HWND hwnd)
RECT dxwCore::GetWindowRect(RECT win) RECT dxwCore::GetWindowRect(RECT win)
{ {
win.left = (((win.left - iPosX) * (LONG)dwScreenWidth) + (iSizX >> 1)) / iSizX; if(iSizX && iSizY) {
win.top = (((win.top - iPosY) * (LONG)dwScreenHeight) + (iSizY >> 1)) / iSizY; win.left = (((win.left - iPosX) * (LONG)dwScreenWidth) + (iSizX >> 1)) / iSizX;
win.right = (((win.right - iPosX) * (LONG)dwScreenWidth) + (iSizX >> 1)) / iSizX; win.top = (((win.top - iPosY) * (LONG)dwScreenHeight) + (iSizY >> 1)) / iSizY;
win.bottom = (((win.bottom - iPosY) * (LONG)dwScreenHeight) + (iSizY >> 1)) / iSizY; win.right = (((win.right - iPosX) * (LONG)dwScreenWidth) + (iSizX >> 1)) / iSizX;
win.bottom = (((win.bottom - iPosY) * (LONG)dwScreenHeight) + (iSizY >> 1)) / iSizY;
}
return win; return win;
} }
@ -110,10 +114,12 @@ RECT dxwCore::GetWindowRect(RECT win)
RECT dxwCore::GetClientRect(RECT win) RECT dxwCore::GetClientRect(RECT win)
{ {
win.left = ((win.left * dwScreenWidth) + (iSizX >> 1)) / iSizX; if(iSizX && iSizY) {
win.top = ((win.top * dwScreenHeight) + (iSizY >> 1)) / iSizY; win.left = ((win.left * dwScreenWidth) + (iSizX >> 1)) / iSizX;
win.right = ((win.right * dwScreenWidth) + (iSizX >> 1)) / iSizX; win.top = ((win.top * dwScreenHeight) + (iSizY >> 1)) / iSizY;
win.bottom = ((win.bottom * dwScreenHeight) + (iSizY >> 1)) / iSizY; win.right = ((win.right * dwScreenWidth) + (iSizX >> 1)) / iSizX;
win.bottom = ((win.bottom * dwScreenHeight) + (iSizY >> 1)) / iSizY;
}
return win; return win;
} }
@ -252,46 +258,58 @@ void dxwCore::MapClient(int *nXDest, int *nYDest)
void dxwCore::UnmapWindow(LPRECT rect) void dxwCore::UnmapWindow(LPRECT rect)
{ {
rect->left= ((rect->left - iPosX) * (int)dwScreenWidth) / iSizX; if(iSizX && iSizY) {
rect->top= ((rect->top - iPosY) * (int)dwScreenHeight) / iSizY; rect->left= ((rect->left - iPosX) * (int)dwScreenWidth) / iSizX;
rect->right= ((rect->right - iPosX) * (int)dwScreenWidth) / iSizX; rect->top= ((rect->top - iPosY) * (int)dwScreenHeight) / iSizY;
rect->bottom= ((rect->bottom - iPosY) * (int)dwScreenHeight) / iSizY; rect->right= ((rect->right - iPosX) * (int)dwScreenWidth) / iSizX;
rect->bottom= ((rect->bottom - iPosY) * (int)dwScreenHeight) / iSizY;
}
} }
void dxwCore::UnmapWindow(LPPOINT point) void dxwCore::UnmapWindow(LPPOINT point)
{ {
point->x= ((point->x - iPosX) * (int)dwScreenWidth) / iSizX; if(iSizX && iSizY) {
point->y= ((point->y - iPosY) * (int)dwScreenHeight) / iSizY; point->x= ((point->x - iPosX) * (int)dwScreenWidth) / iSizX;
point->y= ((point->y - iPosY) * (int)dwScreenHeight) / iSizY;
}
} }
// UnmapClient: transforms the client real coordinates of the real desktop into virtual ones // UnmapClient: transforms the client real coordinates of the real desktop into virtual ones
void dxwCore::UnmapClient(LPPOINT lppoint) void dxwCore::UnmapClient(LPPOINT lppoint)
{ {
lppoint->x = ((lppoint->x * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX; if(iSizX && iSizY) {
lppoint->y = ((lppoint->y * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY; lppoint->x = ((lppoint->x * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX;
lppoint->y = ((lppoint->y * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY;
}
} }
void dxwCore::UnmapClient(int *nXDest, int *nYDest) void dxwCore::UnmapClient(int *nXDest, int *nYDest)
{ {
*nXDest = ((*nXDest * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX; if(iSizX && iSizY) {
*nYDest = ((*nYDest * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY; *nXDest = ((*nXDest * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX;
*nYDest = ((*nYDest * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY;
}
} }
void dxwCore::UnmapClient(int *nXDest, int *nYDest, int *nWidth, int *nHeight) void dxwCore::UnmapClient(int *nXDest, int *nYDest, int *nWidth, int *nHeight)
{ {
*nXDest = ((*nXDest * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX; if(iSizX && iSizY) {
*nYDest = ((*nYDest * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY; *nXDest = ((*nXDest * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX;
*nWidth = ((*nWidth * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX; *nYDest = ((*nYDest * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY;
*nHeight = ((*nHeight * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY; *nWidth = ((*nWidth * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX;
*nHeight = ((*nHeight * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY;
}
} }
void dxwCore::UnmapClient(LPRECT lpRect) void dxwCore::UnmapClient(LPRECT lpRect)
{ {
lpRect->left = ((lpRect->left * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX; if(iSizX && iSizY) {
lpRect->right = ((lpRect->right * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX; lpRect->left = ((lpRect->left * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX;
lpRect->top = ((lpRect->top * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY; lpRect->right = ((lpRect->right * (int)dwScreenWidth) + (iSizX >> 1)) / iSizX;
lpRect->bottom = ((lpRect->bottom * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY; lpRect->top = ((lpRect->top * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY;
lpRect->bottom = ((lpRect->bottom * (int)dwScreenHeight) + (iSizY >> 1)) / iSizY;
}
} }
// GetMonitorWorkarea: retrieves the desktop coordinates of the whole desktop (id == -1) or of a given monitor (id >= 0) // GetMonitorWorkarea: retrieves the desktop coordinates of the whole desktop (id == -1) or of a given monitor (id >= 0)

View File

@ -363,7 +363,7 @@ POINT dxwCore::FixCursorPos(POINT prev)
if (h) curr.y = (curr.y * dxw.GetScreenHeight()) / h; if (h) curr.y = (curr.y * dxw.GetScreenHeight()) / h;
} }
if((dxw.dwFlags1 & ENABLECLIPPING) && lpClipRegion){ if((dxw.dwFlags1 & DISABLECLIPPING) && lpClipRegion){
// v2.1.93: // v2.1.93:
// in clipping mode, avoid the cursor position to lay outside the valid rect // in clipping mode, avoid the cursor position to lay outside the valid rect
// note 1: the rect follow the convention and valid coord lay between left to righ-1, // note 1: the rect follow the convention and valid coord lay between left to righ-1,

View File

@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "TlHelp32.h" #include "TlHelp32.h"
#define VERSION "2.03.99.b3" #define VERSION "2.03.99.fx3"
#define DDTHREADLOCK 1 #define DDTHREADLOCK 1
//#define LOCKTHREADS //#define LOCKTHREADS

Binary file not shown.

View File

@ -800,23 +800,6 @@ typedef struct {
LPVOID arg; LPVOID arg;
} CallbackArg7; } CallbackArg7;
static void HexDump(unsigned char *buf, int len)
{
char line[3*32 + 40];
char hex[6];
int count=0;
while(len){
sprintf(line,"%04X: ", count);
for(int i=32; i && len; i--, len--, buf++){
sprintf(hex, "%02X.", *buf);
strcat(line, hex);
}
strcat(line, "\n");
OutTrace(line);
count += 32;
}
}
static void DumpD3DDeviceDesc(LPD3DDEVICEDESC d3, char *label) static void DumpD3DDeviceDesc(LPD3DDEVICEDESC d3, char *label)
{ {
if(IsTraceD3D){ if(IsTraceD3D){
@ -834,7 +817,7 @@ static void DumpD3DDeviceDesc(LPD3DDEVICEDESC d3, char *label)
if(d3->dwFlags & D3DDD_MAXBUFFERSIZE) OutTrace("MaxBufferSize=%d ", d3->dwMaxBufferSize); if(d3->dwFlags & D3DDD_MAXBUFFERSIZE) OutTrace("MaxBufferSize=%d ", d3->dwMaxBufferSize);
if(d3->dwFlags & D3DDD_MAXVERTEXCOUNT) OutTrace("MaxVertexCount=%d ", d3->dwMaxVertexCount); if(d3->dwFlags & D3DDD_MAXVERTEXCOUNT) OutTrace("MaxVertexCount=%d ", d3->dwMaxVertexCount);
OutTrace("Texture min=(%dx%d) max=(%dx%d)\n", d3->dwMinTextureWidth, d3->dwMinTextureHeight, d3->dwMaxTextureWidth, d3->dwMaxTextureHeight); OutTrace("Texture min=(%dx%d) max=(%dx%d)\n", d3->dwMinTextureWidth, d3->dwMinTextureHeight, d3->dwMaxTextureWidth, d3->dwMaxTextureHeight);
HexDump((unsigned char *)d3, d3->dwSize); HexTrace((unsigned char *)d3, d3->dwSize);
} }
else else
OutTrace("EnumDevices: CALLBACK dev=%s ddesc=NULL\n", label); OutTrace("EnumDevices: CALLBACK dev=%s ddesc=NULL\n", label);
@ -861,7 +844,7 @@ static void DumpD3DDeviceDesc7(LPD3DDEVICEDESC7 d3, char *label)
OutTrace("Texture min=(%dx%d) max=(%dx%d)\n", d3->dwMinTextureWidth, d3->dwMinTextureHeight, d3->dwMaxTextureWidth, d3->dwMaxTextureHeight); OutTrace("Texture min=(%dx%d) max=(%dx%d)\n", d3->dwMinTextureWidth, d3->dwMinTextureHeight, d3->dwMaxTextureWidth, d3->dwMaxTextureHeight);
// to be completed .... // to be completed ....
//OutTrace("\n"); //OutTrace("\n");
HexDump((unsigned char *)d3, sizeof(D3DDEVICEDESC7)); HexTrace((unsigned char *)d3, sizeof(D3DDEVICEDESC7));
} }
else else
OutTrace("EnumDevices: CALLBACK dev=%s ddesc=NULL\n", label); OutTrace("EnumDevices: CALLBACK dev=%s ddesc=NULL\n", label);
@ -874,6 +857,14 @@ HRESULT WINAPI extDeviceProxy(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR
OutTraceD3D("EnumDevices: CALLBACK GUID=%x(%s) DeviceDescription=\"%s\", DeviceName=\"%s\", arg=%x\n", lpGuid->Data1, ExplainGUID(lpGuid), lpDeviceDescription, lpDeviceName, ((CallbackArg *)arg)->arg); OutTraceD3D("EnumDevices: CALLBACK GUID=%x(%s) DeviceDescription=\"%s\", DeviceName=\"%s\", arg=%x\n", lpGuid->Data1, ExplainGUID(lpGuid), lpDeviceDescription, lpDeviceName, ((CallbackArg *)arg)->arg);
DumpD3DDeviceDesc(lpd3ddd1, "HWDEV"); DumpD3DDeviceDesc(lpd3ddd1, "HWDEV");
DumpD3DDeviceDesc(lpd3ddd2, "SWDEV"); DumpD3DDeviceDesc(lpd3ddd2, "SWDEV");
// IID_IDirect3DHALDevice = 0x84e63de0....
if((dxw.dwFlags8 & NOHALDEVICE) && (lpGuid->Data1 == 0x84e63de0))
{
OutTraceDW("EnumDevices: D3DHALDEVICE SKIP\n");
return TRUE;
}
if(dxw.dwFlags4 & NOPOWER2FIX){ if(dxw.dwFlags4 & NOPOWER2FIX){
D3DDEVICEDESC lpd3ddd1fix, lpd3ddd2fix; D3DDEVICEDESC lpd3ddd1fix, lpd3ddd2fix;
if(lpd3ddd1) memcpy(&lpd3ddd1fix, lpd3ddd1, sizeof(D3DDEVICEDESC)); if(lpd3ddd1) memcpy(&lpd3ddd1fix, lpd3ddd1, sizeof(D3DDEVICEDESC));
@ -895,7 +886,10 @@ HRESULT WINAPI extDeviceProxy7(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LP
{ {
HRESULT res; HRESULT res;
OutTraceD3D("EnumDevices(D3D7): CALLBACK DeviceDescription=\"%s\", DeviceName=\"%s\", arg=%x\n", lpDeviceDescription, lpDeviceName, ((CallbackArg *)arg)->arg); OutTraceD3D("EnumDevices(D3D7): CALLBACK DeviceDescription=\"%s\", DeviceName=\"%s\", arg=%x\n", lpDeviceDescription, lpDeviceName, ((CallbackArg *)arg)->arg);
DumpD3DDeviceDesc((LPD3DDEVICEDESC)lpd3ddd, "DEV"); DumpD3DDeviceDesc7(lpd3ddd, "DX7DEV");
// to do: NOHALDEVICE handling, we have no GUID here!
if(dxw.dwFlags4 & NOPOWER2FIX){ if(dxw.dwFlags4 & NOPOWER2FIX){
D3DDEVICEDESC7 lpd3dddfix; D3DDEVICEDESC7 lpd3dddfix;
if(lpd3ddd) memcpy(&lpd3dddfix, lpd3ddd, sizeof(D3DDEVICEDESC7)); if(lpd3ddd) memcpy(&lpd3dddfix, lpd3ddd, sizeof(D3DDEVICEDESC7));
@ -1130,6 +1124,12 @@ HRESULT WINAPI extInitializeVP(void *lpvp, LPDIRECT3D lpd3d)
return res; return res;
} }
#ifndef D3DERR_NOTAVAILABLE
#define _FACD3D 0x876
#define D3DERR_NOTAVAILABLE MAKE_HRESULT(1, _FACD3D, 2154)
#endif
HRESULT WINAPI extCreateDevice2(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE lpdds, LPDIRECT3DDEVICE2 *lplpd3dd) HRESULT WINAPI extCreateDevice2(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE lpdds, LPDIRECT3DDEVICE2 *lplpd3dd)
{ {
HRESULT res; HRESULT res;
@ -1137,6 +1137,11 @@ HRESULT WINAPI extCreateDevice2(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE
OutTraceD3D("CreateDevice(D3D2): d3d=%x GUID=%x(%s) lpdds=%x%s\n", OutTraceD3D("CreateDevice(D3D2): d3d=%x GUID=%x(%s) lpdds=%x%s\n",
lpd3d, Guid.Data1, ExplainGUID((GUID *)&Guid), lpdds, dxwss.ExplainSurfaceRole((LPDIRECTDRAWSURFACE)lpdds)); lpd3d, Guid.Data1, ExplainGUID((GUID *)&Guid), lpdds, dxwss.ExplainSurfaceRole((LPDIRECTDRAWSURFACE)lpdds));
if((dxw.dwFlags8 & NOHALDEVICE) && (Guid.Data1 == 0x84e63de0)) {
OutTraceDW("CreateDevice(D3D2): D3DHALDEVICE SKIP\n");
return D3DERR_NOTAVAILABLE;
}
res=(*pCreateDevice2)(lpd3d, Guid, lpdds, lplpd3dd); res=(*pCreateDevice2)(lpd3d, Guid, lpdds, lplpd3dd);
if(res!=DD_OK) { if(res!=DD_OK) {
OutTraceE("CreateDevice(D3D2) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); OutTraceE("CreateDevice(D3D2) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
@ -1156,6 +1161,11 @@ HRESULT WINAPI extCreateDevice3(void *lpd3d, REFCLSID Guid, LPDIRECTDRAWSURFACE4
OutTraceD3D("CreateDevice(D3D3): d3d=%x GUID=%x(%s) lpdds=%x%s\n", OutTraceD3D("CreateDevice(D3D3): d3d=%x GUID=%x(%s) lpdds=%x%s\n",
lpd3d, Guid.Data1, ExplainGUID((GUID *)&Guid), lpdds, dxwss.ExplainSurfaceRole((LPDIRECTDRAWSURFACE)lpdds)); lpd3d, Guid.Data1, ExplainGUID((GUID *)&Guid), lpdds, dxwss.ExplainSurfaceRole((LPDIRECTDRAWSURFACE)lpdds));
if((dxw.dwFlags8 & NOHALDEVICE) && (Guid.Data1 == 0x84e63de0)) {
OutTraceDW("CreateDevice(D3D3): D3DHALDEVICE SKIP\n");
return D3DERR_NOTAVAILABLE;
}
res=(*pCreateDevice3)(lpd3d, Guid, lpdds, lplpd3dd, unk); res=(*pCreateDevice3)(lpd3d, Guid, lpdds, lplpd3dd, unk);
if(res!=DD_OK) { if(res!=DD_OK) {
OutTraceE("CreateDevice(D3D3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); OutTraceE("CreateDevice(D3D3) ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);

View File

@ -190,6 +190,7 @@ static HookEntryEx_Type Hooks[]={
{HOOK_HOT_CANDIDATE, 0, "SetWindowLongW", (FARPROC)SetWindowLongW, (FARPROC *)&pSetWindowLongW, (FARPROC)extSetWindowLongW}, {HOOK_HOT_CANDIDATE, 0, "SetWindowLongW", (FARPROC)SetWindowLongW, (FARPROC *)&pSetWindowLongW, (FARPROC)extSetWindowLongW},
{HOOK_HOT_CANDIDATE, 0, "GetWindowLongW", (FARPROC)GetWindowLongW, (FARPROC *)&pGetWindowLongW, (FARPROC)extGetWindowLongW}, {HOOK_HOT_CANDIDATE, 0, "GetWindowLongW", (FARPROC)GetWindowLongW, (FARPROC *)&pGetWindowLongW, (FARPROC)extGetWindowLongW},
{HOOK_IAT_CANDIDATE, 0, "IsWindowVisible", (FARPROC)NULL, (FARPROC *)&pIsWindowVisible, (FARPROC)extIsWindowVisible}, {HOOK_IAT_CANDIDATE, 0, "IsWindowVisible", (FARPROC)NULL, (FARPROC *)&pIsWindowVisible, (FARPROC)extIsWindowVisible},
{HOOK_IAT_CANDIDATE, 0, "GetTopWindow", (FARPROC)GetTopWindow, (FARPROC *)&pGetTopWindow, (FARPROC)extGetTopWindow},
// hot by MinHook since v2.03.07 // hot by MinHook since v2.03.07
{HOOK_HOT_CANDIDATE, 0, "SystemParametersInfoA", (FARPROC)SystemParametersInfoA, (FARPROC *)&pSystemParametersInfoA, (FARPROC)extSystemParametersInfoA}, {HOOK_HOT_CANDIDATE, 0, "SystemParametersInfoA", (FARPROC)SystemParametersInfoA, (FARPROC *)&pSystemParametersInfoA, (FARPROC)extSystemParametersInfoA},
{HOOK_HOT_CANDIDATE, 0, "SystemParametersInfoW", (FARPROC)SystemParametersInfoW, (FARPROC *)&pSystemParametersInfoW, (FARPROC)extSystemParametersInfoW}, {HOOK_HOT_CANDIDATE, 0, "SystemParametersInfoW", (FARPROC)SystemParametersInfoW, (FARPROC *)&pSystemParametersInfoW, (FARPROC)extSystemParametersInfoW},
@ -203,7 +204,6 @@ static HookEntryEx_Type Hooks[]={
{HOOK_HOT_CANDIDATE, 0, "IsWindow", (FARPROC)IsWindow, (FARPROC *)&pIsWindow, (FARPROC)extIsWindow}, {HOOK_HOT_CANDIDATE, 0, "IsWindow", (FARPROC)IsWindow, (FARPROC *)&pIsWindow, (FARPROC)extIsWindow},
{HOOK_HOT_CANDIDATE, 0, "GetWindow", (FARPROC)GetWindow, (FARPROC *)&pGetWindow, (FARPROC)extGetWindow}, {HOOK_HOT_CANDIDATE, 0, "GetWindow", (FARPROC)GetWindow, (FARPROC *)&pGetWindow, (FARPROC)extGetWindow},
{HOOK_HOT_CANDIDATE, 0, "GetWindowThreadProcessId", (FARPROC)GetWindowThreadProcessId, (FARPROC *)&pGetWindowThreadProcessId, (FARPROC)extGetWindowThreadProcessId}, {HOOK_HOT_CANDIDATE, 0, "GetWindowThreadProcessId", (FARPROC)GetWindowThreadProcessId, (FARPROC *)&pGetWindowThreadProcessId, (FARPROC)extGetWindowThreadProcessId},
{HOOK_HOT_CANDIDATE, 0, "GetTopWindow", (FARPROC)GetTopWindow, (FARPROC *)&pGetTopWindow, (FARPROC)extGetTopWindow},
{HOOK_HOT_CANDIDATE, 0, "GetFocus", (FARPROC)GetFocus, (FARPROC *)&pGetFocus, (FARPROC)extGetFocus}, {HOOK_HOT_CANDIDATE, 0, "GetFocus", (FARPROC)GetFocus, (FARPROC *)&pGetFocus, (FARPROC)extGetFocus},
#endif #endif
@ -1133,8 +1133,7 @@ HCURSOR WINAPI extSetCursor(HCURSOR hCursor)
HCURSOR ret; HCURSOR ret;
ret=(*pSetCursor)(hCursor); ret=(*pSetCursor)(hCursor);
OutTraceDW("GDI.SetCursor: Cursor=%x, ret=%x\n", hCursor, ret); OutTraceB("GDI.SetCursor: Cursor=%x, ret=%x\n", hCursor, ret);
//MessageBox(0, "SelectPalette", "GDI32.dll", MB_OK | MB_ICONEXCLAMATION);
return ret; return ret;
} }
@ -2121,7 +2120,8 @@ BOOL WINAPI extClipCursor(RECT *lpRectArg)
OutTrace("ClipCursor: rect=(NULL)\n"); OutTrace("ClipCursor: rect=(NULL)\n");
} }
if (!(dxw.dwFlags1 & ENABLECLIPPING)) return 1; if (!(dxw.dwFlags1 & DISABLECLIPPING)) return TRUE;
if ((dxw.dwFlags8 & CLIPLOCKED) && (lpRectArg == NULL)) return TRUE;
if(lpRectArg){ if(lpRectArg){
Rect=*lpRectArg; Rect=*lpRectArg;
@ -2150,12 +2150,12 @@ BOOL WINAPI extClipCursor(RECT *lpRectArg)
BOOL WINAPI extGetClipCursor(LPRECT lpRect) BOOL WINAPI extGetClipCursor(LPRECT lpRect)
{ {
// v2.1.93: if ENABLECLIPPING, return the saved clip rect coordinates // v2.1.93: if DISABLECLIPPING, return the saved clip rect coordinates
BOOL ret; BOOL ret;
// proxy.... // proxy....
if (!(dxw.dwFlags1 & ENABLECLIPPING)) { if (!(dxw.dwFlags1 & DISABLECLIPPING)) {
ret=(*pGetClipCursor)(lpRect); ret=(*pGetClipCursor)(lpRect);
// v2.03.11: fix for "SubCulture" mouse movement // v2.03.11: fix for "SubCulture" mouse movement
if(lpRect && dxw.Windowize) *lpRect = dxw.GetScreenRect(); if(lpRect && dxw.Windowize) *lpRect = dxw.GetScreenRect();
@ -2737,7 +2737,7 @@ HWND WINAPI extGetTopWindow(HWND hwnd)
HWND ret; HWND ret;
OutTraceDW("GetTopWindow: hwnd=%x fullscreen=%x\n", hwnd, dxw.IsFullScreen()); OutTraceDW("GetTopWindow: hwnd=%x fullscreen=%x\n", hwnd, dxw.IsFullScreen());
// a fullscreen program is supposed to be always top Z-order on the desktop! // a fullscreen program is supposed to be always top Z-order on the desktop!
ret = (dxw.IsFullScreen() && dxw.IsDesktop(hwnd)) ? dxw.GethWnd() : (*pGetTopWindow)(hwnd); ret = (dxw.IsFullScreen() && dxw.IsDesktop(hwnd) && (dxw.dwFlags8 & PRETENDVISIBLE)) ? dxw.GethWnd() : (*pGetTopWindow)(hwnd);
OutTraceDW("GetTopWindow: ret=%x\n", ret); OutTraceDW("GetTopWindow: ret=%x\n", ret);
return ret; return ret;
} }
@ -3278,7 +3278,7 @@ BOOL WINAPI extIsWindowVisible(HWND hwnd)
BOOL ret; BOOL ret;
ret=(*pIsWindowVisible)(hwnd); ret=(*pIsWindowVisible)(hwnd);
OutTraceB("IsWindowVisible: hwnd=%x ret=%x\n", hwnd, ret); OutTraceB("IsWindowVisible: hwnd=%x ret=%x\n", hwnd, ret);
if(dxw.IsDesktop(hwnd) && !ret){ if(dxw.IsDesktop(hwnd) && (dxw.dwFlags8 & PRETENDVISIBLE) && !ret){
OutTraceDW("IsWindowVisible: FORCING ret=TRUE\n"); OutTraceDW("IsWindowVisible: FORCING ret=TRUE\n");
ret=TRUE; ret=TRUE;
} }

View File

@ -384,8 +384,8 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
dxw.dwFlags1 &= ~LOCKWINPOS; dxw.dwFlags1 &= ~LOCKWINPOS;
} }
while((*pShowCursor)(1) < 0); while((*pShowCursor)(1) < 0);
if(dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor(); if((dxw.dwFlags1 & CLIPCURSOR) && !(dxw.dwFlags8 & CLIPLOCKED)) dxw.EraseClipCursor();
if(dxw.dwFlags1 & ENABLECLIPPING) (*pClipCursor)(NULL); if(dxw.dwFlags1 & DISABLECLIPPING) dxw.EraseClipCursor();
break; break;
case WM_EXITSIZEMOVE: case WM_EXITSIZEMOVE:
if(IsToBeLocked){ if(IsToBeLocked){
@ -394,7 +394,7 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
} }
if((dxw.dwFlags1 & HIDEHWCURSOR) && dxw.IsFullScreen()) while((*pShowCursor)(0) >= 0); if((dxw.dwFlags1 & HIDEHWCURSOR) && dxw.IsFullScreen()) while((*pShowCursor)(0) >= 0);
if(dxw.dwFlags2 & SHOWHWCURSOR) while((*pShowCursor)(1) < 0); if(dxw.dwFlags2 & SHOWHWCURSOR) while((*pShowCursor)(1) < 0);
if(dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion); if(dxw.dwFlags1 & DISABLECLIPPING) extClipCursor(lpClipRegion);
if(dxw.dwFlags2 & REFRESHONRESIZE) dxw.ScreenRefresh(); if(dxw.dwFlags2 & REFRESHONRESIZE) dxw.ScreenRefresh();
if(dxw.dwFlags4 & HIDEDESKTOP) dxw.HideDesktop(dxw.GethWnd()); if(dxw.dwFlags4 & HIDEDESKTOP) dxw.HideDesktop(dxw.GethWnd());
if(dxw.dwFlags5 & CENTERTOWIN) { if(dxw.dwFlags5 & CENTERTOWIN) {
@ -489,12 +489,12 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case WM_SETFOCUS: case WM_SETFOCUS:
OutTraceDW("WindowProc: hwnd=%x GOT FOCUS\n", hwnd); OutTraceDW("WindowProc: hwnd=%x GOT FOCUS\n", hwnd);
if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor(); if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor();
if (dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion); if (dxw.dwFlags1 & DISABLECLIPPING) extClipCursor(lpClipRegion);
break; break;
case WM_KILLFOCUS: case WM_KILLFOCUS:
OutTraceDW("WindowProc: hwnd=%x LOST FOCUS\n", hwnd); OutTraceDW("WindowProc: hwnd=%x LOST FOCUS\n", hwnd);
if (dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor(); if((dxw.dwFlags1 & CLIPCURSOR) && !(dxw.dwFlags8 & CLIPLOCKED)) dxw.EraseClipCursor();
if (dxw.dwFlags1 & ENABLECLIPPING) (*pClipCursor)(NULL); if (dxw.dwFlags1 & DISABLECLIPPING) dxw.EraseClipCursor();
break; break;
case WM_SYSCOMMAND: case WM_SYSCOMMAND:
// v2.03.56.fix1 by FunkyFr3sh: ensure that "C&C Red Alert 2" receives the WM_SYSCOMMAND / SC_CLOSE message // v2.03.56.fix1 by FunkyFr3sh: ensure that "C&C Red Alert 2" receives the WM_SYSCOMMAND / SC_CLOSE message

View File

@ -35,6 +35,7 @@ void CTabDirectX2::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_FIXREFCOUNTER, cTarget->m_FixRefCounter); DDX_Check(pDX, IDC_FIXREFCOUNTER, cTarget->m_FixRefCounter);
DDX_Check(pDX, IDC_RETURNNULLREF, cTarget->m_ReturnNullRef); DDX_Check(pDX, IDC_RETURNNULLREF, cTarget->m_ReturnNullRef);
DDX_Check(pDX, IDC_FORCESHEL, cTarget->m_ForcesHEL); DDX_Check(pDX, IDC_FORCESHEL, cTarget->m_ForcesHEL);
DDX_Check(pDX, IDC_NOHALDEVICE, cTarget->m_NoHALDevice);
DDX_Check(pDX, IDC_MINIMALCAPS, cTarget->m_MinimalCaps); DDX_Check(pDX, IDC_MINIMALCAPS, cTarget->m_MinimalCaps);
DDX_Check(pDX, IDC_SETZBUFFERBITDEPTHS, cTarget->m_SetZBufferBitDepths); DDX_Check(pDX, IDC_SETZBUFFERBITDEPTHS, cTarget->m_SetZBufferBitDepths);
DDX_Check(pDX, IDC_DEINTERLACE, cTarget->m_Deinterlace); DDX_Check(pDX, IDC_DEINTERLACE, cTarget->m_Deinterlace);

View File

@ -31,8 +31,8 @@ void CTabInput::DoDataExchange(CDataExchange* pDX)
DDX_Radio(pDX, IDC_CURSORAUTOMATIC, cTarget->m_MouseVisibility); DDX_Radio(pDX, IDC_CURSORAUTOMATIC, cTarget->m_MouseVisibility);
// Cursor Handling // Cursor Handling
DDX_Check(pDX, IDC_MODIFYMOUSE, cTarget->m_ModifyMouse); DDX_Check(pDX, IDC_MODIFYMOUSE, cTarget->m_ModifyMouse);
DDX_Check(pDX, IDC_ENABLECLIPPING, cTarget->m_EnableClipping); //DDX_Check(pDX, IDC_DISABLECLIPPING, cTarget->m_EnableClipping);
DDX_Check(pDX, IDC_CLIPCURSOR, cTarget->m_CursorClipping); //DDX_Check(pDX, IDC_CLIPCURSOR, cTarget->m_CursorClipping);
DDX_Check(pDX, IDC_KEEPCURSORWITHIN, cTarget->m_KeepCursorWithin); DDX_Check(pDX, IDC_KEEPCURSORWITHIN, cTarget->m_KeepCursorWithin);
DDX_Check(pDX, IDC_KEEPCURSORFIXED, cTarget->m_KeepCursorFixed); DDX_Check(pDX, IDC_KEEPCURSORFIXED, cTarget->m_KeepCursorFixed);
DDX_Check(pDX, IDC_MESSAGEPROC, cTarget->m_MessageProc); DDX_Check(pDX, IDC_MESSAGEPROC, cTarget->m_MessageProc);
@ -41,7 +41,8 @@ void CTabInput::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_SLOW, cTarget->m_SlowDown); DDX_Check(pDX, IDC_SLOW, cTarget->m_SlowDown);
DDX_Check(pDX, IDC_RELEASEMOUSE, cTarget->m_ReleaseMouse); DDX_Check(pDX, IDC_RELEASEMOUSE, cTarget->m_ReleaseMouse);
DDX_Check(pDX, IDC_VIRTUALJOYSTICK, cTarget->m_VirtualJoystick); DDX_Check(pDX, IDC_VIRTUALJOYSTICK, cTarget->m_VirtualJoystick);
//DDX_Check(pDX, IDC_FRAMECOMPENSATION, cTarget->m_FrameCompensation); // Cursor Clipper
DDX_Radio(pDX, IDC_CLIPPERAUTO, cTarget->m_MouseClipper);
// DirectInput // DirectInput
DDX_Check(pDX, IDC_HOOKDI, cTarget->m_HookDI); DDX_Check(pDX, IDC_HOOKDI, cTarget->m_HookDI);
DDX_Check(pDX, IDC_HOOKDI8, cTarget->m_HookDI8); DDX_Check(pDX, IDC_HOOKDI8, cTarget->m_HookDI8);

View File

@ -35,6 +35,7 @@ void CTabSysLibs::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_FIXCLIPPERAREA, cTarget->m_FixClipperArea); DDX_Check(pDX, IDC_FIXCLIPPERAREA, cTarget->m_FixClipperArea);
DDX_Check(pDX, IDC_SYNCPALETTE, cTarget->m_SyncPalette); DDX_Check(pDX, IDC_SYNCPALETTE, cTarget->m_SyncPalette);
DDX_Check(pDX, IDC_NOWINERRORS, cTarget->m_NoWinErrors); DDX_Check(pDX, IDC_NOWINERRORS, cTarget->m_NoWinErrors);
DDX_Check(pDX, IDC_PRETENDVISIBLE, cTarget->m_PretendVisible);
// OpenGL // OpenGL
DDX_Check(pDX, IDC_HOOKOPENGL, cTarget->m_HookOpenGL); // duplicated DDX_Check(pDX, IDC_HOOKOPENGL, cTarget->m_HookOpenGL); // duplicated

View File

@ -31,6 +31,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_DxFilterMode = 0; // default: ddraw filtering m_DxFilterMode = 0; // default: ddraw filtering
m_DCEmulationMode = 0; // default: no emulation m_DCEmulationMode = 0; // default: no emulation
m_MouseVisibility = 0; m_MouseVisibility = 0;
m_MouseClipper = 0;
m_OffendingMessages = 0; m_OffendingMessages = 0;
m_TextureHandling = 0; m_TextureHandling = 0;
m_HookDI = FALSE; m_HookDI = FALSE;
@ -149,8 +150,8 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_IndependentRefresh = FALSE; m_IndependentRefresh = FALSE;
m_TextureFormat = FALSE; m_TextureFormat = FALSE;
m_FixWinFrame = FALSE; m_FixWinFrame = FALSE;
m_EnableClipping = FALSE; //m_EnableClipping = FALSE;
m_CursorClipping = FALSE; //m_CursorClipping = FALSE;
m_VideoToSystemMem = FALSE; m_VideoToSystemMem = FALSE;
m_FixTextOut = FALSE; m_FixTextOut = FALSE;
m_SharedDC = FALSE; m_SharedDC = FALSE;
@ -241,6 +242,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_FixClipperArea = FALSE; // ?? m_FixClipperArea = FALSE; // ??
m_SyncPalette = FALSE; m_SyncPalette = FALSE;
m_NoWinErrors = FALSE; m_NoWinErrors = FALSE;
m_PretendVisible = FALSE;
m_AnalyticMode = FALSE; m_AnalyticMode = FALSE;
m_NoPaletteUpdate = FALSE; m_NoPaletteUpdate = FALSE;
m_WireFrame = FALSE; m_WireFrame = FALSE;

View File

@ -33,6 +33,7 @@ public:
int m_DxFilterMode; int m_DxFilterMode;
int m_DCEmulationMode; int m_DCEmulationMode;
int m_MouseVisibility; int m_MouseVisibility;
int m_MouseClipper;
int m_OffendingMessages; int m_OffendingMessages;
int m_TextureHandling; int m_TextureHandling;
int m_SonProcessMode; int m_SonProcessMode;
@ -110,8 +111,8 @@ public:
BOOL m_IndependentRefresh; BOOL m_IndependentRefresh;
BOOL m_TextureFormat; BOOL m_TextureFormat;
BOOL m_FixWinFrame; BOOL m_FixWinFrame;
BOOL m_EnableClipping; //BOOL m_EnableClipping;
BOOL m_CursorClipping; //BOOL m_CursorClipping;
BOOL m_VideoToSystemMem; BOOL m_VideoToSystemMem;
BOOL m_FixTextOut; BOOL m_FixTextOut;
BOOL m_SharedDC; BOOL m_SharedDC;
@ -199,6 +200,7 @@ public:
BOOL m_FixClipperArea; BOOL m_FixClipperArea;
BOOL m_SyncPalette; BOOL m_SyncPalette;
BOOL m_NoWinErrors; BOOL m_NoWinErrors;
BOOL m_PretendVisible;
BOOL m_AnalyticMode; BOOL m_AnalyticMode;
BOOL m_NoPaletteUpdate; BOOL m_NoPaletteUpdate;
BOOL m_LimitResources; BOOL m_LimitResources;
@ -234,6 +236,7 @@ public:
BOOL m_DisableDisableAltTab; BOOL m_DisableDisableAltTab;
BOOL m_NoImagehlp; BOOL m_NoImagehlp;
BOOL m_ForcesHEL; BOOL m_ForcesHEL;
BOOL m_NoHALDevice;
BOOL m_MinimalCaps; BOOL m_MinimalCaps;
BOOL m_SetZBufferBitDepths; BOOL m_SetZBufferBitDepths;
BOOL m_ForcesSwapEffect; BOOL m_ForcesSwapEffect;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -277,6 +277,13 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
case 2: t->flags2 |= SHOWHWCURSOR; break; case 2: t->flags2 |= SHOWHWCURSOR; break;
} }
switch(dlg->m_MouseClipper){
case 0: break;
case 1: t->flags |= DISABLECLIPPING; break;
case 2: t->flags |= CLIPCURSOR; break;
case 3: t->flags |= CLIPCURSOR; t->flags8 |= CLIPLOCKED; break;
}
switch(dlg->m_OffendingMessages){ switch(dlg->m_OffendingMessages){
case 0: break; case 0: break;
case 1: t->flags3 |= FILTERMESSAGES; break; case 1: t->flags3 |= FILTERMESSAGES; break;
@ -394,6 +401,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_DisableDisableAltTab) t->flags7 |= DISABLEDISABLEALTTAB; if(dlg->m_DisableDisableAltTab) t->flags7 |= DISABLEDISABLEALTTAB;
if(dlg->m_NoImagehlp) t->flags5 |= NOIMAGEHLP; if(dlg->m_NoImagehlp) t->flags5 |= NOIMAGEHLP;
if(dlg->m_ForcesHEL) t->flags3 |= FORCESHEL; if(dlg->m_ForcesHEL) t->flags3 |= FORCESHEL;
if(dlg->m_NoHALDevice) t->flags8 |= NOHALDEVICE;
if(dlg->m_MinimalCaps) t->flags3 |= MINIMALCAPS; if(dlg->m_MinimalCaps) t->flags3 |= MINIMALCAPS;
if(dlg->m_SetZBufferBitDepths) t->flags6 |= SETZBUFFERBITDEPTHS; if(dlg->m_SetZBufferBitDepths) t->flags6 |= SETZBUFFERBITDEPTHS;
if(dlg->m_ForcesSwapEffect) t->flags6 |= FORCESWAPEFFECT; if(dlg->m_ForcesSwapEffect) t->flags6 |= FORCESWAPEFFECT;
@ -427,8 +435,8 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_IndependentRefresh) t->flags2 |= INDEPENDENTREFRESH; if(dlg->m_IndependentRefresh) t->flags2 |= INDEPENDENTREFRESH;
if(dlg->m_TextureFormat) t->flags5 |= TEXTUREFORMAT; if(dlg->m_TextureFormat) t->flags5 |= TEXTUREFORMAT;
if(dlg->m_FixWinFrame) t->flags |= FIXWINFRAME; if(dlg->m_FixWinFrame) t->flags |= FIXWINFRAME;
if(dlg->m_EnableClipping) t->flags |= ENABLECLIPPING; //if(dlg->m_EnableClipping) t->flags |= DISABLECLIPPING;
if(dlg->m_CursorClipping) t->flags |= CLIPCURSOR; //if(dlg->m_CursorClipping) t->flags |= CLIPCURSOR;
if(dlg->m_VideoToSystemMem) t->flags |= SWITCHVIDEOMEMORY; if(dlg->m_VideoToSystemMem) t->flags |= SWITCHVIDEOMEMORY;
if(dlg->m_FixTextOut) t->flags |= FIXTEXTOUT; if(dlg->m_FixTextOut) t->flags |= FIXTEXTOUT;
if(dlg->m_HookGlide) t->flags4 |= HOOKGLIDE; if(dlg->m_HookGlide) t->flags4 |= HOOKGLIDE;
@ -514,6 +522,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_FixClipperArea) t->flags7 |= FIXCLIPPERAREA; if(dlg->m_FixClipperArea) t->flags7 |= FIXCLIPPERAREA;
if(dlg->m_SyncPalette) t->flags6 |= SYNCPALETTE; if(dlg->m_SyncPalette) t->flags6 |= SYNCPALETTE;
if(dlg->m_NoWinErrors) t->flags7 |= NOWINERRORS; if(dlg->m_NoWinErrors) t->flags7 |= NOWINERRORS;
if(dlg->m_PretendVisible) t->flags8 |= PRETENDVISIBLE;
if(dlg->m_AnalyticMode) t->flags3 |= ANALYTICMODE; if(dlg->m_AnalyticMode) t->flags3 |= ANALYTICMODE;
if(dlg->m_ReplacePrivOps) t->flags5 |= REPLACEPRIVOPS; if(dlg->m_ReplacePrivOps) t->flags5 |= REPLACEPRIVOPS;
if(dlg->m_InitialRes) t->flags7 |= INITIALRES; if(dlg->m_InitialRes) t->flags7 |= INITIALRES;
@ -603,6 +612,11 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
if(t->flags & HIDEHWCURSOR) dlg->m_MouseVisibility = 1; if(t->flags & HIDEHWCURSOR) dlg->m_MouseVisibility = 1;
if(t->flags2 & SHOWHWCURSOR) dlg->m_MouseVisibility = 2; if(t->flags2 & SHOWHWCURSOR) dlg->m_MouseVisibility = 2;
dlg->m_MouseClipper = 0;
if(t->flags & DISABLECLIPPING) dlg->m_MouseClipper = 1;
if(t->flags & CLIPCURSOR) dlg->m_MouseClipper = 2;
if(t->flags8 & CLIPLOCKED) dlg->m_MouseClipper = 3;
dlg->m_OffendingMessages = 0; dlg->m_OffendingMessages = 0;
if(t->flags3 & FILTERMESSAGES) dlg->m_OffendingMessages = 1; if(t->flags3 & FILTERMESSAGES) dlg->m_OffendingMessages = 1;
if(t->flags3 & DEFAULTMESSAGES) dlg->m_OffendingMessages = 2; if(t->flags3 & DEFAULTMESSAGES) dlg->m_OffendingMessages = 2;
@ -689,6 +703,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_DisableDisableAltTab = t->flags7 & DISABLEDISABLEALTTAB ? 1 : 0; dlg->m_DisableDisableAltTab = t->flags7 & DISABLEDISABLEALTTAB ? 1 : 0;
dlg->m_NoImagehlp = t->flags5 & NOIMAGEHLP ? 1 : 0; dlg->m_NoImagehlp = t->flags5 & NOIMAGEHLP ? 1 : 0;
dlg->m_ForcesHEL = t->flags3 & FORCESHEL ? 1 : 0; dlg->m_ForcesHEL = t->flags3 & FORCESHEL ? 1 : 0;
dlg->m_NoHALDevice = t->flags8 & NOHALDEVICE ? 1 : 0;
dlg->m_MinimalCaps = t->flags3 & MINIMALCAPS ? 1 : 0; dlg->m_MinimalCaps = t->flags3 & MINIMALCAPS ? 1 : 0;
dlg->m_SetZBufferBitDepths = t->flags6 & SETZBUFFERBITDEPTHS ? 1 : 0; dlg->m_SetZBufferBitDepths = t->flags6 & SETZBUFFERBITDEPTHS ? 1 : 0;
dlg->m_ForcesSwapEffect = t->flags6 & FORCESWAPEFFECT ? 1 : 0; dlg->m_ForcesSwapEffect = t->flags6 & FORCESWAPEFFECT ? 1 : 0;
@ -741,8 +756,8 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_IndependentRefresh = t->flags2 & INDEPENDENTREFRESH ? 1 : 0; dlg->m_IndependentRefresh = t->flags2 & INDEPENDENTREFRESH ? 1 : 0;
dlg->m_TextureFormat = t->flags5 & TEXTUREFORMAT ? 1 : 0; dlg->m_TextureFormat = t->flags5 & TEXTUREFORMAT ? 1 : 0;
dlg->m_FixWinFrame = t->flags & FIXWINFRAME ? 1 : 0; dlg->m_FixWinFrame = t->flags & FIXWINFRAME ? 1 : 0;
dlg->m_EnableClipping = t->flags & ENABLECLIPPING ? 1 : 0; //dlg->m_EnableClipping = t->flags & DISABLECLIPPING ? 1 : 0;
dlg->m_CursorClipping = t->flags & CLIPCURSOR ? 1 : 0; //dlg->m_CursorClipping = t->flags & CLIPCURSOR ? 1 : 0;
dlg->m_VideoToSystemMem = t->flags & SWITCHVIDEOMEMORY ? 1 : 0; dlg->m_VideoToSystemMem = t->flags & SWITCHVIDEOMEMORY ? 1 : 0;
dlg->m_FixTextOut = t->flags & FIXTEXTOUT ? 1 : 0; dlg->m_FixTextOut = t->flags & FIXTEXTOUT ? 1 : 0;
dlg->m_SharedDC = t->flags6 & SHAREDDC ? 1 : 0; dlg->m_SharedDC = t->flags6 & SHAREDDC ? 1 : 0;
@ -826,6 +841,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_FixClipperArea = t->flags7 & FIXCLIPPERAREA ? 1 : 0; dlg->m_FixClipperArea = t->flags7 & FIXCLIPPERAREA ? 1 : 0;
dlg->m_SyncPalette = t->flags6 & SYNCPALETTE ? 1 : 0; dlg->m_SyncPalette = t->flags6 & SYNCPALETTE ? 1 : 0;
dlg->m_NoWinErrors = t->flags7 & NOWINERRORS ? 1 : 0; dlg->m_NoWinErrors = t->flags7 & NOWINERRORS ? 1 : 0;
dlg->m_PretendVisible = t->flags8 & PRETENDVISIBLE ? 1 : 0;
dlg->m_AnalyticMode = t->flags3 & ANALYTICMODE ? 1 : 0; dlg->m_AnalyticMode = t->flags3 & ANALYTICMODE ? 1 : 0;
dlg->m_ReplacePrivOps = t->flags5 & REPLACEPRIVOPS ? 1 : 0; dlg->m_ReplacePrivOps = t->flags5 & REPLACEPRIVOPS ? 1 : 0;
dlg->m_InitialRes = t->flags7 & INITIALRES ? 1 : 0; dlg->m_InitialRes = t->flags7 & INITIALRES ? 1 : 0;

Binary file not shown.

Binary file not shown.