diff --git a/build/dxwnd.dll b/build/dxwnd.dll index 5f5272e..a700886 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c9903cd38ba533b4ed2c7e2d0d9023411b0a32e056d35845630c5e9abc61705 +oid sha256:6c67b9b98fb1b82b094c7d22f2ff848158084e8b1196864089e38fd9f3b55cdd size 680448 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index cc74004..06bdab1 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61b16a6740d6ee40062f21cfafc50b64e7340636e9148c7a861b48f8ed86d697 +oid sha256:d051968f9b2711a85f2b19a760bdad7e67de7e305f81ac2dc649a485d8975f7a size 655872 diff --git a/build/exports/AeroStyle.dxw b/build/exports/AeroStyle.dxw new file mode 100644 index 0000000..211933a --- /dev/null +++ b/build/exports/AeroStyle.dxw @@ -0,0 +1,32 @@ +[target] +title0=AeroStyle +path0=F:\Games\AeroStyle\AeroStyle.exe +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Alien Ambush.dxw b/build/exports/Alien Ambush.dxw new file mode 100644 index 0000000..09886af --- /dev/null +++ b/build/exports/Alien Ambush.dxw @@ -0,0 +1,32 @@ +[target] +title0=Alien Ambush +path0=D:\Games\Alien Ambush\Alien Ambush.exe +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +flagg0=1207959552 +flagh0=20 +flagi0=134217732 +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 diff --git a/build/exports/Bugriders the Race of Kings.dxw b/build/exports/Bugriders the Race of Kings.dxw new file mode 100644 index 0000000..8cf3ddf --- /dev/null +++ b/build/exports/Bugriders the Race of Kings.dxw @@ -0,0 +1,32 @@ +[target] +title0=Bugriders the Race of Kings +path0=D:\Games\RIDERS\BIN\RIDERS.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Bust A Move 3DX.dxw b/build/exports/Bust A Move 3DX.dxw new file mode 100644 index 0000000..a551d77 --- /dev/null +++ b/build/exports/Bust A Move 3DX.dxw @@ -0,0 +1,32 @@ +[target] +title0=Bust A Move 3DX +path0=D:\Games\Bust A Move 3DX\PB3.exe +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +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 diff --git a/build/exports/Circus Fighters.dxw b/build/exports/Circus Fighters.dxw new file mode 100644 index 0000000..d63ddb7 --- /dev/null +++ b/build/exports/Circus Fighters.dxw @@ -0,0 +1,32 @@ +[target] +title0=Circus Fighters +path0=D:\Games\Circus Fighters\CIRCUS.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=681574434 +flagg0=1209008128 +flagh0=20 +flagi0=138412036 +flagj0=4224 +flagk0=65536 +flagl0=32768 +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 diff --git a/build/exports/Codename Tenka.dxw b/build/exports/Codename Tenka.dxw new file mode 100644 index 0000000..b08ad2f --- /dev/null +++ b/build/exports/Codename Tenka.dxw @@ -0,0 +1,32 @@ +[target] +title0=Codename Tenka +path0=D:\Games\codetenka\tenka.exe +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/D.O.G. - Fight for Your Life.dxw b/build/exports/D.O.G. - Fight for Your Life.dxw new file mode 100644 index 0000000..969f76e --- /dev/null +++ b/build/exports/D.O.G. - Fight for Your Life.dxw @@ -0,0 +1,32 @@ +[target] +title0=D.O.G. - Fight for Your Life +path0=D:\Games\D.O.G. - Fight for Your Life\DOG.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Dark Angael.dxw b/build/exports/Dark Angael.dxw new file mode 100644 index 0000000..553401b --- /dev/null +++ b/build/exports/Dark Angael.dxw @@ -0,0 +1,32 @@ +[target] +title0=Dark Angael +path0=D:\Games\Dark Angael\GAME.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Dark Reign.dxw b/build/exports/Dark Reign.dxw new file mode 100644 index 0000000..2aa2cba --- /dev/null +++ b/build/exports/Dark Reign.dxw @@ -0,0 +1,32 @@ +[target] +title0=Dark Reign +path0=D:\Games\Dark Reign\dkreign.exe +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Deer Hunter.dxw b/build/exports/Deer Hunter.dxw new file mode 100644 index 0000000..b4a008a --- /dev/null +++ b/build/exports/Deer Hunter.dxw @@ -0,0 +1,32 @@ +[target] +title0=Deer Hunter +path0=F:\Games\Deer Hunter\DEERHUNT.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +flagg0=1207959568 +flagh0=16404 +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 diff --git a/build/exports/Eat my Dust.dxw b/build/exports/Eat my Dust.dxw new file mode 100644 index 0000000..baaf74a --- /dev/null +++ b/build/exports/Eat my Dust.dxw @@ -0,0 +1,32 @@ +[target] +title0=Eat my Dust +path0=D:\Games\eat_my_dust\EATMYDUS.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=681574434 +flagg0=1207959552 +flagh0=20 +flagi0=138412036 +flagj0=4224 +flagk0=65536 +flagl0=32768 +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 diff --git a/build/exports/Excalibur.dxw b/build/exports/Excalibur.dxw new file mode 100644 index 0000000..cb9eada --- /dev/null +++ b/build/exports/Excalibur.dxw @@ -0,0 +1,32 @@ +[target] +title0=Excalibur +path0=D:\Games\Excalibur\_FISH.EXE +startfolder0= +launchpath0=D:\Games\Excalibur\EXCAL.EXE +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Imperialism.dxw b/build/exports/Imperialism.dxw index 7c57902..a7df7af 100644 --- a/build/exports/Imperialism.dxw +++ b/build/exports/Imperialism.dxw @@ -1,21 +1,24 @@ [target] title0=Imperialism -path0=D:\Games\Imperialism\Imperialism.exe +path0=G:\Games\Imperialism\Imperialism.exe +startfolder0= +launchpath0= module0= opengllib0= +notes0= +registry0= ver0=0 coord0=0 flag0=1746935843 flagg0=1209008128 flagh0=20 flagi0=4194308 +flagj0=128 +flagk0=0 +flagl0=0 +flagm0=0 tflag0=0 -initx0=0 -inity0=0 -minx0=0 -miny0=0 -maxx0=0 -maxy0=0 +dflag0=0 posx0=50 posy0=50 sizx0=800 @@ -24,9 +27,6 @@ maxfps0=0 initts0=0 winver0=0 maxres0=-1 -launchpath0= -notes0=Note:\nMap zooming is currently not workind. Do not click on the magnifying glass, \nor the game will crash. -registry0= -flagj0=128 -flagk0=0 swapeffect0=0 +maxddinterface0=7 +slowratio0=1 diff --git a/build/exports/In the Hunt.dxw b/build/exports/In the Hunt.dxw new file mode 100644 index 0000000..569b70b --- /dev/null +++ b/build/exports/In the Hunt.dxw @@ -0,0 +1,32 @@ +[target] +title0=In the Hunt +path0=D:\Games\HUNT\E8.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +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 diff --git a/build/exports/Trials2 - Second Edition.dxw b/build/exports/Trials2 - Second Edition.dxw new file mode 100644 index 0000000..8614e5f --- /dev/null +++ b/build/exports/Trials2 - Second Edition.dxw @@ -0,0 +1,32 @@ +[target] +title0=Trials2 - Second Edition +path0=F:\Games\Trials2 - Second Edition\trials2.exe +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=136314914 +flagg0=1207959552 +flagh0=20 +flagi0=134217732 +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 diff --git a/build/exports/Zero Divide.dxw b/build/exports/Zero Divide.dxw new file mode 100644 index 0000000..0bec3b6 --- /dev/null +++ b/build/exports/Zero Divide.dxw @@ -0,0 +1,32 @@ +[target] +title0=Zero Divide +path0=D:\Games\Zerodiv\ZD.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +coord0=0 +flag0=681582626 +flagg0=1212153864 +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 diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index 1ef698d..c6a8db9 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -1235,3 +1235,10 @@ add: GUI flag "Name by Folder" to default the program name field with the progra 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 + +v2.03.85 +add: added control to avoid hide of tray window. Useful for "Planet of the Apes" +fix: fixed BIG window coordinates. Fixes "Deer Hunter" window positioning problems. +fix: mciSendCommand wrapper for BYPASSMCI flag + + diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index d3b3001..9d359c3 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -33,6 +33,7 @@ dxwCapsDB dxwcdb; dxwSDC sdc; GetWindowLong_Type pGetWindowLong; SetWindowLong_Type pSetWindowLong; +HWND hTrayWnd; extern LRESULT CALLBACK MessageHook(int, WPARAM, LPARAM); extern DWORD WINAPI CpuLimit(LPVOID); @@ -1478,6 +1479,7 @@ void HookInit(TARGETMAP *target, HWND hwnd) CheckCompatibilityFlags(); // v2.02.83: Check for change of OS release // CheckSafeDiscVersion(); // v2.03.78: Detects SafeDisk references and version - moved to DxWnd.exe } + hTrayWnd = FindWindow("Shell_TrayWnd", NULL); } if(hwnd){ // v2.02.32: skip this when in code injection mode. diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index 638d396..5773347 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "TlHelp32.h" -#define VERSION "2.03.84.fx1" +#define VERSION "2.03.85" #define DDTHREADLOCK 1 //#define LOCKTHREADS diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 623085b..7abd9a0 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/gdi32.cpp b/dll/gdi32.cpp index e8d258f..dd6f458 100644 --- a/dll/gdi32.cpp +++ b/dll/gdi32.cpp @@ -2704,9 +2704,10 @@ int WINAPI extDescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXE return res; } if (ppfd && nBytes==sizeof(PIXELFORMATDESCRIPTOR)){ - OutTraceDW("DescribePixelFormat: res=%d Flags=%x PixelType=%x(%s) ColorBits=%d RGBdepth=(%d,%d,%d) RGBshift=(%d,%d,%d)\n", + OutTraceDW("DescribePixelFormat: res=%d Flags=%x(%s) PixelType=%x(%s) ColorBits=%d RGBdepth=(%d,%d,%d) RGBshift=(%d,%d,%d)\n", res, - ppfd->dwFlags, ppfd->iPixelType, ppfd->iPixelType?"PFD_TYPE_COLORINDEX":"PFD_TYPE_RGBA", ppfd->cColorBits, + ppfd->dwFlags, ExplainPFFlags(ppfd->dwFlags), ppfd->iPixelType, + ppfd->iPixelType?"PFD_TYPE_COLORINDEX":"PFD_TYPE_RGBA", ppfd->cColorBits, ppfd->cRedBits, ppfd->cGreenBits, ppfd->cBlueBits, ppfd->cRedShift, ppfd->cGreenShift, ppfd->cBlueShift); if((hdc==0) && dxw.IsFullScreen() && (ppfd->iPixelType==PFD_TYPE_RGBA)){ diff --git a/dll/glhook.h b/dll/glhook.h index a4e4852..3e6bdf0 100644 --- a/dll/glhook.h +++ b/dll/glhook.h @@ -19,6 +19,7 @@ typedef void (WINAPI *glTexImage2D_Type)(GLenum, GLint, GLint, GLsizei, GLsizei, typedef void (WINAPI *glPixelZoom_Type)(GLfloat, GLfloat); typedef void (WINAPI *glBegin_Type)(GLenum); typedef void (WINAPI *glBindTexture_Type)(GLenum, GLuint); +typedef void (WINAPI *glPixelStorei_Type)(GLenum, GLint); extern GLenum WINAPI extglGetError(); extern void WINAPI extglViewport(GLint, GLint, GLsizei, GLsizei); @@ -37,6 +38,7 @@ extern void WINAPI extglTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint extern void WINAPI extglPixelZoom(GLfloat, GLfloat); extern void WINAPI extglBegin(GLenum); extern void WINAPI extglBindTexture(GLenum, GLuint); +extern void WINAPI extglPixelStorei(GLenum, GLint); #ifdef DXWDECLARATIONS #undef DXWEXTERN @@ -68,3 +70,4 @@ DXWEXTERN glTexImage2D_Type pglTexImage2D; DXWEXTERN glPixelZoom_Type pglPixelZoom; DXWEXTERN glBegin_Type pglBegin; DXWEXTERN glBindTexture_Type pglBindTexture; +DXWEXTERN glPixelStorei_Type pglPixelStorei; \ No newline at end of file diff --git a/dll/opengl.cpp b/dll/opengl.cpp index 102b37a..a7f7524 100644 --- a/dll/opengl.cpp +++ b/dll/opengl.cpp @@ -41,6 +41,7 @@ static HookEntryEx_Type Hooks[]={ {HOOK_IAT_CANDIDATE, 0, "glPixelZoom", NULL, (FARPROC *)&pglPixelZoom, (FARPROC)extglPixelZoom}, //{HOOK_IAT_CANDIDATE, 0, "glBegin", NULL, (FARPROC *)&pglBegin, (FARPROC)extglBegin}, {HOOK_IAT_CANDIDATE, 0, "glBindTexture", NULL, (FARPROC *)&pglBindTexture, (FARPROC)extglBindTexture}, + //{HOOK_IAT_CANDIDATE, 0, "glPixelStorei", NULL, (FARPROC *)&pglPixelStorei, (FARPROC)extglPixelStorei}, {HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator }; @@ -533,6 +534,7 @@ void WINAPI extglPixelZoom(GLfloat xfactor, GLfloat yfactor) if ((glerr=extglGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__); return; } + void WINAPI extglBegin(GLenum mode) { GLenum glerr; @@ -559,3 +561,13 @@ void WINAPI extglBindTexture(GLenum target, GLuint texture) if ((glerr=extglGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__); return; } + +void WINAPI extglPixelStorei(GLenum pname, GLint param) +{ + GLenum glerr; + OutTraceDW("glPixelStorei: pname=%x param=%x\n", pname, param); + + (*pglPixelStorei)(pname, param); + if ((glerr=extglGetError())!= GL_NO_ERROR) OutTrace("GLERR %d ad %d\n", glerr, __LINE__); + return; +} \ No newline at end of file diff --git a/dll/user32.cpp b/dll/user32.cpp index 430d808..8252d82 100644 --- a/dll/user32.cpp +++ b/dll/user32.cpp @@ -698,8 +698,16 @@ BOOL WINAPI extInvalidateRect(HWND hwnd, RECT *lpRect, BOOL bErase) BOOL WINAPI extShowWindow(HWND hwnd, int nCmdShow) { BOOL res; + extern HWND hTrayWnd; OutTraceDW("ShowWindow: hwnd=%x, CmdShow=%x(%s)\n", hwnd, nCmdShow, ExplainShowCmd(nCmdShow)); + + if(dxw.Windowize && (hwnd == hTrayWnd) && (nCmdShow == SW_HIDE)){ + // v2.03.85: suppress attempts to hide the tray window + OutTraceDW("ShowWindow: suppress tray window hide\n"); + return TRUE; + } + if (dxw.dwFlags1 & PREVENTMAXIMIZE){ if(nCmdShow==SW_MAXIMIZE){ OutTraceDW("ShowWindow: suppress SW_MAXIMIZE maximize\n"); @@ -1359,7 +1367,7 @@ int WINAPI extGetSystemMetrics(int nindex) ATOM WINAPI extRegisterClassExA(WNDCLASSEXA *lpwcx) { ATOM ret; - OutTraceDW("RegisterClassExA: PROXED ClassName=%s style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", + OutTraceDW("RegisterClassExA: PROXED ClassName=\"%s\" style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", lpwcx->lpszClassName, lpwcx->style, ExplainStyle(lpwcx->style), lpwcx->lpfnWndProc, lpwcx->cbClsExtra, lpwcx->cbWndExtra, lpwcx->hInstance); ret = (*pRegisterClassExA)(lpwcx); OutTraceDW("RegisterClassExA: atom=%x\n", ret); @@ -1370,7 +1378,7 @@ ATOM WINAPI extRegisterClassA(WNDCLASSA *lpwcx) { ATOM ret; // referenced by Syberia, together with RegisterClassExA - OutTraceDW("RegisterClassA: PROXED ClassName=%s style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", + OutTraceDW("RegisterClassA: PROXED ClassName=\"%s\" style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", lpwcx->lpszClassName, lpwcx->style, ExplainStyle(lpwcx->style), lpwcx->lpfnWndProc, lpwcx->cbClsExtra, lpwcx->cbWndExtra, lpwcx->hInstance); ret = (*pRegisterClassA)(lpwcx); OutTraceDW("RegisterClassA: atom=%x\n", ret); @@ -1380,7 +1388,7 @@ ATOM WINAPI extRegisterClassA(WNDCLASSA *lpwcx) ATOM WINAPI extRegisterClassExW(WNDCLASSEXW *lpwcx) { ATOM ret; - OutTraceDW("RegisterClassExW: PROXED ClassName=%ls style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", + OutTraceDW("RegisterClassExW: PROXED ClassName=\"%ls\" style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", lpwcx->lpszClassName, lpwcx->style, ExplainStyle(lpwcx->style), lpwcx->lpfnWndProc, lpwcx->cbClsExtra, lpwcx->cbWndExtra, lpwcx->hInstance); ret = (*pRegisterClassExW)(lpwcx); OutTraceDW("RegisterClassExW: atom=%x\n", ret); @@ -1390,7 +1398,7 @@ ATOM WINAPI extRegisterClassExW(WNDCLASSEXW *lpwcx) ATOM WINAPI extRegisterClassW(WNDCLASSW *lpwcx) { ATOM ret; - OutTraceDW("RegisterClassW: PROXED ClassName=%ls style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", + OutTraceDW("RegisterClassW: PROXED ClassName=\"%ls\" style=%x(%s) WndProc=%x cbClsExtra=%d cbWndExtra=%d hInstance=%x\n", lpwcx->lpszClassName, lpwcx->style, ExplainStyle(lpwcx->style), lpwcx->lpfnWndProc, lpwcx->cbClsExtra, lpwcx->cbWndExtra, lpwcx->hInstance); ret = (*pRegisterClassW)(lpwcx); OutTraceDW("RegisterClassW: atom=%x\n", ret); @@ -1490,6 +1498,7 @@ static HWND WINAPI extCreateWindowCommon( { HWND hwnd; BOOL isValidHandle=TRUE; + BOOL isNewDesktop; int iOrigW, iOrigH; iOrigW=nWidth; @@ -1523,7 +1532,7 @@ static HWND WINAPI extCreateWindowCommon( // v2.02.30: fix (Fable - lost chapters) Fable creates a bigger win with negative x,y coordinates. // v2.03.53: revised code, logic moved to IsFullscreenWindow - if(IsFullscreenWindow(lpClassName, dwStyle, dwExStyle, hWndParent, x, y, nWidth, nHeight)){ + if(isNewDesktop=IsFullscreenWindow(lpClassName, dwStyle, dwExStyle, hWndParent, x, y, nWidth, nHeight)){ RECT screen; POINT upleft = {0,0}; @@ -1597,23 +1606,25 @@ static HWND WINAPI extCreateWindowCommon( // from here on, fullscreen is garanteed - if (dwStyle & WS_CHILD){ - // tested on Gangsters: coordinates must be window-relative!!! - // Age of Empires.... - dxw.MapClient(&x, &y, &nWidth, &nHeight); - OutTraceDW("%s: fixed WS_CHILD pos=(%d,%d) size=(%d,%d)\n", - ApiName, x, y, nWidth, nHeight); - } - else { - if ((dwExStyle & WS_EX_CONTROLPARENT) || (dwStyle & WS_POPUP)){ - // needed for "Diablo", that creates a new WS_EX_CONTROLPARENT window that must be - // overlapped to the directdraw surface. - // needed for "Riven", that creates a new WS_POPUP window with the menu bar that must be - // overlapped to the directdraw surface. - dxw.MapWindow(&x, &y, &nWidth, &nHeight); - OutTraceDW("%s: fixed pos=(%d,%d) size=(%d,%d)\n", + if(!isNewDesktop){ + if (dwStyle & WS_CHILD){ + // tested on Gangsters: coordinates must be window-relative!!! + // Age of Empires.... + dxw.MapClient(&x, &y, &nWidth, &nHeight); + OutTraceDW("%s: fixed WS_CHILD pos=(%d,%d) size=(%d,%d)\n", ApiName, x, y, nWidth, nHeight); } + else { + if ((dwExStyle & WS_EX_CONTROLPARENT) || (dwStyle & WS_POPUP)){ + // needed for "Diablo", that creates a new WS_EX_CONTROLPARENT window that must be + // overlapped to the directdraw surface. + // needed for "Riven", that creates a new WS_POPUP window with the menu bar that must be + // overlapped to the directdraw surface. + dxw.MapWindow(&x, &y, &nWidth, &nHeight); + OutTraceDW("%s: fixed pos=(%d,%d) size=(%d,%d)\n", + ApiName, x, y, nWidth, nHeight); + } + } } OutTraceB("%s: fixed pos=(%d,%d) size=(%d,%d) Style=%x(%s) ExStyle=%x(%s)\n", diff --git a/dll/winmm.cpp b/dll/winmm.cpp index a81aeae..d302388 100644 --- a/dll/winmm.cpp +++ b/dll/winmm.cpp @@ -142,14 +142,22 @@ MCIERROR WINAPI extmciSendCommand(mciSendCommand_Type pmciSendCommand, MCIDEVICE IDDevice, uMsg, ExplainMCICommands(uMsg), fdwCommand, ExplainMCIFlags(uMsg, fdwCommand)); if(dxw.dwFlags6 & BYPASSMCI){ - if((uMsg == MCI_STATUS) && (fdwCommand == MCI_STATUS_ITEM)){ + if((uMsg == MCI_STATUS) && (fdwCommand & MCI_STATUS_ITEM)){ // fix for Tie Fighter 95: when bypassing, let the caller know you have no CD tracks // otherwise you risk an almost endless loop going through the unassigned returned // number of ghost tracks + // fix for "Emperor of the Fading Suns": the MCI_STATUS_ITEM is set in .or. with + // MCI_TRACK MCI_STATUS_PARMS *p = (MCI_STATUS_PARMS *)dwParam; - p->dwItem = 0; - p->dwTrack = 0; - p->dwReturn = 0; + OutTraceDW("mciSendCommand: MCI_STATUS item=%d track=%d ret=%d\n", p->dwItem, p->dwReturn, p->dwTrack); + if(fdwCommand & MCI_TRACK){ + p->dwReturn = 1; + } + else{ + p->dwItem = 0; + p->dwTrack = 0; + p->dwReturn = 0; + } OutTraceDW("mciSendCommand: BYPASS fixing MCI_STATUS\n"); } else{ diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo new file mode 100644 index 0000000..0b56166 Binary files /dev/null and b/host/dxwndhost.vs2008.suo differ