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

v2_03_15_src

Former-commit-id: c0871612c8d7009c746fbea9ca91e67a1457a7f1
This commit is contained in:
gho tik 2015-03-22 12:40:33 -04:00 committed by Refael ACkermann
parent 41a3507207
commit 8f000f5b5e
19 changed files with 373 additions and 5096 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:864a3a7f784d58281c340c7d1ac1302d110b6d98167c3c4f8a42624e9341b65a oid sha256:e6237930755cc2d17f723f7d6948732a5e75da7fd5dc9b2a8f0f6572774d38f7
size 571904 size 574464

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:07f3136aad64bf4ff6b095c147274f42b9b14063a3760ebb2ab99550717af873 oid sha256:6434855ecb64769aed7706cd7fef0bcab197a29b76710278cfe164933632ffaf
size 538624 size 538624

View File

@ -1,2 +0,0 @@
[window]
exportpath=D:\DxWnd\exports\

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ coord0=0
flag0=134218272 flag0=134218272
flagg0=1207959552 flagg0=1207959552
flagh0=20 flagh0=20
flagi0=134217732 flagi0=138412036
tflag0=0 tflag0=0
initx0=0 initx0=0
inity0=0 inity0=0
@ -25,3 +25,5 @@ maxfps0=0
initts0=0 initts0=0
winver0=0 winver0=0
maxres0=-1 maxres0=-1
notes0=
flagj0=128

View File

@ -0,0 +1,29 @@
[target]
title0=Nascar Pinball
path0=D:\Games\NASCAR Pinball\Pinball.exe
launchpath0=
module0=
opengllib0=
notes0=Some glitches while moving cursor close to borders
ver0=0
coord0=0
flag0=134217762
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=4224
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

View File

@ -0,0 +1,29 @@
[target]
title0=Nuclear Strike (3dfx)
path0=D:\Games\nuclear_strike\NUKEPC.EXE
launchpath0=
module0=
opengllib0=
notes0=Use glide wrapper on D3D9
ver0=9
coord0=0
flag0=134217762
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=4224
tflag0=1073741824
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

View File

@ -0,0 +1,29 @@
[target]
title0=Silent Hunter III
path0=D:\Games\Ubisoft\SilentHunterIII\SH3.EXE
launchpath0=
module0=
opengllib0=
notes0=
ver0=0
coord0=0
flag0=679493666
flagg0=1757413392
flagh0=33554452
flagi0=673185796
flagj0=4224
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=3
maxres0=3

View File

@ -0,0 +1,29 @@
[target]
title0=Zero Critical
path0=D:\Games\zero_critical_-_satin_rift\ZEROCR.EXE
launchpath0=
module0=
opengllib0=
notes0=
ver0=0
coord0=0
flag0=671088674
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=4224
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

View File

@ -763,4 +763,11 @@ fix: several log improvements
v2.03.14 v2.03.14
add: window commands Minimize, Restore & Close add: window commands Minimize, Restore & Close
add: made palette behaviour configurable (until better understood...) add: made palette behaviour configurable (until better understood...)
add: "updatepaths" tag in dxwnd.ini add: "updatepaths" tag in dxwnd.ini
v2.03.15
fix: keep aspect ratio calculations
fix: d3d Present method, to properly scale to window size (fixes "Silent Hunter III" rendering)
fix: GetMonitorInfo hooker: in windowed mode the call may fail, a virtual size and ok retcode should be returned
fix: Blt method recovering errors when D3D CreateAdditionalSwapChain method fails: allow to see the intro movies of "Silent Hunter III".
fix: added some missing D3D errorcode labels in log file

View File

