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

v2_03_83_src

Former-commit-id: 7bf783475fa253dc8c03784753d23c56ce62f7e5
This commit is contained in:
gho tik 2016-04-09 12:47:04 -04:00 committed by Refael ACkermann
parent 959d7495ed
commit 06afb3514d
14 changed files with 59 additions and 61 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f94dedc2e7e5d4adf8a804d3f747f544a38b661c38967d375fa7efbd8d76bdab
oid sha256:ffb381fe04bba437bffb3771d0aef016931d9c10f751d7dea21a711537ccbd87
size 678400

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d58180de7cdd9e659b552b5da719e24163cc7db663fceb7c2fd1d8e71086df7c
oid sha256:ad75238bb04366e33af8a86a0cfb4c8fc760794f5029c2a194fe3af1615f901d
size 655360

View File

@ -7,9 +7,9 @@ ver0=0
coord0=0
flag0=134234150
flagg0=1207975952
flagh0=176
flagi0=0
tflag0=2
flagh0=144
flagi0=4194304
tflag0=0
initx0=0
inity0=0
minx0=0
@ -22,3 +22,17 @@ sizx0=800
sizy0=600
maxfps0=0
initts0=0
startfolder0=
launchpath0=
notes0=
registry0=
flagj0=0
flagk0=1048576
flagl0=0
flagm0=0
dflag0=0
winver0=0
maxres0=0
swapeffect0=0
maxddinterface0=7
slowratio0=1

View File

@ -1219,4 +1219,10 @@ fix: suppressed more capabilities when setting "Suppress overlay capability" fla
fix: fixed logic for ZBUFFER capabilities: "The Creed" seems to have two, one in SYSTEMMEMORY and one in VIDEOMEMORY...
fix: avoid setting cursor clipping when client area is returned with zero size.
fix: fixed CreateProcessA hooker for "suspended process" injection type to forward all parameters to the system call
add: added "Fix glBindTexture texture" flag to compensate for the missing glActiveTexture call. Fixes "bugdom" 2D panels.
add: added "Fix glBindTexture texture" flag to compensate for the missing glActiveTexture call. Fixes "bugdom" 2D panels.
v2.03.83
fix: cleared surface list on primary surface creation: "Daytona USA" keeps creating new primary surfaces, so it saturated the surface list.
fix: calling the proper GetGDISurface pointer in Lock wrapper
fix: HookProc routine causing crash with GTA3, fixed for Win7 and Win10
fix: LoadLibrayA/W after a SetWorkingDir invocation didn't load the local modules. Fixes "The Rage".

View File

