diff --git a/build/dxwnd.0.ini b/build/dxwnd.0.ini index 2fe96ca..bb365c8 100644 --- a/build/dxwnd.0.ini +++ b/build/dxwnd.0.ini @@ -7,7 +7,6 @@ lang=automatic ;debug=1 ;multiprocesshook=0 ;checkadmin=0 -;debugview=.\DbgView.exe [texture] MinTexX=16 MaxTexX=0 diff --git a/build/dxwnd.dll b/build/dxwnd.dll index 463aeeb..7fa61f2 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f4a7d264c0d0399abc66b1b547cb25224cb2e3138ae59c1ac06234bae23948c -size 567808 +oid sha256:d53bda86269a959549e061c5b2c23e70b492dcb1b1e2b944063b193b49179d87 +size 567296 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index 61dbd43..fcfb1b7 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1dcfaa8abb3449b38509567fc3220db7d161443ceebdb0e398458888c4e490f -size 537088 +oid sha256:be381f4fba85d8c7dcb13682c470713728dd133b38e6d4d1ed65fc6ceb74e771 +size 536064 diff --git a/build/exports/Carmageddon (gore).dxw b/build/exports/Carmageddon (gore).dxw new file mode 100644 index 0000000..bdb2cf6 --- /dev/null +++ b/build/exports/Carmageddon (gore).dxw @@ -0,0 +1,29 @@ +[target] +title0=Carmageddon (gore) +path0=D:\Games\carsplat\CARMA95.exe +launchpath0= +module0= +opengllib0= +notes0= +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 diff --git a/build/exports/Carmageddon (no gore).dxw b/build/exports/Carmageddon (no gore).dxw new file mode 100644 index 0000000..6993126 --- /dev/null +++ b/build/exports/Carmageddon (no gore).dxw @@ -0,0 +1,29 @@ +[target] +title0=Carmageddon (no gore) +path0=D:\Games\carsplat\CARM95G.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=138412036 +flagj0=4224 +tflag0=512 +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 diff --git a/build/exports/Hercules.dxw b/build/exports/Hercules.dxw new file mode 100644 index 0000000..a818522 --- /dev/null +++ b/build/exports/Hercules.dxw @@ -0,0 +1,29 @@ +[target] +title0=Hercules +path0=D:\Games\HERC\HERCULES.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1744830464 +flagh0=1044 +flagi0=1212153862 +flagj0=4224 +tflag0=6659 +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 diff --git a/build/exports/I-War.dxw b/build/exports/I-War.dxw new file mode 100644 index 0000000..334d795 --- /dev/null +++ b/build/exports/I-War.dxw @@ -0,0 +1,29 @@ +[target] +title0=I-War +path0=D:\Games\iwar\IWar.exe +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1476395008 +flagh0=20 +flagi0=138412036 +flagj0=4224 +tflag0=512 +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 diff --git a/build/exports/Mephisto Chess.dxw b/build/exports/Mephisto Chess.dxw new file mode 100644 index 0000000..4b3a91a --- /dev/null +++ b/build/exports/Mephisto Chess.dxw @@ -0,0 +1,29 @@ +[target] +title0=Mephisto Chess +path0=D:\Games\mephisto\mephisto.exe +launchpath0= +module0= +opengllib0= +notes0=Run in window, but needs "Limit available resources" flag to run +ver0=0 +coord0=0 +flag0=536870946 +flagg0=1476395008 +flagh0=20 +flagi0=138412038 +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 diff --git a/build/exports/Open Ice 2 on 2 Challenge.dxw b/build/exports/Open Ice 2 on 2 Challenge.dxw new file mode 100644 index 0000000..eabee5d --- /dev/null +++ b/build/exports/Open Ice 2 on 2 Challenge.dxw @@ -0,0 +1,29 @@ +[target] +title0=Open Ice 2 on 2 Challenge +path0=D:\Games\OPENICE\OPENICE.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=138412036 +flagj0=4224 +tflag0=512 +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 diff --git a/build/exports/Resident Evil (sw mode).dxw b/build/exports/Resident Evil (sw mode).dxw new file mode 100644 index 0000000..b1a61be --- /dev/null +++ b/build/exports/Resident Evil (sw mode).dxw @@ -0,0 +1,29 @@ +[target] +title0=Resident Evil (sw mode) +path0=D:\Games\resevil\residentevil.exe +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217826 +flagg0=1744830592 +flagh0=20 +flagi0=138412036 +flagj0=4224 +tflag0=6403 +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 diff --git a/build/exports/Starfleet Academy (d3d).dxw b/build/exports/Starfleet Academy (d3d).dxw new file mode 100644 index 0000000..d16a845 --- /dev/null +++ b/build/exports/Starfleet Academy (d3d).dxw @@ -0,0 +1,29 @@ +[target] +title0=Starfleet Academy (d3d) +path0=D:\Games\SFA\SFAD3D.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=138412038 +flagj0=4224 +tflag0=536870912 +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 diff --git a/build/exports/Starfleet Academy (sw).dxw b/build/exports/Starfleet Academy (sw).dxw new file mode 100644 index 0000000..2d81b48 --- /dev/null +++ b/build/exports/Starfleet Academy (sw).dxw @@ -0,0 +1,29 @@ +[target] +title0=Starfleet Academy (sw) +path0=D:\Games\SFA\SFA.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=134217734 +flagj0=4224 +tflag0=536870912 +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 diff --git a/build/exports/Street Fighters Zero.dxw b/build/exports/Street Fighters Zero.dxw new file mode 100644 index 0000000..680b014 --- /dev/null +++ b/build/exports/Street Fighters Zero.dxw @@ -0,0 +1,29 @@ +[target] +title0=Street Fighters Zero +path0=D:\Games\sfzero\relbin\ZERO_A95.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=134217760 +flagg0=1744830464 +flagh0=1044 +flagi0=1212153860 +flagj0=8392832 +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 diff --git a/build/exports/SubCulture (3DFX).dxw b/build/exports/SubCulture (3DFX).dxw new file mode 100644 index 0000000..0b592bd --- /dev/null +++ b/build/exports/SubCulture (3DFX).dxw @@ -0,0 +1,29 @@ +[target] +title0=SubCulture (3DFX) +path0=D:\Games\subcult\SC3DFX.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=671088674 +flagg0=1207959552 +flagh0=20 +flagi0=138412036 +flagj0=4224 +tflag0=512 +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 diff --git a/build/exports/SubCulture (D3D).dxw b/build/exports/SubCulture (D3D).dxw new file mode 100644 index 0000000..a361565 --- /dev/null +++ b/build/exports/SubCulture (D3D).dxw @@ -0,0 +1,29 @@ +[target] +title0=SubCulture (D3D) +path0=D:\Games\subcult\SCD3D.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=671088690 +flagg0=1207959552 +flagh0=20 +flagi0=138416132 +flagj0=4224 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=800 +maxy0=600 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=4 diff --git a/build/exports/SubCulture (sw).dxw b/build/exports/SubCulture (sw).dxw new file mode 100644 index 0000000..8074906 --- /dev/null +++ b/build/exports/SubCulture (sw).dxw @@ -0,0 +1,29 @@ +[target] +title0=SubCulture (sw) +path0=D:\Games\subcult\SC.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 diff --git a/build/exports/Virtua Fighter 2.dxw b/build/exports/Virtua Fighter 2.dxw new file mode 100644 index 0000000..704ec69 --- /dev/null +++ b/build/exports/Virtua Fighter 2.dxw @@ -0,0 +1,29 @@ +[target] +title0=Virtua Fighter 2 +path0=D:\Games\VF2\VF2.EXE +launchpath0= +module0= +opengllib0= +notes0= +ver0=0 +coord0=0 +flag0=671088674 +flagg0=1744830592 +flagh0=20 +flagi0=138412038 +flagj0=4224 +tflag0=536870912 +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 diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index bcbc42b..c440d13 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -735,4 +735,9 @@ fix: handle leakage for primary hdc, causing rapid performance downgrade fix: log message reorganization add: SetStretchBltMode HALFTONE in GDI mode to provide bilinear filtered GDI stretching fix: some GDI mode optimization - should bring performances similar to D3DWindower, with similar configuration -fix: GDI mode bug, crashing when blitting from NULL surface (to do a color fill operation) \ No newline at end of file +fix: GDI mode bug, crashing when blitting from NULL surface (to do a color fill operation) + +v2.03.11 +fix: added DDSCAPS_FLIP capability to emulated backbuffer surface. Fixes "Injection" missing flips +fix: added high order bit set to kernel32.dll GetVersion() wrapper in case of Win95/98 emulation. Fixes "Warhead" frontend program +fix: coordinates returned by user32.dll GetClipCursor() must be scaled accordingly with virtual desktop size. Fixes "SubCulture" mouse control problems \ No newline at end of file diff --git a/build/redist/d3drm.dll b/build/redist/d3drm.dll new file mode 100644 index 0000000..623c3cb --- /dev/null +++ b/build/redist/d3drm.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd80f3839a035b6b52362735b22eb8d2523d3434bf18afb3e0f1b5ace84357b0 +size 437008 diff --git a/build/registry/dxwnd.Hercules.REG b/build/registry/dxwnd.Hercules.REG new file mode 100644 index 0000000..0bcb9f8 --- /dev/null +++ b/build/registry/dxwnd.Hercules.REG @@ -0,0 +1,14 @@ + +[HKEY_LOCAL_MACHINE\SOFTWARE] +[HKEY_LOCAL_MACHINE\SOFTWARE\Disney Interactive] +[HKEY_LOCAL_MACHINE\SOFTWARE\Disney Interactive\Hercules] +[HKEY_LOCAL_MACHINE\SOFTWARE\Disney Interactive\Hercules\1.00] +"DATA"="DATA\\" +"User Path"=".\\" +"BitVersion"="32 Bit" +"PATH"=".\\" +"EntryPoint"=".\\Hercules.exe" +"Help"=".\\hercules.hlp" +"Uninstall"="C:\\WINDOWS\\uninst.exe -fC:\\Hercules\\DeIsL1.isu" +"Config"=hex:05,ca,ab,07,01,01,01,00,03,01,01,00,01,01,01,00,ff,3f,00,00,01,00,ff,ff,03,00,00,00,26,00,28,00,25,00,27,00,58,00,5a,00,43,00,44,00,53,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 + diff --git a/build/registry/dxwnd.Street Fighters Zero.REG b/build/registry/dxwnd.Street Fighters Zero.REG new file mode 100644 index 0000000..f6fbd85 --- /dev/null +++ b/build/registry/dxwnd.Street Fighters Zero.REG @@ -0,0 +1,7 @@ + +[HKEY_LOCAL_MACHINE\SOFTWARE\CAPCOM] +[HKEY_LOCAL_MACHINE\SOFTWARE\CAPCOM\STREETFIGHTERZERO] +""="..\\bin" + +[HKEY_LOCAL_MACHINE\SOFTWARE\CAPCOM\STREETFIGHTERZERO\1.0] + diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index c10bf79..bf5309b 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -2850,7 +2850,7 @@ void BlitError(HRESULT res, LPRECT lps, LPRECT lpd, int line) void BlitTrace(char *label, LPRECT lps, LPRECT lpd, int line) { char sInfo[512]; - sprintf(sInfo, "Blt: %s", label); + sprintf(sInfo, "[%s]", label); if (lps) sprintf(sInfo, "%s src=(%d,%d)-(%d,%d)", sInfo, lps->left, lps->top, lps->right, lps->bottom); else @@ -3644,8 +3644,10 @@ HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFAC HRESULT res; //RECT screen, rect; BOOL IsPrim; + BOOL IsBack; IsPrim=dxw.IsAPrimarySurface(lpdds); + IsBack=dxw.IsABackBufferSurface(lpdds); if ((dxversion == 4) && lprect) CleanRect(&lprect,__LINE__); @@ -3657,7 +3659,7 @@ HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFAC } else sprintf_s(sRect, 80, "lpvoid=%x", lprect); - OutTrace("Unlock(%d): lpdds=%x%s %s\n", dxversion, lpdds, (IsPrim ? "(PRIM)":""), sRect); + OutTrace("Unlock(%d): lpdds=%x%s %s\n", dxversion, lpdds, (IsPrim ? "(PRIM)": (IsBack ? "(BACK)" : "")), sRect); } res=(*pUnlock)(lpdds, lprect); @@ -3666,11 +3668,11 @@ HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFAC if (IsPrim && res==DD_OK) { if(dxversion == 1){ res=sBlt("Unlock", lpdds, NULL, lpdds, NULL, NULL, 0, FALSE); - if(IsPrim) (*pInvalidateRect)(dxw.GethWnd(), NULL, FALSE); // to fix "Deadlock II" mouse trails.... + (*pInvalidateRect)(dxw.GethWnd(), NULL, FALSE); // to fix "Deadlock II" mouse trails.... } else { res=sBlt("Unlock", lpdds, lprect, lpdds, lprect, NULL, 0, FALSE); - if(IsPrim) (*pInvalidateRect)(dxw.GethWnd(), lprect, FALSE); + (*pInvalidateRect)(dxw.GethWnd(), lprect, FALSE); } } @@ -4325,31 +4327,34 @@ HRESULT WINAPI extGetCapsS(int dxInterface, GetCapsS_Type pGetCapsS, LPDIRECTDRA IsPrim=dxw.IsAPrimarySurface(lpdds); IsBack=dxw.IsABackBufferSurface(lpdds); IsFixed=FALSE; - OutTraceDDRAW("GetCaps(S%d): lpdds=%x%s, lpcaps=%x\n", dxInterface, lpdds, IsPrim?"(PRIM)":"", caps); + char *sLabel; + + sLabel = IsPrim?"(PRIM)":(IsBack ? "(BACK)" : ""); res=(*pGetCapsS)(lpdds, caps); if(res) - OutTraceE("GetCaps(S%d): ERROR %x(%s)\n", dxInterface, res, ExplainDDError(res)); + OutTraceE("GetCaps(S%d): ERROR lpdds=%x%s err=%x(%s)\n", dxInterface, lpdds, sLabel, res, ExplainDDError(res)); else - OutTraceDDRAW("GetCaps(S%d): lpdds=%x caps=%x(%s)\n", dxInterface, lpdds, caps->dwCaps, ExplainDDSCaps(caps->dwCaps)); + OutTraceDDRAW("GetCaps(S%d): lpdds=%x%s caps=%x(%s)\n", dxInterface, lpdds, sLabel, caps->dwCaps, ExplainDDSCaps(caps->dwCaps)); if (IsPrim) { - OutTraceDW("GetCaps(S%d): fixing PRIMARY surface\n", dxInterface); IsFixed=TRUE; + sLabel="PRIMARYSURFACE"; caps->dwCaps |= DDSD_Prim.ddsCaps.dwCaps; caps->dwCaps |= DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_FRONTBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_VISIBLE; // primary surfaces must be this way caps->dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // primary surfaces can't be this way } if (IsBack) { - OutTraceDW("GetCaps(S%d): fixing BACKBUFFER surface\n", dxInterface); IsFixed=TRUE; - caps->dwCaps |= (DDSCAPS_BACKBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); // you never know.... + sLabel="BACKBUFFER"; + // v2.03.11: added DDSCAPS_FLIP capability to backbuffer surface: "Ignition" checks for it before Flip-ping to primary + 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 } if ((caps->dwCaps & DDSCAPS_ZBUFFER) || (lpdds == lpDDZBuffer)){ - OutTraceDW("GetCaps(S%d): fixing ZBUFFER surface\n", dxInterface); IsFixed=TRUE; + sLabel="ZBUFFER"; if (DDZBufferCaps & DDSCAPS_SYSTEMMEMORY){ caps->dwCaps |= (DDSCAPS_ZBUFFER|DDSCAPS_SYSTEMMEMORY); caps->dwCaps &= ~(DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); @@ -4360,7 +4365,7 @@ HRESULT WINAPI extGetCapsS(int dxInterface, GetCapsS_Type pGetCapsS, LPDIRECTDRA } } - if(IsFixed) OutTraceDW("GetCaps(S%d): lpdds=%x FIXED caps=%x(%s)\n", dxInterface, lpdds, caps->dwCaps, ExplainDDSCaps(caps->dwCaps)); + if(IsFixed) OutTraceDW("GetCaps(S%d): lpdds=%x FIXED %s caps=%x(%s)\n", dxInterface, lpdds, sLabel, caps->dwCaps, ExplainDDSCaps(caps->dwCaps)); return res; } diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index 2836fd6..f938518 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -1062,6 +1062,7 @@ void dxwCore::SetVSyncDelays(UINT RefreshRate) int Reminder; char sInfo[256]; + if(!(dxw.dwFlags1 & SAVELOAD)) return; if((RefreshRate < 10) || (RefreshRate > 100)) return; gdwRefreshRate = RefreshRate; diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index a547dd9..2f4d241 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.10" +#define VERSION "2.03.11" #define DDTHREADLOCK 1 //#define LOCKTHREADS diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 442910e..46899f7 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/kernel32.cpp b/dll/kernel32.cpp index 5850c55..199bb79 100644 --- a/dll/kernel32.cpp +++ b/dll/kernel32.cpp @@ -63,9 +63,9 @@ static HookEntry_Type TimeHooks[]={ }; static HookEntry_Type VersionHooks[]={ - {HOOK_IAT_CANDIDATE, "GetVersion", (FARPROC)GetVersion, (FARPROC *)&pGetVersion, (FARPROC)extGetVersion}, - {HOOK_IAT_CANDIDATE, "GetVersionExA", (FARPROC)GetVersionExA, (FARPROC *)&pGetVersionExA, (FARPROC)extGetVersionExA}, - {HOOK_IAT_CANDIDATE, "GetVersionExW", (FARPROC)GetVersionExW, (FARPROC *)&pGetVersionExW, (FARPROC)extGetVersionExW}, + {HOOK_HOT_CANDIDATE, "GetVersion", (FARPROC)GetVersion, (FARPROC *)&pGetVersion, (FARPROC)extGetVersion}, + {HOOK_HOT_CANDIDATE, "GetVersionExA", (FARPROC)GetVersionExA, (FARPROC *)&pGetVersionExA, (FARPROC)extGetVersionExA}, + {HOOK_HOT_CANDIDATE, "GetVersionExW", (FARPROC)GetVersionExW, (FARPROC *)&pGetVersionExW, (FARPROC)extGetVersionExW}, {HOOK_IAT_CANDIDATE, 0, NULL, 0, 0} // terminator }; @@ -218,6 +218,29 @@ Windows 98/SE" 4.10 4 10 if osVerInfo.szCSDVersion[1] = 'A' then Windows98SE Windows ME 4.90 4 90 */ +/* +Differences with older Windows versions +This function is provided even with older Windows versions with some significant differences than stated above: +The high order bit determins if it's NT based (NT, 2000, XP and newer) or not (Win 3.1, 95, 98, ME) +The remaining bits of the high order word specify the build number only on NT based Windows verions. + +From older MSDN: +To distinguish between operating system platforms, use the high order bit and the low order byte, as shown in the following table: + +Windows NT + High order bit: 0 + Low order byte (major version number): 3 or 4 +Windows 95 and Windows 98 + High order bit: 1 + Low order byte (major version number): 4 +Win32s with Windows 3.1 + High order bit: 1 + Low order byte (major version number): 3 + +For Windows NT and Win32s, the remaining bits in the high order word specify the build number. +For Windows 95 and Windows 98, the remaining bits of the high order word are reserved. +*/ + static struct {char bMajor; char bMinor; char *sName;} WinVersions[9]= { {4, 0, "Windows 95"}, @@ -237,11 +260,11 @@ BOOL WINAPI extGetVersionExA(LPOSVERSIONINFOA lpVersionInfo) ret=(*pGetVersionExA)(lpVersionInfo); if(!ret) { - OutTraceE("GetVersionEx: ERROR err=%d\n", GetLastError()); + OutTraceE("GetVersionExA: ERROR err=%d\n", GetLastError()); return ret; } - OutTraceDW("GetVersionEx: version=%d.%d build=(%d)\n", + OutTraceDW("GetVersionExA: version=%d.%d build=(%d)\n", lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwBuildNumber); if(dxw.dwFlags2 & FAKEVERSION) { @@ -249,7 +272,7 @@ BOOL WINAPI extGetVersionExA(LPOSVERSIONINFOA lpVersionInfo) lpVersionInfo->dwMajorVersion = WinVersions[dxw.FakeVersionId].bMajor; lpVersionInfo->dwMinorVersion = WinVersions[dxw.FakeVersionId].bMinor; lpVersionInfo->dwBuildNumber = 0; - OutTraceDW("GetVersionEx: FIXED version=%d.%d build=(%d) os=\"%s\"\n", + OutTraceDW("GetVersionExA: FIXED version=%d.%d build=(%d) os=\"%s\"\n", lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwBuildNumber, WinVersions[dxw.FakeVersionId].sName); } @@ -262,11 +285,11 @@ BOOL WINAPI extGetVersionExW(LPOSVERSIONINFOW lpVersionInfo) ret=(*pGetVersionExW)(lpVersionInfo); if(!ret) { - OutTraceE("GetVersionEx: ERROR err=%d\n", GetLastError()); + OutTraceE("GetVersionExW: ERROR err=%d\n", GetLastError()); return ret; } - OutTraceDW("GetVersionEx: version=%d.%d build=(%d)\n", + OutTraceDW("GetVersionExW: version=%d.%d build=(%d)\n", lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwBuildNumber); if(dxw.dwFlags2 & FAKEVERSION) { @@ -274,7 +297,7 @@ BOOL WINAPI extGetVersionExW(LPOSVERSIONINFOW lpVersionInfo) lpVersionInfo->dwMajorVersion = WinVersions[dxw.FakeVersionId].bMajor; lpVersionInfo->dwMinorVersion = WinVersions[dxw.FakeVersionId].bMinor; lpVersionInfo->dwBuildNumber = 0; - OutTraceDW("GetVersionEx: FIXED version=%d.%d build=(%d) os=\"%ls\"\n", + OutTraceDW("GetVersionExW: FIXED version=%d.%d build=(%d) os=\"%ls\"\n", lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwBuildNumber, WinVersions[dxw.FakeVersionId].sName); } @@ -307,8 +330,9 @@ DWORD WINAPI extGetVersion(void) dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion))); dwBuild = (DWORD)(HIWORD(dwVersion)); - OutTraceDW("GetVersion: FIXED version=%d.%d build=(%d) os=\"%s\"\n", - dwMajorVersion, dwMinorVersion, dwBuild, WinVersions[dxw.FakeVersionId].sName); + if(WinVersions[dxw.FakeVersionId].bMajor == 4) dwVersion |= 0x80000000; // v2.03.11: fixes "Warhead" + OutTraceDW("GetVersion: FIXED version=%x: Win%d.%d build=(%d) os=\"%s\"\n", + dwVersion, dwMajorVersion, dwMinorVersion, dwBuild, WinVersions[dxw.FakeVersionId].sName); } return dwVersion; diff --git a/dll/user32.cpp b/dll/user32.cpp index 834e23f..f1721e1 100644 --- a/dll/user32.cpp +++ b/dll/user32.cpp @@ -403,9 +403,7 @@ void dxwFixWindowPos(char *ApiName, HWND hwnd, LPARAM lParam) LONG dwStyle, dwExStyle; HMENU hMenu; int minx, miny; - wrect.top = wrect.left = 0; - wrect.right = dxw.GetScreenWidth(); - wrect.bottom = dxw.GetScreenHeight(); + wrect = dxw.GetScreenRect(); dwStyle=(*pGetWindowLongA)(hwnd, GWL_STYLE); dwExStyle=(*pGetWindowLongA)(hwnd, GWL_EXSTYLE); hMenu = (dwStyle & WS_CHILD) ? NULL : GetMenu(hwnd); @@ -1659,12 +1657,14 @@ BOOL WINAPI extGetClipCursor(LPRECT lpRect) // proxy.... if (!(dxw.dwFlags1 & ENABLECLIPPING)) { ret=(*pGetClipCursor)(lpRect); + // v2.03.11: fix for "SubCulture" mouse movement + if(lpRect && dxw.Windowize) *lpRect = dxw.GetScreenRect(); if(IsTraceDDRAW){ if (lpRect) - OutTrace("GetClipCursor: PROXED rect=(%d,%d)-(%d,%d) ret=%d\n", + OutTrace("GetClipCursor: rect=(%d,%d)-(%d,%d) ret=%d\n", lpRect->left,lpRect->top,lpRect->right,lpRect->bottom, ret); else - OutTrace("GetClipCursor: PROXED rect=(NULL) ret=%d\n", ret); + OutTrace("GetClipCursor: rect=(NULL) ret=%d\n", ret); } return ret; } @@ -1672,11 +1672,8 @@ BOOL WINAPI extGetClipCursor(LPRECT lpRect) if(lpRect){ if(lpClipRegion) *lpRect=ClipRegion; - else{ - lpRect->top = lpRect->left = 0; - lpRect->right = dxw.GetScreenWidth(); - lpRect->bottom = dxw.GetScreenHeight(); - } + else + *lpRect=dxw.GetScreenRect(); OutTraceDW("GetClipCursor: rect=(%d,%d)-(%d,%d) ret=%d\n", lpRect->left,lpRect->top,lpRect->right,lpRect->bottom, TRUE); } @@ -2617,10 +2614,7 @@ BOOL WINAPI extSystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, ret=(*pSystemParametersInfoA)(uiAction, uiParam, pvParam, fWinIni); if(uiAction==SPI_GETWORKAREA){ LPRECT cli = (LPRECT)pvParam; - cli->top = 0; - cli->left = 0; - cli->bottom = dxw.GetScreenHeight(); - cli->right = dxw.GetScreenWidth(); + *cli = dxw.GetScreenRect(); OutTraceDW("SystemParametersInfoA: resized client workarea rect=(%d,%d)-(%d,%d)\n", cli->left, cli->top, cli->right, cli->bottom); } return ret; @@ -2640,10 +2634,7 @@ BOOL WINAPI extSystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, ret=(*pSystemParametersInfoW)(uiAction, uiParam, pvParam, fWinIni); if(uiAction==SPI_GETWORKAREA){ LPRECT cli = (LPRECT)pvParam; - cli->top = 0; - cli->left = 0; - cli->bottom = dxw.GetScreenHeight(); - cli->right = dxw.GetScreenWidth(); + *cli = dxw.GetScreenRect(); OutTraceDW("SystemParametersInfoW: resized client workarea rect=(%d,%d)-(%d,%d)\n", cli->left, cli->top, cli->right, cli->bottom); } return ret; diff --git a/host/Resource.h b/host/Resource.h index d179af7..362dc33 100644 Binary files a/host/Resource.h and b/host/Resource.h differ diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index e2e0e66..b6c1e00 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhost.vs2008.vcproj b/host/dxwndhost.vs2008.vcproj index 16172cb..f9a7d72 100644 --- a/host/dxwndhost.vs2008.vcproj +++ b/host/dxwndhost.vs2008.vcproj @@ -502,10 +502,6 @@ RelativePath=".\Resource.h" > - -