@ -253,16 +253,19 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
it seems that you can't blit from compressed or different surfaces in memory, it seems that you can't blit from compressed or different surfaces in memory,
while the operation COULD be supported to video. As a mater of fact, it DOES while the operation COULD be supported to video. As a mater of fact, it DOES
work on my PC. The error code is DDERR_UNSUPPORTED. work on my PC. The error code is DDERR_UNSUPPORTED.
v2.02.98 update.... v2.02.98: The same thing happens with "New York Racer", but with DDERR_EXCEPTION error code.
The same thing happens with New York Racer, but with DDERR_EXCEPTION error code. V2.03.15: The same thing happens with "Silent Hunter III", but with DDERR_INVALIDRECT error code.
*/ */
if((res==DDERR_UNSUPPORTED) || (res==DDERR_EXCEPTION)){ if((res==DDERR_UNSUPPORTED) || (res==DDERR_EXCEPTION) || (res==DDERR_INVALIDRECT)){
RECT targetrect;
dxw.ShowOverlay(lpddssrc); dxw.ShowOverlay(lpddssrc);
if (IsDebug) BlitTrace("UNSUPP", &emurect, &destrect, __LINE__); if (IsDebug) BlitTrace("UNSUPP", &emurect, &destrect, __LINE__);
res=(*pBlt)(lpDDSEmu_Prim, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); targetrect=destrect;
dxw.MapWindowRect(&targetrect); // v2.03.15
res=(*pBlt)(lpDDSEmu_Prim, &targetrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx);
if (res) BlitError(res, lpsrcrect, &destrect, __LINE__); if (res) BlitError(res, lpsrcrect, &destrect, __LINE__);
} }
// Try to handle HDC lock concurrency.... // Try to handle HDC lock concurrency....
if(res==DDERR_SURFACEBUSY){ if(res==DDERR_SURFACEBUSY){
res=(*pUnlockMethod(lpddssrc))(lpddssrc, NULL); res=(*pUnlockMethod(lpddssrc))(lpddssrc, NULL);

View File

@ -659,127 +659,6 @@ char *ExplainFlipStatus(DWORD c)
return(eb); return(eb);
} }
char *ExplainDDError(DWORD c)
{
static char *eb;
switch(c)
{
case DD_OK: eb="DD_OK"; break;
case DDERR_ALREADYINITIALIZED: eb="DDERR_ALREADYINITIALIZED"; break;
case DDERR_BLTFASTCANTCLIP: eb="DDERR_BLTFASTCANTCLIP"; break;
case DDERR_CANNOTATTACHSURFACE: eb="DDERR_CANNOTATTACHSURFACE"; break;
case DDERR_CANNOTDETACHSURFACE: eb="DDERR_CANNOTDETACHSURFACE"; break;
case DDERR_CANTCREATEDC: eb="DDERR_CANTCREATEDC"; break;
case DDERR_CANTDUPLICATE: eb="DDERR_CANTDUPLICATE"; break;
case DDERR_CANTLOCKSURFACE: eb="DDERR_CANTLOCKSURFACE"; break;
case DDERR_CANTPAGELOCK: eb="DDERR_CANTPAGELOCK"; break;
case DDERR_CANTPAGEUNLOCK: eb="DDERR_CANTPAGEUNLOCK"; break;
case DDERR_CLIPPERISUSINGHWND: eb="DDERR_CLIPPERISUSINGHWND"; break;
case DDERR_COLORKEYNOTSET: eb="DDERR_COLORKEYNOTSET"; break;
case DDERR_CURRENTLYNOTAVAIL: eb="DDERR_CURRENTLYNOTAVAIL"; break;
case DDERR_DCALREADYCREATED: eb="DDERR_DCALREADYCREATED"; break;
case DDERR_DEVICEDOESNTOWNSURFACE: eb="DDERR_DEVICEDOESNTOWNSURFACE"; break;
case DDERR_DIRECTDRAWALREADYCREATED: eb="DDERR_DIRECTDRAWALREADYCREATED"; break;
case DDERR_EXCEPTION: eb="DDERR_EXCEPTION"; break;
case DDERR_EXCLUSIVEMODEALREADYSET: eb="DDERR_EXCLUSIVEMODEALREADYSET"; break;
case DDERR_EXPIRED: eb="DDERR_EXPIRED"; break;
case DDERR_GENERIC: eb="DDERR_GENERIC"; break;
case DDERR_HEIGHTALIGN: eb="DDERR_HEIGHTALIGN"; break;
case DDERR_HWNDALREADYSET: eb="DDERR_HWNDALREADYSET"; break;
case DDERR_HWNDSUBCLASSED: eb="DDERR_HWNDSUBCLASSED"; break;
case DDERR_IMPLICITLYCREATED: eb="DDERR_IMPLICITLYCREATED"; break;
case DDERR_INCOMPATIBLEPRIMARY: eb="DDERR_INCOMPATIBLEPRIMARY"; break;
case DDERR_INVALIDCAPS: eb="DDERR_INVALIDCAPS"; break;
case DDERR_INVALIDCLIPLIST: eb="DDERR_INVALIDCLIPLIST"; break;
case DDERR_INVALIDDIRECTDRAWGUID: eb="DDERR_INVALIDDIRECTDRAWGUID"; break;
case DDERR_INVALIDMODE: eb="DDERR_INVALIDMODE"; break;
case DDERR_INVALIDOBJECT: eb="DDERR_INVALIDOBJECT"; break;
case DDERR_INVALIDPARAMS: eb="DDERR_INVALIDPARAMS"; break;
case DDERR_INVALIDPIXELFORMAT: eb="DDERR_INVALIDPIXELFORMAT"; break;
case DDERR_INVALIDPOSITION: eb="DDERR_INVALIDPOSITION"; break;
case DDERR_INVALIDRECT: eb="DDERR_INVALIDRECT"; break;
case DDERR_INVALIDSTREAM: eb="DDERR_INVALIDSTREAM"; break;
case DDERR_INVALIDSURFACETYPE: eb="DDERR_INVALIDSURFACETYPE"; break;
case DDERR_LOCKEDSURFACES: eb="DDERR_LOCKEDSURFACES"; break;
case DDERR_MOREDATA: eb="DDERR_MOREDATA"; break;
case DDERR_NO3D: eb="DDERR_NO3D"; break;
case DDERR_NOALPHAHW: eb="DDERR_NOALPHAHW"; break;
case DDERR_NOBLTHW: eb="DDERR_NOBLTHW"; break;
case DDERR_NOCLIPLIST: eb="DDERR_NOCLIPLIST"; break;
case DDERR_NOCLIPPERATTACHED: eb="DDERR_NOCLIPPERATTACHED"; break;
case DDERR_NOCOLORCONVHW: eb="DDERR_NOCOLORCONVHW"; break;
case DDERR_NOCOLORKEY: eb="DDERR_NOCOLORKEY"; break;
case DDERR_NOCOLORKEYHW: eb="DDERR_NOCOLORKEYHW"; break;
case DDERR_NOCOOPERATIVELEVELSET: eb="DDERR_NOCOOPERATIVELEVELSET"; break;
case DDERR_NODC: eb="DDERR_NODC"; break;
case DDERR_NODDROPSHW: eb="DDERR_NODDROPSHW"; break;
case DDERR_NODIRECTDRAWHW: eb="DDERR_NODIRECTDRAWHW"; break;
case DDERR_NODIRECTDRAWSUPPORT: eb="DDERR_NODIRECTDRAWSUPPORT"; break;
case DDERR_NOEMULATION: eb="DDERR_NOEMULATION"; break;
case DDERR_NOEXCLUSIVEMODE: eb="DDERR_NOEXCLUSIVEMODE"; break;
case DDERR_NOFLIPHW: eb="DDERR_NOFLIPHW"; break;
case DDERR_NOFOCUSWINDOW: eb="DDERR_NOFOCUSWINDOW"; break;
case DDERR_NOGDI: eb="DDERR_NOGDI"; break;
case DDERR_NOHWND: eb="DDERR_NOHWND"; break;
case DDERR_NOMIPMAPHW: eb="DDERR_NOMIPMAPHW"; break;
case DDERR_NOMIRRORHW: eb="DDERR_NOMIRRORHW"; break;
case DDERR_NONONLOCALVIDMEM: eb="DDERR_NONONLOCALVIDMEM"; break;
case DDERR_NOOPTIMIZEHW: eb="DDERR_NOOPTIMIZEHW"; break;
case DDERR_NOOVERLAYDEST: eb="DDERR_NOOVERLAYDEST"; break;
case DDERR_NOOVERLAYHW: eb="DDERR_NOOVERLAYHW"; break;
case DDERR_NOPALETTEATTACHED: eb="DDERR_NOPALETTEATTACHED"; break;
case DDERR_NOPALETTEHW: eb="DDERR_NOPALETTEHW"; break;
case DDERR_NORASTEROPHW: eb="DDERR_NORASTEROPHW"; break;
case DDERR_NOROTATIONHW: eb="DDERR_NOROTATIONHW"; break;
case DDERR_NOSTRETCHHW: eb="DDERR_NOSTRETCHHW"; break;
case DDERR_NOT4BITCOLOR: eb="DDERR_NOT4BITCOLOR"; break;
case DDERR_NOT4BITCOLORINDEX: eb="DDERR_NOT4BITCOLORINDEX"; break;
case DDERR_NOT8BITCOLOR: eb="DDERR_NOT8BITCOLOR"; break;
case DDERR_NOTAOVERLAYSURFACE: eb="DDERR_NOTAOVERLAYSURFACE"; break;
case DDERR_NOTEXTUREHW: eb="DDERR_NOTEXTUREHW"; break;
case DDERR_NOTFLIPPABLE: eb="DDERR_NOTFLIPPABLE"; break;
case DDERR_NOTFOUND: eb="DDERR_NOTFOUND"; break;
case DDERR_NOTINITIALIZED: eb="DDERR_NOTINITIALIZED"; break;
case DDERR_NOTLOADED: eb="DDERR_NOTLOADED"; break;
case DDERR_NOTLOCKED: eb="DDERR_NOTLOCKED"; break;
case DDERR_NOTPAGELOCKED: eb="DDERR_NOTPAGELOCKED"; break;
case DDERR_NOTPALETTIZED: eb="DDERR_NOTPALETTIZED"; break;
case DDERR_NOVSYNCHW: eb="DDERR_NOVSYNCHW"; break;
case DDERR_NOZBUFFERHW: eb="DDERR_NOZBUFFERHW"; break;
case DDERR_NOZOVERLAYHW: eb="DDERR_NOZOVERLAYHW"; break;
case DDERR_OUTOFCAPS: eb="DDERR_OUTOFCAPS"; break;
case DDERR_OUTOFMEMORY: eb="DDERR_OUTOFMEMORY"; break;
case DDERR_OUTOFVIDEOMEMORY: eb="DDERR_OUTOFVIDEOMEMORY"; break;
case DDERR_OVERLAPPINGRECTS: eb="DDERR_OVERLAPPINGRECTS"; break;
case DDERR_OVERLAYCANTCLIP: eb="DDERR_OVERLAYCANTCLIP"; break;
case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:eb="DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; break;
case DDERR_OVERLAYNOTVISIBLE: eb="DDERR_OVERLAYNOTVISIBLE"; break;
case DDERR_PALETTEBUSY: eb="DDERR_PALETTEBUSY"; break;
case DDERR_PRIMARYSURFACEALREADYEXISTS: eb="DDERR_PRIMARYSURFACEALREADYEXISTS"; break;
case DDERR_REGIONTOOSMALL: eb="DDERR_REGIONTOOSMALL"; break;
case DDERR_SURFACEALREADYATTACHED: eb="DDERR_SURFACEALREADYATTACHED"; break;
case DDERR_SURFACEALREADYDEPENDENT: eb="DDERR_SURFACEALREADYDEPENDENT"; break;
case DDERR_SURFACEBUSY: eb="DDERR_SURFACEBUSY"; break;
case DDERR_SURFACEISOBSCURED: eb="DDERR_SURFACEISOBSCURED"; break;
case DDERR_SURFACELOST: eb="DDERR_SURFACELOST"; break;
case DDERR_SURFACENOTATTACHED: eb="DDERR_SURFACENOTATTACHED"; break;
case DDERR_TOOBIGHEIGHT: eb="DDERR_TOOBIGHEIGHT"; break;
case DDERR_TOOBIGSIZE: eb="DDERR_TOOBIGSIZE"; break;
case DDERR_TOOBIGWIDTH: eb="DDERR_TOOBIGWIDTH"; break;
case DDERR_UNSUPPORTED: eb="DDERR_UNSUPPORTED"; break;
case DDERR_UNSUPPORTEDFORMAT: eb="DDERR_UNSUPPORTEDFORMAT"; break;
case DDERR_UNSUPPORTEDMASK: eb="DDERR_UNSUPPORTEDMASK"; break;
case DDERR_UNSUPPORTEDMODE: eb="DDERR_UNSUPPORTEDMODE"; break;
case DDERR_VERTICALBLANKINPROGRESS: eb="DDERR_VERTICALBLANKINPROGRESS"; break;
case DDERR_VIDEONOTACTIVE: eb="DDERR_VIDEONOTACTIVE"; break;
case DDERR_WASSTILLDRAWING: eb="DDERR_WASSTILLDRAWING"; break;
case DDERR_WRONGMODE: eb="DDERR_WRONGMODE"; break;
case DDERR_XALIGN: eb="DDERR_XALIGN"; break;
default: eb="unknown"; break;
}
return eb;
}
char *ExplainWinMessage(DWORD c) char *ExplainWinMessage(DWORD c)
{ {
static char *eb; static char *eb;
@ -1741,3 +1620,185 @@ char *ExplainRegionType(DWORD c)
if(c<4) return sRetCodes[c]; if(c<4) return sRetCodes[c];
return "unknown"; return "unknown";
} }
#define _FACD3D 0x876
#define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
#define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code )
#define D3DERR_DRIVERINTERNALERROR MAKE_D3DHRESULT(2087)
#define D3DERR_NOTFOUND MAKE_D3DHRESULT(2150)
#define D3DERR_MOREDATA MAKE_D3DHRESULT(2151)
#define D3DERR_DEVICELOST MAKE_D3DHRESULT(2152)
#define D3DERR_DEVICENOTRESET MAKE_D3DHRESULT(2153)
#define D3DERR_NOTAVAILABLE MAKE_D3DHRESULT(2154)
#define D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380)
#define D3DERR_INVALIDDEVICE MAKE_D3DHRESULT(2155)
#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
#define D3DERR_DRIVERINVALIDCALL MAKE_D3DHRESULT(2157)
#define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
#define D3DOK_NOAUTOGEN MAKE_D3DSTATUS(2159)
#define D3DERR_DEVICEREMOVED MAKE_D3DHRESULT(2160)
#define S_NOT_RESIDENT MAKE_D3DSTATUS(2165)
#define S_RESIDENT_IN_SHARED_MEMORY MAKE_D3DSTATUS(2166)
#define S_PRESENT_MODE_CHANGED MAKE_D3DSTATUS(2167)
#define S_PRESENT_OCCLUDED MAKE_D3DSTATUS(2168)
#define D3DERR_DEVICEHUNG MAKE_D3DHRESULT(2164)
#define D3DERR_UNSUPPORTEDOVERLAY MAKE_D3DHRESULT(2171)
#define D3DERR_UNSUPPORTEDOVERLAYFORMAT MAKE_D3DHRESULT(2172)
#define D3DERR_CANNOTPROTECTCONTENT MAKE_D3DHRESULT(2173)
#define D3DERR_UNSUPPORTEDCRYPTO MAKE_D3DHRESULT(2174)
#define D3DERR_PRESENT_STATISTICS_DISJOINT MAKE_D3DHRESULT(2180)
char *ExplainDDError(DWORD c)
{
static char *eb;
switch(c)
{
case DD_OK: eb="DD_OK"; break;
case DDERR_ALREADYINITIALIZED: eb="DDERR_ALREADYINITIALIZED"; break;
case DDERR_BLTFASTCANTCLIP: eb="DDERR_BLTFASTCANTCLIP"; break;
case DDERR_CANNOTATTACHSURFACE: eb="DDERR_CANNOTATTACHSURFACE"; break;
case DDERR_CANNOTDETACHSURFACE: eb="DDERR_CANNOTDETACHSURFACE"; break;
case DDERR_CANTCREATEDC: eb="DDERR_CANTCREATEDC"; break;
case DDERR_CANTDUPLICATE: eb="DDERR_CANTDUPLICATE"; break;
case DDERR_CANTLOCKSURFACE: eb="DDERR_CANTLOCKSURFACE"; break;
case DDERR_CANTPAGELOCK: eb="DDERR_CANTPAGELOCK"; break;
case DDERR_CANTPAGEUNLOCK: eb="DDERR_CANTPAGEUNLOCK"; break;
case DDERR_CLIPPERISUSINGHWND: eb="DDERR_CLIPPERISUSINGHWND"; break;
case DDERR_COLORKEYNOTSET: eb="DDERR_COLORKEYNOTSET"; break;
case DDERR_CURRENTLYNOTAVAIL: eb="DDERR_CURRENTLYNOTAVAIL"; break;
case DDERR_DCALREADYCREATED: eb="DDERR_DCALREADYCREATED"; break;
case DDERR_DEVICEDOESNTOWNSURFACE: eb="DDERR_DEVICEDOESNTOWNSURFACE"; break;
case DDERR_DIRECTDRAWALREADYCREATED: eb="DDERR_DIRECTDRAWALREADYCREATED"; break;
case DDERR_EXCEPTION: eb="DDERR_EXCEPTION"; break;
case DDERR_EXCLUSIVEMODEALREADYSET: eb="DDERR_EXCLUSIVEMODEALREADYSET"; break;
case DDERR_EXPIRED: eb="DDERR_EXPIRED"; break;
case DDERR_GENERIC: eb="DDERR_GENERIC"; break;
case DDERR_HEIGHTALIGN: eb="DDERR_HEIGHTALIGN"; break;
case DDERR_HWNDALREADYSET: eb="DDERR_HWNDALREADYSET"; break;
case DDERR_HWNDSUBCLASSED: eb="DDERR_HWNDSUBCLASSED"; break;
case DDERR_IMPLICITLYCREATED: eb="DDERR_IMPLICITLYCREATED"; break;
case DDERR_INCOMPATIBLEPRIMARY: eb="DDERR_INCOMPATIBLEPRIMARY"; break;
case DDERR_INVALIDCAPS: eb="DDERR_INVALIDCAPS"; break;
case DDERR_INVALIDCLIPLIST: eb="DDERR_INVALIDCLIPLIST"; break;
case DDERR_INVALIDDIRECTDRAWGUID: eb="DDERR_INVALIDDIRECTDRAWGUID"; break;
case DDERR_INVALIDMODE: eb="DDERR_INVALIDMODE"; break;
case DDERR_INVALIDOBJECT: eb="DDERR_INVALIDOBJECT"; break;
case DDERR_INVALIDPARAMS: eb="DDERR_INVALIDPARAMS"; break;
case DDERR_INVALIDPIXELFORMAT: eb="DDERR_INVALIDPIXELFORMAT"; break;
case DDERR_INVALIDPOSITION: eb="DDERR_INVALIDPOSITION"; break;
case DDERR_INVALIDRECT: eb="DDERR_INVALIDRECT"; break;
case DDERR_INVALIDSTREAM: eb="DDERR_INVALIDSTREAM"; break;
case DDERR_INVALIDSURFACETYPE: eb="DDERR_INVALIDSURFACETYPE"; break;
case DDERR_LOCKEDSURFACES: eb="DDERR_LOCKEDSURFACES"; break;
case DDERR_MOREDATA: eb="DDERR_MOREDATA"; break;
case DDERR_NO3D: eb="DDERR_NO3D"; break;
case DDERR_NOALPHAHW: eb="DDERR_NOALPHAHW"; break;
case DDERR_NOBLTHW: eb="DDERR_NOBLTHW"; break;
case DDERR_NOCLIPLIST: eb="DDERR_NOCLIPLIST"; break;
case DDERR_NOCLIPPERATTACHED: eb="DDERR_NOCLIPPERATTACHED"; break;
case DDERR_NOCOLORCONVHW: eb="DDERR_NOCOLORCONVHW"; break;
case DDERR_NOCOLORKEY: eb="DDERR_NOCOLORKEY"; break;
case DDERR_NOCOLORKEYHW: eb="DDERR_NOCOLORKEYHW"; break;
case DDERR_NOCOOPERATIVELEVELSET: eb="DDERR_NOCOOPERATIVELEVELSET"; break;
case DDERR_NODC: eb="DDERR_NODC"; break;
case DDERR_NODDROPSHW: eb="DDERR_NODDROPSHW"; break;
case DDERR_NODIRECTDRAWHW: eb="DDERR_NODIRECTDRAWHW"; break;
case DDERR_NODIRECTDRAWSUPPORT: eb="DDERR_NODIRECTDRAWSUPPORT"; break;
case DDERR_NOEMULATION: eb="DDERR_NOEMULATION"; break;
case DDERR_NOEXCLUSIVEMODE: eb="DDERR_NOEXCLUSIVEMODE"; break;
case DDERR_NOFLIPHW: eb="DDERR_NOFLIPHW"; break;
case DDERR_NOFOCUSWINDOW: eb="DDERR_NOFOCUSWINDOW"; break;
case DDERR_NOGDI: eb="DDERR_NOGDI"; break;
case DDERR_NOHWND: eb="DDERR_NOHWND"; break;
case DDERR_NOMIPMAPHW: eb="DDERR_NOMIPMAPHW"; break;
case DDERR_NOMIRRORHW: eb="DDERR_NOMIRRORHW"; break;
case DDERR_NONONLOCALVIDMEM: eb="DDERR_NONONLOCALVIDMEM"; break;
case DDERR_NOOPTIMIZEHW: eb="DDERR_NOOPTIMIZEHW"; break;
case DDERR_NOOVERLAYDEST: eb="DDERR_NOOVERLAYDEST"; break;
case DDERR_NOOVERLAYHW: eb="DDERR_NOOVERLAYHW"; break;
case DDERR_NOPALETTEATTACHED: eb="DDERR_NOPALETTEATTACHED"; break;
case DDERR_NOPALETTEHW: eb="DDERR_NOPALETTEHW"; break;
case DDERR_NORASTEROPHW: eb="DDERR_NORASTEROPHW"; break;
case DDERR_NOROTATIONHW: eb="DDERR_NOROTATIONHW"; break;
case DDERR_NOSTRETCHHW: eb="DDERR_NOSTRETCHHW"; break;
case DDERR_NOT4BITCOLOR: eb="DDERR_NOT4BITCOLOR"; break;
case DDERR_NOT4BITCOLORINDEX: eb="DDERR_NOT4BITCOLORINDEX"; break;
case DDERR_NOT8BITCOLOR: eb="DDERR_NOT8BITCOLOR"; break;
case DDERR_NOTAOVERLAYSURFACE: eb="DDERR_NOTAOVERLAYSURFACE"; break;
case DDERR_NOTEXTUREHW: eb="DDERR_NOTEXTUREHW"; break;
case DDERR_NOTFLIPPABLE: eb="DDERR_NOTFLIPPABLE"; break;
case DDERR_NOTFOUND: eb="DDERR_NOTFOUND"; break;
case DDERR_NOTINITIALIZED: eb="DDERR_NOTINITIALIZED"; break;
case DDERR_NOTLOADED: eb="DDERR_NOTLOADED"; break;
case DDERR_NOTLOCKED: eb="DDERR_NOTLOCKED"; break;
case DDERR_NOTPAGELOCKED: eb="DDERR_NOTPAGELOCKED"; break;
case DDERR_NOTPALETTIZED: eb="DDERR_NOTPALETTIZED"; break;
case DDERR_NOVSYNCHW: eb="DDERR_NOVSYNCHW"; break;
case DDERR_NOZBUFFERHW: eb="DDERR_NOZBUFFERHW"; break;
case DDERR_NOZOVERLAYHW: eb="DDERR_NOZOVERLAYHW"; break;
case DDERR_OUTOFCAPS: eb="DDERR_OUTOFCAPS"; break;
case DDERR_OUTOFMEMORY: eb="DDERR_OUTOFMEMORY"; break;
case DDERR_OUTOFVIDEOMEMORY: eb="DDERR_OUTOFVIDEOMEMORY"; break;
case DDERR_OVERLAPPINGRECTS: eb="DDERR_OVERLAPPINGRECTS"; break;
case DDERR_OVERLAYCANTCLIP: eb="DDERR_OVERLAYCANTCLIP"; break;
case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:eb="DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; break;
case DDERR_OVERLAYNOTVISIBLE: eb="DDERR_OVERLAYNOTVISIBLE"; break;
case DDERR_PALETTEBUSY: eb="DDERR_PALETTEBUSY"; break;
case DDERR_PRIMARYSURFACEALREADYEXISTS: eb="DDERR_PRIMARYSURFACEALREADYEXISTS"; break;
case DDERR_REGIONTOOSMALL: eb="DDERR_REGIONTOOSMALL"; break;
case DDERR_SURFACEALREADYATTACHED: eb="DDERR_SURFACEALREADYATTACHED"; break;
case DDERR_SURFACEALREADYDEPENDENT: eb="DDERR_SURFACEALREADYDEPENDENT"; break;
case DDERR_SURFACEBUSY: eb="DDERR_SURFACEBUSY"; break;
case DDERR_SURFACEISOBSCURED: eb="DDERR_SURFACEISOBSCURED"; break;
case DDERR_SURFACELOST: eb="DDERR_SURFACELOST"; break;
case DDERR_SURFACENOTATTACHED: eb="DDERR_SURFACENOTATTACHED"; break;
case DDERR_TOOBIGHEIGHT: eb="DDERR_TOOBIGHEIGHT"; break;
case DDERR_TOOBIGSIZE: eb="DDERR_TOOBIGSIZE"; break;
case DDERR_TOOBIGWIDTH: eb="DDERR_TOOBIGWIDTH"; break;
case DDERR_UNSUPPORTED: eb="DDERR_UNSUPPORTED"; break;
case DDERR_UNSUPPORTEDFORMAT: eb="DDERR_UNSUPPORTEDFORMAT"; break;
case DDERR_UNSUPPORTEDMASK: eb="DDERR_UNSUPPORTEDMASK"; break;
case DDERR_UNSUPPORTEDMODE: eb="DDERR_UNSUPPORTEDMODE"; break;
case DDERR_VERTICALBLANKINPROGRESS: eb="DDERR_VERTICALBLANKINPROGRESS"; break;
case DDERR_VIDEONOTACTIVE: eb="DDERR_VIDEONOTACTIVE"; break;
case DDERR_WASSTILLDRAWING: eb="DDERR_WASSTILLDRAWING"; break;
case DDERR_WRONGMODE: eb="DDERR_WRONGMODE"; break;
case DDERR_XALIGN: eb="DDERR_XALIGN"; break;
// D3D errors
case D3DERR_WRONGTEXTUREFORMAT: eb="D3DERR_WRONGTEXTUREFORMAT"; break;
case D3DERR_UNSUPPORTEDCOLOROPERATION: eb="D3DERR_UNSUPPORTEDCOLOROPERATION"; break;
case D3DERR_UNSUPPORTEDCOLORARG: eb="D3DERR_UNSUPPORTEDCOLORARG"; break;
case D3DERR_UNSUPPORTEDALPHAOPERATION: eb="D3DERR_UNSUPPORTEDALPHAOPERATION"; break;
case D3DERR_UNSUPPORTEDALPHAARG: eb="D3DERR_UNSUPPORTEDALPHAARG"; break;
case D3DERR_TOOMANYOPERATIONS: eb="D3DERR_TOOMANYOPERATIONS"; break;
case D3DERR_CONFLICTINGTEXTUREFILTER: eb="D3DERR_CONFLICTINGTEXTUREFILTER"; break;
case D3DERR_UNSUPPORTEDFACTORVALUE: eb="D3DERR_UNSUPPORTEDFACTORVALUE"; break;
case D3DERR_CONFLICTINGRENDERSTATE: eb="D3DERR_CONFLICTINGRENDERSTATE"; break;
case D3DERR_UNSUPPORTEDTEXTUREFILTER: eb="D3DERR_UNSUPPORTEDTEXTUREFILTER"; break;
case D3DERR_CONFLICTINGTEXTUREPALETTE: eb="D3DERR_CONFLICTINGTEXTUREPALETTE"; break;
case D3DERR_DRIVERINTERNALERROR: eb="D3DERR_DRIVERINTERNALERROR"; break;
case D3DERR_NOTFOUND: eb="D3DERR_NOTFOUND"; break;
case D3DERR_MOREDATA: eb="D3DERR_MOREDATA"; break;
case D3DERR_DEVICELOST: eb="D3DERR_DEVICELOST"; break;
case D3DERR_DEVICENOTRESET: eb="D3DERR_DEVICENOTRESET"; break;
case D3DERR_NOTAVAILABLE: eb="D3DERR_NOTAVAILABLE"; break;
//case D3DERR_OUTOFVIDEOMEMORY: eb="D3DERR_OUTOFVIDEOMEMORY"; break;
case D3DERR_INVALIDDEVICE: eb="D3DERR_INVALIDDEVICE"; break;
case D3DERR_INVALIDCALL: eb="D3DERR_INVALIDCALL"; break;
case D3DERR_DRIVERINVALIDCALL: eb="D3DERR_DRIVERINVALIDCALL"; break;
//case D3DERR_WASSTILLDRAWING: eb="D3DERR_WASSTILLDRAWING"; break;
case D3DOK_NOAUTOGEN: eb="D3DOK_NOAUTOGEN"; break;
case D3DERR_DEVICEREMOVED: eb="D3DERR_DEVICEREMOVED"; break;
case D3DERR_DEVICEHUNG: eb="D3DERR_DEVICEHUNG"; break;
case D3DERR_UNSUPPORTEDOVERLAY: eb="D3DERR_UNSUPPORTEDOVERLAY"; break;
case D3DERR_UNSUPPORTEDOVERLAYFORMAT: eb="D3DERR_UNSUPPORTEDOVERLAYFORMAT"; break;
case D3DERR_CANNOTPROTECTCONTENT: eb="D3DERR_CANNOTPROTECTCONTENT"; break;
case D3DERR_UNSUPPORTEDCRYPTO: eb="D3DERR_UNSUPPORTEDCRYPTO"; break;
case D3DERR_PRESENT_STATISTICS_DISJOINT:eb="D3DERR_PRESENT_STATISTICS_DISJOINT"; break;
default: eb="unknown"; break;
}
return eb;
}

