mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_04_13_src
Former-commit-id: 0872a878d2a987e5d783445e8169452aad880381
This commit is contained in:
parent
80f670b002
commit
9a31806434
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f4db08ed8206eab319c89f808e3b59311060b13ba6f2f8b01b12f14d78b48926
|
||||
oid sha256:7a79583def56483a293f270aec77c751598364449eb1d729d4fa4512f8c2b010
|
||||
size 787456
|
||||
|
1304
build/dxwnd.ini
1304
build/dxwnd.ini
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
OnRun idx=0 prog="F:\Games\ManTT\MANXTT.EXE" unhooked=0
|
||||
setwindowshook mode
|
||||
OnRun idx=31 prog="D:\Games\International Football 2000\MSIF2000.exe" unhooked=0
|
||||
setwindowshook mode
|
||||
OnRun idx=31 prog="D:\Games\International Football 2000\MSIF2000.exe" unhooked=0
|
||||
setwindowshook mode
|
||||
OnRun idx=34 prog="D:\Games\The Settlers 3 - Ultimate Collection\S3.EXE" unhooked=0
|
||||
setwindowshook mode
|
||||
OnRun idx=34 prog="D:\Games\The Settlers 3 - Ultimate Collection\S3.EXE" unhooked=0
|
||||
setwindowshook mode
|
||||
OnRun idx=34 prog="D:\Games\The Settlers 3 - Ultimate Collection\S3.EXE" unhooked=1
|
||||
setwindowshook mode
|
||||
OnRun idx=35 prog="F:\Games\Dungeon Odyssey Demo\DungOdy.exe" unhooked=0
|
||||
setwindowshook mode
|
@ -7,7 +7,7 @@ ver0=1
|
||||
coord0=0
|
||||
flag0=138428450
|
||||
flagg0=1241514000
|
||||
flagh0=20
|
||||
flagh0=8212
|
||||
flagi0=4194304
|
||||
tflag0=0
|
||||
initx0=0
|
||||
@ -33,3 +33,10 @@ flagl0=0
|
||||
flagm0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
startfolder0=
|
||||
monitorid0=0
|
||||
dflag0=0
|
||||
slowratio0=1
|
||||
scanline0=1
|
||||
initresw0=0
|
||||
initresh0=0
|
||||
|
36
build/exports/Starsiege - Tribes.dxw
Normal file
36
build/exports/Starsiege - Tribes.dxw
Normal file
@ -0,0 +1,36 @@
|
||||
[target]
|
||||
title0=Starsiege - Tribes
|
||||
path0=D:\Games\Starsiege - Tribes\Tribes.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
monitorid0=-1
|
||||
coord0=0
|
||||
flag0=681574442
|
||||
flagg0=1209403392
|
||||
flagh0=8212
|
||||
flagi0=138412036
|
||||
flagj0=-2147479424
|
||||
flagk0=33619968
|
||||
flagl0=67141648
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
||||
scanline0=0
|
||||
initresw0=800
|
||||
initresh0=600
|
3
build/proxy/wing32.dll
Normal file
3
build/proxy/wing32.dll
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:036a87972d467d27ac66fbb0b52bccfb1f41d9a6e0ac949a94e013520c086e14
|
||||
size 55808
|
@ -1526,4 +1526,11 @@ GUI:
|
||||
add: "Support offscreen 3D" flag (OFFSCREENZBUFFER)
|
||||
DLL:
|
||||
fix: recursion bug in CreateWindowExA hooker
|
||||
add: OFFSCREENZBUFFER flag
|
||||
add: OFFSCREENZBUFFER flag
|
||||
|
||||
v2.04.13
|
||||
fix: moved USER32/InvalidateRect hooker to always activate it and further reduce desktop flickering
|
||||
fix: fixed virtual registry tags that introduced extra characters in key string expansion
|
||||
add: hooked SelectClipRgn - preliminary to attempt fixing "Sid Meier's Alpha Centauri"
|
||||
fix: fixed unsupported call to SetWindowsHook(WH_CBT, NULL). Fixes "Starsiege" deaf mouse control.
|
||||
fix: completed and rebuilt proxy dlls to be aligned with current DxWnd structure
|
@ -303,6 +303,7 @@ static DWORD GetKeyValue(
|
||||
case '{':{
|
||||
pData++; // skip '{'
|
||||
pData += ReplaceVar(pData, &lpb, lpcbData);
|
||||
continue; // v2.04.13 fix
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "dxhelper.h"
|
||||
#include "syslibs.h"
|
||||
|
||||
#define EMULATEZBUFFERATTACH FALSE
|
||||
#define HANDLEFLIPPABLE
|
||||
|
||||
#ifdef CHECKMETHODPOINTERS
|
||||
@ -4922,6 +4921,7 @@ static HRESULT WINAPI extCreateClipper(CreateClipper_Type pCreateClipper, LPDIRE
|
||||
OutTraceE("CreateClipper: ERROR res=%x(%s)\n", lpdd, res, ExplainDDError(res));
|
||||
return res;
|
||||
}
|
||||
OutTraceDDRAW("CreateClipper: OK lpddclipper=%x\n", *lplpDDClipper);
|
||||
HookDDClipper(lplpDDClipper); // there is a single Clipper intrface!
|
||||
return res;
|
||||
}
|
||||
@ -5318,6 +5318,7 @@ HRESULT WINAPI extDirectDrawCreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER *lp
|
||||
OutTraceE("DirectDrawCreateClipper: ERROR res=%x(%s)\n", res, ExplainDDError(res));
|
||||
return res;
|
||||
}
|
||||
OutTraceDW("DirectDrawCreateClipper: OK lpclipper=%x\n", *lplpDDClipper);
|
||||
HookDDClipper(lplpDDClipper);
|
||||
return res;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "TlHelp32.h"
|
||||
|
||||
#define VERSION "2.04.12"
|
||||
#define VERSION "2.04.13"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
|
||||
|
Binary file not shown.
@ -160,6 +160,7 @@ static HookEntryEx_Type SyscallHooks[]={
|
||||
};
|
||||
|
||||
static HookEntryEx_Type ScaledHooks[]={
|
||||
{HOOK_HOT_CANDIDATE, 0, "SelectClipRgn", (FARPROC)SelectClipRgn, (FARPROC *)&pSelectClipRgn, (FARPROC)extSelectClipRgn}, // Sid Meier's Alpha Centaury
|
||||
// commented out since they alter text on screen...... (see Imperialism II difficulty level menu)
|
||||
// v2.03.47 - restored: needed for "688(I) Hunter Killer" periscope ....
|
||||
{HOOK_IAT_CANDIDATE, 0, "CreateEllipticRgn", (FARPROC)CreateEllipticRgn, (FARPROC *)&pCreateEllipticRgn, (FARPROC)extCreateEllipticRgn},
|
||||
@ -3712,4 +3713,14 @@ BOOL WINAPI extDeleteObject(HGDIOBJ hgdiobj)
|
||||
if(scaledobj) (*pDeleteObject)(scaledobj);
|
||||
ret = (*pDeleteObject)(hgdiobj);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
int WINAPI extSelectClipRgn(HDC hdc, HRGN hrgn)
|
||||
{
|
||||
int ret;
|
||||
// just proxy, right now ....
|
||||
OutTrace("SelectClipRgn: hdc=%x hrgn=%x\n", hdc, hrgn);
|
||||
ret = (*pSelectClipRgn)(hdc, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ void dxwSDC::setClippingRegion(HDC compatDc, HDC origDc, POINT origin)
|
||||
RgnBox.left, RgnBox.top, RgnBox.right, RgnBox.bottom, RgnBox.right-RgnBox.left, RgnBox.bottom-RgnBox.top);
|
||||
}
|
||||
// end of scaling
|
||||
SelectClipRgn(compatDc, isEmptyClipRgn ? NULL : clipRgn);
|
||||
(*pSelectClipRgn)(compatDc, isEmptyClipRgn ? NULL : clipRgn);
|
||||
DeleteObject(clipRgn);
|
||||
|
||||
HRGN origClipRgn = (*pCreateRectRgn)(0, 0, 0, 0);
|
||||
|
@ -144,6 +144,7 @@ typedef BOOL (WINAPI *GetTextExtentPointA_Type)(HDC, LPCTSTR, int, LPSIZE);
|
||||
typedef BOOL (WINAPI *GetTextExtentPoint32A_Type)(HDC, LPCTSTR, int, LPSIZE);
|
||||
typedef HGDIOBJ (WINAPI *SelectObject_Type)(HDC, HGDIOBJ);
|
||||
typedef BOOL (WINAPI *DeleteObject_Type)(HGDIOBJ);
|
||||
typedef int (WINAPI *SelectClipRgn_Type)(HDC, HRGN);
|
||||
|
||||
// Kernel32.dll:
|
||||
typedef BOOL (WINAPI *GetDiskFreeSpaceA_Type)(LPCSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
|
||||
@ -462,6 +463,7 @@ DXWEXTERN GetTextExtentPointA_Type pGetTextExtentPointA DXWINITIALIZED;
|
||||
DXWEXTERN GetTextExtentPoint32A_Type pGetTextExtentPoint32A DXWINITIALIZED;
|
||||
DXWEXTERN SelectObject_Type pSelectObject DXWINITIALIZED;
|
||||
DXWEXTERN DeleteObject_Type pDeleteObject DXWINITIALIZED;
|
||||
DXWEXTERN SelectClipRgn_Type pSelectClipRgn DXWINITIALIZED;
|
||||
|
||||
|
||||
// Kernel32.dll:
|
||||
@ -771,6 +773,7 @@ extern BOOL WINAPI extGetTextExtentPointA(HDC, LPCTSTR, int, LPSIZE);
|
||||
extern BOOL WINAPI extGetTextExtentPoint32A(HDC, LPCTSTR, int, LPSIZE);
|
||||
extern HGDIOBJ WINAPI extSelectObject(HDC, HGDIOBJ);
|
||||
extern BOOL WINAPI extDeleteObject(HGDIOBJ);
|
||||
extern int WINAPI extSelectClipRgn(HDC, HRGN);
|
||||
|
||||
// Kernel32.dll:
|
||||
extern BOOL WINAPI extGetDiskFreeSpaceA(LPCSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
|
||||
|
@ -153,6 +153,7 @@ static HookEntryEx_Type RemapHooks[]={
|
||||
{HOOK_HOT_CANDIDATE, 0, "GetUpdateRgn", (FARPROC)GetUpdateRgn, (FARPROC *)&pGetUpdateRgn, (FARPROC)extGetUpdateRgn},
|
||||
//{HOOK_IAT_CANDIDATE, 0, "GetUpdateRect", (FARPROC)GetUpdateRect, (FARPROC *)&pGetUpdateRect, (FARPROC)extGetUpdateRect},
|
||||
{HOOK_IAT_CANDIDATE, 0, "RedrawWindow", (FARPROC)RedrawWindow, (FARPROC *)&pRedrawWindow, (FARPROC)extRedrawWindow},
|
||||
{HOOK_HOT_CANDIDATE, 0, "InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extInvalidateRect},
|
||||
{HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator
|
||||
};
|
||||
|
||||
@ -164,7 +165,6 @@ static HookEntryEx_Type SyscallHooks[]={
|
||||
{HOOK_IAT_CANDIDATE, 0, "TabbedTextOutA", (FARPROC)TabbedTextOutA, (FARPROC *)&pTabbedTextOutA, (FARPROC)extTabbedTextOutA},
|
||||
{HOOK_IAT_CANDIDATE, 0, "TabbedTextOutW", (FARPROC)TabbedTextOutW, (FARPROC *)&pTabbedTextOutW, (FARPROC)extTabbedTextOutW},
|
||||
{HOOK_IAT_CANDIDATE, 0, "ScrollDC", (FARPROC)ScrollDC, (FARPROC *)&pScrollDC, (FARPROC)extScrollDC},
|
||||
{HOOK_HOT_CANDIDATE, 0, "InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extInvalidateRect},
|
||||
{HOOK_IAT_CANDIDATE, 0, "DrawTextA", (FARPROC)DrawTextA, (FARPROC *)&pDrawTextA, (FARPROC)extDrawTextA},
|
||||
{HOOK_IAT_CANDIDATE, 0, "DrawTextExA", (FARPROC)DrawTextExA, (FARPROC *)&pDrawTextExA, (FARPROC)extDrawTextExA},
|
||||
{HOOK_IAT_CANDIDATE, 0, "DrawTextW", (FARPROC)DrawTextW, (FARPROC *)&pDrawTextW, (FARPROC)extDrawTextW},
|
||||
@ -632,26 +632,28 @@ BOOL WINAPI extInvalidateRect(HWND hwnd, RECT *lpRect, BOOL bErase)
|
||||
OutTrace("InvalidateRect: hwnd=%x rect=%s erase=%x\n", hwnd, sRect, bErase);
|
||||
}
|
||||
|
||||
if(dxw.IsRealDesktop(hwnd)){
|
||||
hwnd = dxw.GethWnd();
|
||||
}
|
||||
if(dxw.Windowize){
|
||||
if(dxw.IsRealDesktop(hwnd)){
|
||||
hwnd = dxw.GethWnd();
|
||||
}
|
||||
|
||||
RECT ScaledRect;
|
||||
if(dxw.IsFullScreen()) {
|
||||
switch(dxw.GDIEmulationMode){
|
||||
case GDIMODE_STRETCHED:
|
||||
case GDIMODE_SHAREDDC:
|
||||
case GDIMODE_EMULATED:
|
||||
if(lpRect) {
|
||||
// v2.03.55: the lpRect area must NOT be altered by the call
|
||||
// effect visible in partial updates of Deadlock 2 main menu buttons
|
||||
ScaledRect = *lpRect;
|
||||
dxw.MapClient(&ScaledRect);
|
||||
lpRect = &ScaledRect;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
RECT ScaledRect;
|
||||
if(dxw.IsFullScreen()) {
|
||||
switch(dxw.GDIEmulationMode){
|
||||
case GDIMODE_STRETCHED:
|
||||
case GDIMODE_SHAREDDC:
|
||||
case GDIMODE_EMULATED:
|
||||
if(lpRect) {
|
||||
// v2.03.55: the lpRect area must NOT be altered by the call
|
||||
// effect visible in partial updates of Deadlock 2 main menu buttons
|
||||
ScaledRect = *lpRect;
|
||||
dxw.MapClient(&ScaledRect);
|
||||
lpRect = &ScaledRect;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3694,6 +3696,22 @@ static HHOOK WINAPI extSetWindowsHookEx(SetWindowsHookEx_Type pSetWindowsHookEx,
|
||||
OutTraceDW("SetWindowsHookEx: fixing WH_KEYBOARD thread=0->%x\n", dwThreadId);
|
||||
}
|
||||
|
||||
// v2.04.13: "Starsiege" mouse control fix
|
||||
if((idHook == WH_CBT) && (dwThreadId == NULL)) {
|
||||
dwThreadId = GetCurrentThreadId();
|
||||
OutTraceDW("SetWindowsHookEx: fixing WH_CBT thread=0->%x\n", dwThreadId);
|
||||
}
|
||||
|
||||
// "Starsiege" .....
|
||||
//if((idHook == WH_MOUSE_LL) && (dwThreadId == NULL)) {
|
||||
// dwThreadId = GetCurrentThreadId();
|
||||
// OutTraceDW("SetWindowsHookEx: fixing WH_MOUSE_LL thread=0->%x\n", dwThreadId);
|
||||
//}
|
||||
//if((idHook == WH_KEYBOARD_LL) && (dwThreadId == NULL)) {
|
||||
// dwThreadId = GetCurrentThreadId();
|
||||
// OutTraceDW("SetWindowsHookEx: fixing WH_KEYBOARD_LL thread=0->%x\n", dwThreadId);
|
||||
//}
|
||||
|
||||
// v2.03.54: disable the disable Alt-Tab fix
|
||||
if((dxw.dwFlags7 & DISABLEDISABLEALTTAB) && (idHook == WH_KEYBOARD_LL)) {
|
||||
OutTraceDW("SetWindowsHookEx: DISABLEDISABLEALTTAB bypass active\n");
|
||||
|
BIN
proxy/d3d8.suo
BIN
proxy/d3d8.suo
Binary file not shown.
BIN
proxy/d3d9.suo
BIN
proxy/d3d9.suo
Binary file not shown.
BIN
proxy/ddraw.suo
BIN
proxy/ddraw.suo
Binary file not shown.
@ -37,26 +37,34 @@ void InitDxWnd(void)
|
||||
GetModuleFileNameA(NULL, target.path, MAX_PATH);
|
||||
|
||||
target.FakeVersionId = GetIntEntry("winver0", 0);
|
||||
target.flags = GetIntEntry("flag0", EMULATESURFACE|MODIFYMOUSE|USERGB565);
|
||||
target.flags2 = GetIntEntry("flagg0", WINDOWIZE|SETCOMPATIBILITY);
|
||||
target.flags3 = GetIntEntry("flagh0", HOOKDLLS|HOOKENABLED);
|
||||
target.flags4 = GetIntEntry("flagi0", SUPPORTSVGA);
|
||||
target.flags5 = GetIntEntry("flagj0", AEROBOOST|CENTERTOWIN);
|
||||
target.flags6 = GetIntEntry("flagk0", 0);
|
||||
target.tflags = GetIntEntry("tflag0", 0);
|
||||
target.posx = GetIntEntry("posx0", 0);
|
||||
target.posy = GetIntEntry("posy0", 0);
|
||||
target.sizx = GetIntEntry("sizx0", 0);
|
||||
target.sizy = GetIntEntry("sizy0", 0);
|
||||
target.coordinates = GetIntEntry("coord0", 1); // centered to desktop
|
||||
target.MaxFPS = GetIntEntry("maxfps0", 0);
|
||||
target.dxversion = GetIntEntry("ver0", 0);
|
||||
target.flags = GetIntEntry("flag0", EMULATESURFACE|MODIFYMOUSE|USERGB565);
|
||||
target.flags2 = GetIntEntry("flagg0", WINDOWIZE|SETCOMPATIBILITY);
|
||||
target.flags3 = GetIntEntry("flagh0", HOOKDLLS|HOOKENABLED);
|
||||
target.flags4 = GetIntEntry("flagi0", SUPPORTSVGA);
|
||||
target.flags5 = GetIntEntry("flagj0", AEROBOOST|CENTERTOWIN);
|
||||
target.flags6 = GetIntEntry("flagk0", 0);
|
||||
target.flags7 = GetIntEntry("flagl0", 0);
|
||||
target.flags8 = GetIntEntry("flagm0", 0);
|
||||
target.tflags = GetIntEntry("tflag0", 0);
|
||||
target.dflags = GetIntEntry("dflag0", 0);
|
||||
target.posx = GetIntEntry("posx0", 0);
|
||||
target.posy = GetIntEntry("posy0", 0);
|
||||
target.sizx = GetIntEntry("sizx0", 0);
|
||||
target.sizy = GetIntEntry("sizy0", 0);
|
||||
target.coordinates = GetIntEntry("coord0", 1); // centered to desktop
|
||||
target.MaxFPS = GetIntEntry("maxfps0", 0);
|
||||
target.dxversion = GetIntEntry("ver0", 0);
|
||||
if(target.dxversion > 1) target.dxversion += 5;
|
||||
target.FakeVersionId = GetIntEntry("winver0", 0);
|
||||
target.FakeVersionId= GetIntEntry("winver0", 0);
|
||||
target.MaxScreenRes = GetIntEntry("maxres0", 0);
|
||||
target.SwapEffect = GetIntEntry("swapeffect0", 0);
|
||||
target.InitTS = GetIntEntry("initts0", 0);
|
||||
|
||||
target.SwapEffect = GetIntEntry("swapeffect0", 0);
|
||||
target.InitTS = GetIntEntry("initts0", 0);
|
||||
target.monitorid = GetIntEntry("monitorid0", -1);
|
||||
target.resw = GetIntEntry("initresw0", 800);
|
||||
target.resh = GetIntEntry("initresh0", 600);
|
||||
target.MaxDdrawInterface = GetIntEntry("maxddinterface0", 7);
|
||||
target.ScanLine = GetIntEntry("scanline0", 0);
|
||||
|
||||
setTarget((TARGETMAP *)&target);
|
||||
startHook();
|
||||
}
|
||||
|
BIN
proxy/wing32.suo
BIN
proxy/wing32.suo
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user