@ -3152,6 +3152,7 @@ static HRESULT WINAPI extCreateSurface(int dxversion, CreateSurface_Type pCreate
// creation of the primary surface....
if(ddsd.dwFlags & DDSD_CAPS && ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE){
dxwss.ClearSurfaceList(); // v2.03.83: "Daytona USA" would saturate the list otherwise
SetVSyncDelays(dxversion, lpdd);
GetHookInfo()->Height=(short)dxw.GetScreenHeight();
GetHookInfo()->Width=(short)dxw.GetScreenWidth();
@ -4322,6 +4323,7 @@ static HRESULT WINAPI extLockDir(int dxversion, Lock_Type pLock, LPDIRECTDRAWSUR
POINT upleft={0,0};
LPDIRECTDRAWSURFACE lpDDSPrim;
Blt_Type pBlt;
GetGDISurface_Type pGetGDISurface;
// this hooker operates on
// Beware!!! for strange reason, the function gets hooked to ANY surface, also non primary ones!!!
@ -4337,17 +4339,16 @@ static HRESULT WINAPI extLockDir(int dxversion, Lock_Type pLock, LPDIRECTDRAWSUR
}
switch(dxversion){
case 1: pBlt=pBlt1; break;
case 2: pBlt=pBlt2; break;
case 3: pBlt=pBlt3; break;
case 4: pBlt=pBlt4; break;
case 7: pBlt=pBlt7; break;
case 1: pBlt=pBlt1; pGetGDISurface=pGetGDISurface1; break;
case 2: pBlt=pBlt2; pGetGDISurface=pGetGDISurface2; break;
case 4: pBlt=pBlt4; pGetGDISurface=pGetGDISurface4; break;
case 7: pBlt=pBlt7; pGetGDISurface=pGetGDISurface7; break;
}
// V2.02.43: Empire Earth does some test Lock operations apparently before the primary surface is created
if(lpPrimaryDD){
lpDDSPrim=0;
res2=(*pGetGDISurface1)(lpPrimaryDD, &lpDDSPrim);
res2=(*pGetGDISurface)(lpPrimaryDD, &lpDDSPrim);
if(res2)
OutTraceE("Lock: GetGDISurface ERROR res=%x(%s) at %d\n", res2, ExplainDDError(res2), __LINE__);
else

View File

@ -567,12 +567,17 @@ void SetHook(void *target, void *hookproc, void **hookedproc, char *hookname)
}
tmp=(void *)dwTmp;
if (*hookedproc && *hookedproc!=tmp) {
sprintf(msg,"SetHook: proc=%s oldhook=%x->%x newhook=%x\n", hookname, hookedproc, *(DWORD *)hookedproc, tmp);
OutTraceDW(msg);
if (IsAssertEnabled) MessageBox(0, msg, "SetHook", MB_OK | MB_ICONEXCLAMATION);
tmp = *hookedproc;
__try {
if (*hookedproc && (*hookedproc)!=tmp) {
sprintf(msg,"SetHook: proc=%s oldhook=%x->%x newhook=%x\n", hookname, hookedproc, *(DWORD *)hookedproc, tmp);
OutTraceDW(msg);
if (IsAssertEnabled) MessageBox(0, msg, "SetHook", MB_OK | MB_ICONEXCLAMATION);
// tmp = *hookedproc; -- commented out in v2.03.83, causing crash in GTA3
}
}
__except(EXCEPTION_EXECUTE_HANDLER){
OutTrace("SetHook: %s exception\n", hookname);
};
*hookedproc = tmp;
OutTraceH("SetHook: DEBUG2 *hookedproc=%x, name=%s\n", tmp, hookname);
}

Binary file not shown.

View File

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

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dxwnd", "dxwnd.vs2008.vcproj", "{579E7FE7-2745-4100-A802-23511711FCDE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{579E7FE7-2745-4100-A802-23511711FCDE}.Debug|Win32.ActiveCfg = Debug|Win32
{579E7FE7-2745-4100-A802-23511711FCDE}.Debug|Win32.Build.0 = Debug|Win32
{579E7FE7-2745-4100-A802-23511711FCDE}.Release|Win32.ActiveCfg = Release|Win32
{579E7FE7-2745-4100-A802-23511711FCDE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@ -296,7 +296,7 @@ static HookEntryEx_Type d3d9Hooks[]={
{HOOK_HOT_CANDIDATE, 0, "Direct3DCreate9", (FARPROC)NULL, (FARPROC *)&pDirect3DCreate9, (FARPROC)extDirect3DCreate9},
{HOOK_HOT_CANDIDATE, 0, "Direct3DCreate9Ex", (FARPROC)NULL, (FARPROC *)&pDirect3DCreate9Ex, (FARPROC)extDirect3DCreate9Ex},
{HOOK_HOT_CANDIDATE, 0, "CheckFullScreen", (FARPROC)NULL, (FARPROC *)&pCheckFullScreen, (FARPROC)extCheckFullScreen},
{HOOK_HOT_CANDIDATE, 0, "DisableD3DSpy", (FARPROC)NULL, (FARPROC *)&pDisableD3DSpy, (FARPROC)extDisableD3DSpy},
//{HOOK_HOT_CANDIDATE, 0, "DisableD3DSpy", (FARPROC)NULL, (FARPROC *)&pDisableD3DSpy, (FARPROC)extDisableD3DSpy},
{HOOK_HOT_CANDIDATE, 0, "D3DPERF_SetOptions", (FARPROC)NULL, (FARPROC *)&pD3DPERF_SetOptions, (FARPROC)extD3DPERF_SetOptions},
{HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator
};
@ -305,7 +305,7 @@ static HookEntryEx_Type d3d9Extra[]={
{HOOK_HOT_CANDIDATE, 0, "Direct3DShaderValidatorCreate9", (FARPROC)NULL, (FARPROC *)NULL, (FARPROC)voidDirect3DShaderValidatorCreate9},
{HOOK_HOT_CANDIDATE, 0, "DebugSetLevel", (FARPROC)NULL, (FARPROC *)NULL, (FARPROC)voidDebugSetLevel},
{HOOK_HOT_CANDIDATE, 0, "DebugSetMute", (FARPROC)NULL, (FARPROC *)NULL, (FARPROC)voidDebugSetMute},
{HOOK_HOT_CANDIDATE, 0, "DisableD3DSpy", (FARPROC)NULL, (FARPROC *)NULL, (FARPROC)voidDisableD3DSpy},
{HOOK_HOT_CANDIDATE, 0, "DisableD3DSpy", (FARPROC)NULL, (FARPROC *)NULL, (FARPROC)voidDisableD3DSpy},
{HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator
};

View File

@ -515,8 +515,20 @@ HMODULE WINAPI LoadLibraryExWrapper(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFl
{
HMODULE libhandle;
int idx;
libhandle=(*pLoadLibraryExA)(lpFileName, hFile, dwFlags);
// found in "The Rage" (1996): loading a module with relative path after a SetCurrentDirectory may fail, though
// the module is present in the current directory folder. To fix this problem in case of failure it is possible
// to retry the operation using a full pathname composed concatenating current dir and module filename.
if(!libhandle){
char lpBuffer[MAX_PATH+1];
GetCurrentDirectory(MAX_PATH, lpBuffer);
sprintf_s(lpBuffer, MAX_PATH, "%s/%s", lpBuffer, lpFileName);
OutTrace("GHODEBUG: fullpath=\"%s\"\n", lpBuffer);
libhandle=(*pLoadLibraryExA)(lpBuffer, hFile, dwFlags);
}
OutTraceDW("%s: FileName=%s hFile=%x Flags=%x(%s) hmodule=%x\n", api, lpFileName, hFile, dwFlags, ExplainLoadLibFlags(dwFlags), libhandle);
if(!libhandle){
OutTraceE("%s: ERROR FileName=%s err=%d\n", api, lpFileName, GetLastError());

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dxwndhost", "dxwndhost.vs2008.vcproj", "{FD0B0234-8EC5-43C0-A384-1B881DD3D925}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Debug|Win32.ActiveCfg = Debug|Win32
{FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Debug|Win32.Build.0 = Debug|Win32
{FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Release|Win32.ActiveCfg = Release|Win32
{FD0B0234-8EC5-43C0-A384-1B881DD3D925}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.