View File

@ -722,10 +722,11 @@ RECT dxwCore::MapClientRect(LPRECT lpRect)
LONG Width, Height; LONG Width, Height;
Width = ClientRect.right - (2*bx); Width = ClientRect.right - (2*bx);
Height = ClientRect.bottom - (2*by); Height = ClientRect.bottom - (2*by);
// v2.03.15 - fixed right & bottom values
RetRect.left = bx + (lpRect->left * Width / dwScreenWidth); RetRect.left = bx + (lpRect->left * Width / dwScreenWidth);
RetRect.right = (lpRect->right * Width / dwScreenWidth); RetRect.right = RetRect.left + Width;
RetRect.top = by + (lpRect->top * Height / dwScreenHeight); RetRect.top = by + (lpRect->top * Height / dwScreenHeight);
RetRect.bottom = (lpRect->bottom * Height / dwScreenHeight); RetRect.bottom = RetRect.top + Height;
} }
else{ else{
RetRect.left = ClientRect.left + bx; RetRect.left = ClientRect.left + bx;

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.14" #define VERSION "2.03.15"
#define DDTHREADLOCK 1 #define DDTHREADLOCK 1
//#define LOCKTHREADS //#define LOCKTHREADS

Binary file not shown.

View File

@ -1,4 +1,6 @@
//#define D3D10_IGNORE_SDK_LAYERS 1 //#define D3D10_IGNORE_SDK_LAYERS 1
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h> #include <windows.h>
#include <d3d9.h> #include <d3d9.h>
#include <D3D10_1.h> #include <D3D10_1.h>
@ -802,12 +804,23 @@ HRESULT WINAPI extReset(void *pd3dd, D3DPRESENT_PARAMETERS* pPresParam)
HRESULT WINAPI extPresent(void *pd3dd, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion) HRESULT WINAPI extPresent(void *pd3dd, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{ {
HRESULT res; HRESULT res;
OutTraceB("Present\n"); RECT RemappedRect;
if(IsDebug){
char sSourceRect[81];
char sDestRect[81];
if (pSourceRect) sprintf_s(sSourceRect, 80, "(%d,%d)-(%d,%d)", pSourceRect->left, pSourceRect->top, pSourceRect->right, pSourceRect->bottom);
else strcpy(sSourceRect, "(NULL)");
if (pDestRect) sprintf_s(sDestRect, 80, "(%d,%d)-(%d,%d)", pDestRect->left, pDestRect->top, pDestRect->right, pDestRect->bottom);
else strcpy(sDestRect, "(NULL)");
OutTraceB("Present: SourceRect=%s DestRect=%s hDestWndOverride=%x\n", sSourceRect, sDestRect, hDestWindowOverride);
}
// frame counter handling.... // frame counter handling....
if (dxw.HandleFPS()) return D3D_OK; if (dxw.HandleFPS()) return D3D_OK;
if (dxw.dwFlags1 & SAVELOAD) dxw.VSyncWait(); if (dxw.dwFlags1 & SAVELOAD) dxw.VSyncWait();
// proxy .... // v2.03.15 - fix target RECT region
res=(*pPresent)(pd3dd, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); if(dxw.dwFlags2 & FULLRECTBLT) pSourceRect = pDestRect = NULL;
RemappedRect=dxw.MapClientRect((LPRECT)pDestRect);
res=(*pPresent)(pd3dd, pSourceRect, &RemappedRect, hDestWindowOverride, pDirtyRegion);
dxw.ShowOverlay(); dxw.ShowOverlay();
return res; return res;
} }
@ -1194,7 +1207,7 @@ HRESULT WINAPI extSetViewport(void *pd3dd, D3DVIEWPORT9 *pViewport)
HRESULT WINAPI extCreateAdditionalSwapChain(void *lpd3dd, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DSwapChain9 **ppSwapChain) HRESULT WINAPI extCreateAdditionalSwapChain(void *lpd3dd, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DSwapChain9 **ppSwapChain)
{ {
HRESULT res; HRESULT res, res2;
DWORD param[64], *tmp; DWORD param[64], *tmp;
D3DDISPLAYMODE mode; D3DDISPLAYMODE mode;
@ -1224,12 +1237,16 @@ HRESULT WINAPI extCreateAdditionalSwapChain(void *lpd3dd, D3DPRESENT_PARAMETERS
} }
if (dwD3DVersion == 9) if (dwD3DVersion == 9)
(*pGetAdapterDisplayMode9)(lpd3dd, 0, &mode); res2=(*pGetAdapterDisplayMode9)(lpd3dd, D3DADAPTER_DEFAULT, &mode);
else else
(*pGetAdapterDisplayMode8)(lpd3dd, 0, &mode); res2=(*pGetAdapterDisplayMode8)(lpd3dd, D3DADAPTER_DEFAULT, &mode);
if(res2==DD_OK){
OutTraceD3D(" Current Format = 0x%x\n", mode.Format); OutTraceD3D(" Current Format = 0x%x\n", mode.Format);
OutTraceD3D(" Current ScreenSize = (%dx%d)\n", mode.Width, mode.Height); OutTraceD3D(" Current ScreenSize = (%dx%d)\n", mode.Width, mode.Height);
OutTraceD3D(" Current Refresh Rate = %d\n", mode.RefreshRate); OutTraceD3D(" Current Refresh Rate = %d\n", mode.RefreshRate);
}
else
OutTraceE("CreateAdditionalSwapChain: GetAdapterDisplayMode err=%x(%s)\n", res2, ExplainDDError(res2));
if(dxw.Windowize){ if(dxw.Windowize){
if(dwD3DVersion == 9){ if(dwD3DVersion == 9){
@ -1247,8 +1264,14 @@ HRESULT WINAPI extCreateAdditionalSwapChain(void *lpd3dd, D3DPRESENT_PARAMETERS
param[12] = D3DPRESENT_INTERVAL_DEFAULT; //PresentationInterval param[12] = D3DPRESENT_INTERVAL_DEFAULT; //PresentationInterval
} }
} }
if(res2 == D3DERR_DEVICELOST){
res2 = (*pReset)(lpd3dd, (D3DPRESENT_PARAMETERS *)param);
if(res2 != DD_OK) OutTraceE("CreateAdditionalSwapChain: Reset err=%x(%s)\n", res2, ExplainDDError(res2));
}
res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain); res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain);
if(res){ if(res && (res2==DD_OK)){
OutTraceD3D("switching to mode=%x\n", mode.Format); OutTraceD3D("switching to mode=%x\n", mode.Format);
param[2] = mode.Format; // first attempt: current screen mode param[2] = mode.Format; // first attempt: current screen mode
res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain); res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain);
@ -1258,8 +1281,13 @@ HRESULT WINAPI extCreateAdditionalSwapChain(void *lpd3dd, D3DPRESENT_PARAMETERS
param[2] = D3DFMT_UNKNOWN; // second attempt: unknown, good for windowed mode param[2] = D3DFMT_UNKNOWN; // second attempt: unknown, good for windowed mode
res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain); res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain);
} }
//if(res){
// OutTraceD3D("switching to size=0,0\n");
// param[0] = param[1] = 0; // third attempt: unknown, good for windowed mode
// res=(*pCreateAdditionalSwapChain)(lpd3dd, (D3DPRESENT_PARAMETERS *)param, ppSwapChain);
//}
if(res) { if(res) {
OutTraceE("CreateAdditionalSwapChain ERROR: res=%x\n", res); OutTraceE("CreateAdditionalSwapChain ERROR: res=%x(%s)\n", res, ExplainDDError(res));
} }
(dwD3DVersion == 9) ? HookD3DDevice9(&lpd3dd) : HookD3DDevice8(&lpd3dd); (dwD3DVersion == 9) ? HookD3DDevice9(&lpd3dd) : HookD3DDevice8(&lpd3dd);
@ -1725,8 +1753,12 @@ UINT WINAPI extGetAdapterModeCount(void *lpd3d, UINT Adapter, D3DFORMAT Format)
HRESULT WINAPI extCheckDeviceType(void *lpd3d, UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed) HRESULT WINAPI extCheckDeviceType(void *lpd3d, UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed)
{ {
HRESULT res;
OutTraceD3D("CheckDeviceType: d3d=%x adapter=%d windowed=%x\n", lpd3d, Adapter, bWindowed); OutTraceD3D("CheckDeviceType: d3d=%x adapter=%d windowed=%x\n", lpd3d, Adapter, bWindowed);
return (*pCheckDeviceType)(lpd3d, Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed); if(dxw.Windowize) bWindowed = TRUE;
res = (*pCheckDeviceType)(lpd3d, Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed);
OutTraceD3D("CheckDeviceType: res=%x\n", res);
return res;
} }
HRESULT WINAPI extCheckDeviceFormat(void *lpd3d, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) HRESULT WINAPI extCheckDeviceFormat(void *lpd3d, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat)

View File

@ -41,8 +41,8 @@ static HookEntry_Type Hooks[]={
{HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsExA", (FARPROC)ChangeDisplaySettingsExA, (FARPROC *)&pChangeDisplaySettingsExA, (FARPROC)extChangeDisplaySettingsExA}, {HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsExA", (FARPROC)ChangeDisplaySettingsExA, (FARPROC *)&pChangeDisplaySettingsExA, (FARPROC)extChangeDisplaySettingsExA},
{HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsW, (FARPROC)extChangeDisplaySettingsW}, // ref. by Knights of Honor {HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsW, (FARPROC)extChangeDisplaySettingsW}, // ref. by Knights of Honor
{HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsExW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsExW, (FARPROC)extChangeDisplaySettingsExW}, {HOOK_HOT_CANDIDATE, "ChangeDisplaySettingsExW", (FARPROC)NULL, (FARPROC *)&pChangeDisplaySettingsExW, (FARPROC)extChangeDisplaySettingsExW},
{HOOK_HOT_CANDIDATE, "GetMonitorInfoA", (FARPROC)NULL, (FARPROC *)&pGetMonitorInfoA, (FARPROC)extGetMonitorInfoA}, {HOOK_HOT_CANDIDATE, "GetMonitorInfoA", (FARPROC)GetMonitorInfoA, (FARPROC *)&pGetMonitorInfoA, (FARPROC)extGetMonitorInfoA},
{HOOK_HOT_CANDIDATE, "GetMonitorInfoW", (FARPROC)NULL, (FARPROC *)&pGetMonitorInfoW, (FARPROC)extGetMonitorInfoW}, {HOOK_HOT_CANDIDATE, "GetMonitorInfoW", (FARPROC)GetMonitorInfoW, (FARPROC *)&pGetMonitorInfoW, (FARPROC)extGetMonitorInfoW},
{HOOK_IAT_CANDIDATE, "ShowCursor", (FARPROC)ShowCursor, (FARPROC *)&pShowCursor, (FARPROC)extShowCursor}, {HOOK_IAT_CANDIDATE, "ShowCursor", (FARPROC)ShowCursor, (FARPROC *)&pShowCursor, (FARPROC)extShowCursor},
{HOOK_IAT_CANDIDATE, "CreateDialogIndirectParamA", (FARPROC)CreateDialogIndirectParamA, (FARPROC *)&pCreateDialogIndirectParam, (FARPROC)extCreateDialogIndirectParam}, {HOOK_IAT_CANDIDATE, "CreateDialogIndirectParamA", (FARPROC)CreateDialogIndirectParamA, (FARPROC *)&pCreateDialogIndirectParam, (FARPROC)extCreateDialogIndirectParam},
{HOOK_IAT_CANDIDATE, "CreateDialogParamA", (FARPROC)CreateDialogParamA, (FARPROC *)&pCreateDialogParam, (FARPROC)extCreateDialogParam}, {HOOK_IAT_CANDIDATE, "CreateDialogParamA", (FARPROC)CreateDialogParamA, (FARPROC *)&pCreateDialogParam, (FARPROC)extCreateDialogParam},
@ -1418,7 +1418,8 @@ static HWND WINAPI extCreateWindowCommon(
// "Hoyle Casino Empire" needs to be in a maximized state to continue after the intro movie. // "Hoyle Casino Empire" needs to be in a maximized state to continue after the intro movie.
// Sending a SW_MAXIMIZE message intercepted by the PREVENTMAXIMIZE handling fixes the problem. // Sending a SW_MAXIMIZE message intercepted by the PREVENTMAXIMIZE handling fixes the problem.
if (dxw.IsFullScreen() && (dxw.dwFlags1 & PREVENTMAXIMIZE)){ //if (dxw.IsFullScreen() && (dxw.dwFlags1 & PREVENTMAXIMIZE)){
if ((hwnd == dxw.GethWnd()) && dxw.IsFullScreen() && (dxw.dwFlags1 & PREVENTMAXIMIZE)){
OutTraceDW("%s: entering maximized state\n", ApiName); OutTraceDW("%s: entering maximized state\n", ApiName);
(*pShowWindow)(hwnd, SW_MAXIMIZE); (*pShowWindow)(hwnd, SW_MAXIMIZE);
} }
@ -2776,13 +2777,15 @@ BOOL extGetMonitorInfo(HMONITOR hMonitor, LPMONITORINFO lpmi, GetMonitorInfo_Typ
BOOL res; BOOL res;
OutTraceDW("GetMonitorInfo: hMonitor=%x mi=MONITORINFO%s\n", hMonitor, lpmi->cbSize==sizeof(MONITORINFO)?"":"EX"); OutTraceDW("GetMonitorInfo: hMonitor=%x mi=MONITORINFO%s\n", hMonitor, lpmi->cbSize==sizeof(MONITORINFO)?"":"EX");
res=(*pGetMonitorInfo)(hMonitor, lpmi); res=(*pGetMonitorInfo)(hMonitor, lpmi);
if(res && dxw.Windowize){ //v2.03.15 - must fix the coordinates also in case of error: that may depend on the windowed mode.
if(dxw.Windowize){
OutTraceDW("GetMonitorInfo: FIX Work=(%d,%d)-(%d,%d) Monitor=(%d,%d)-(%d,%d) -> (%d,%d)-(%d,%d)\n", OutTraceDW("GetMonitorInfo: FIX Work=(%d,%d)-(%d,%d) Monitor=(%d,%d)-(%d,%d) -> (%d,%d)-(%d,%d)\n",
lpmi->rcWork.left, lpmi->rcWork.top, lpmi->rcWork.right, lpmi->rcWork.bottom, lpmi->rcWork.left, lpmi->rcWork.top, lpmi->rcWork.right, lpmi->rcWork.bottom,
lpmi->rcMonitor.left, lpmi->rcMonitor.top, lpmi->rcMonitor.right, lpmi->rcMonitor.bottom, lpmi->rcMonitor.left, lpmi->rcMonitor.top, lpmi->rcMonitor.right, lpmi->rcMonitor.bottom,
0, 0, dxw.GetScreenWidth(), dxw.GetScreenHeight()); 0, 0, dxw.GetScreenWidth(), dxw.GetScreenHeight());
lpmi->rcWork = dxw.GetScreenRect(); lpmi->rcWork = dxw.GetScreenRect();
lpmi->rcMonitor = dxw.GetScreenRect(); lpmi->rcMonitor = dxw.GetScreenRect();
res=TRUE;
} }
else else
OutTraceE("GetMonitorInfo: ERROR err=%d\n", GetLastError()); OutTraceE("GetMonitorInfo: ERROR err=%d\n", GetLastError());

View File

@ -36,6 +36,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_OutDWTrace = FALSE; m_OutDWTrace = FALSE;
m_OutD3DTrace = FALSE; m_OutD3DTrace = FALSE;
m_OutDDRAWTrace = FALSE; m_OutDDRAWTrace = FALSE;
m_OutDebugString = FALSE;
m_DXProxed = FALSE; m_DXProxed = FALSE;
//m_HandleDC = FALSE; //m_HandleDC = FALSE;
m_HandleExceptions = FALSE; m_HandleExceptions = FALSE;

Binary file not shown.