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

v2_02_08_src

Former-commit-id: ef29e4900bd82c0b51234bf0f5d138c6a932c270
This commit is contained in:
gho tik 2013-01-27 11:17:04 -05:00 committed by Refael ACkermann
parent ef5a5afd7a
commit 6c0296c0e4
20 changed files with 198 additions and 43 deletions

View File

@ -66,6 +66,7 @@
#define SHOWHWCURSOR 0x00080000 // mouse events are discarded (good for screensaver-like) #define SHOWHWCURSOR 0x00080000 // mouse events are discarded (good for screensaver-like)
#define HOOKGDI 0x00100000 // Hook GDI functions #define HOOKGDI 0x00100000 // Hook GDI functions
#define SHOWFPSOVERLAY 0x00200000 // shows FPS value to status win / log / screen overlay #define SHOWFPSOVERLAY 0x00200000 // shows FPS value to status win / log / screen overlay
#define FAKEVERSION 0x00400000 // pretends the platvorm is a given window version / subversion
// logging Tflags DWORD: // logging Tflags DWORD:
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general
@ -103,6 +104,7 @@ typedef struct TARGETMAP
short sizy; short sizy;
short MaxFPS; short MaxFPS;
short InitTS; short InitTS;
short FakeVersionId;
}TARGETMAP; }TARGETMAP;
typedef struct typedef struct

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b0ffe0f3143b439d28c1b4d7f195991b383f36ed919ba89aab0abf2de7c9481e oid sha256:42bf1dd1c3802f28d8bf51d0612a2a5df8e070e0218e2c15912e038ece52c5aa
size 271360 size 272384

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3d43f746689ac5abcadcfbbb0dbd302cc3d4186ce2df7aa8bd9c24eb1b8694d4 oid sha256:cb6552a857a81cef451a0851137395257ef958b967bc307ded9978abeb09b517
size 488960 size 488960

View File

@ -25,4 +25,8 @@ fixed buf on time stretch logging (and possible game crash).
revised GetDC handling with 8BPP paletized surfaces: avoided need to emulate reverse-blitting and got an impressive speed improvement for games such as Age of Empires I & II and Hyperblade. revised GetDC handling with 8BPP paletized surfaces: avoided need to emulate reverse-blitting and got an impressive speed improvement for games such as Age of Empires I & II and Hyperblade.
v2.02.07: v2.02.07:
many fixes on the FPS and time control features. many fixes on the FPS and time control features.
v2.02.08:
fixed some errors in the main directdraw palette descriptor. That gives better compatibility and less complicated source code.
added Fake Version feature: now Dungeon Keeper II (original version, not GOG hack) can detect a fake Win2000 / WinXP environment on Win7 and newer. Tested and working on Win7. Many thanks to Maxim for pushing me hard to win my lazyness and implement this new feature.

View File

@ -277,7 +277,7 @@ module16=
ver16=0 ver16=0
flag16=142606370 flag16=142606370
flagg16=1048576 flagg16=1048576
tflag16=3 tflag16=259
initx16=0 initx16=0
inity16=0 inity16=0
minx16=0 minx16=0
@ -1007,7 +1007,7 @@ path59=D:\Games\Dungeon Keeper 2 GOG release\DKII.EXE
module59= module59=
ver59=0 ver59=0
flag59=134217762 flag59=134217762
flagg59=81920 flagg59=4276224
tflag59=0 tflag59=0
initx59=0 initx59=0
inity59=0 inity59=0
@ -2945,8 +2945,8 @@ path173=D:\Games\TR2 Golden Mask\T2GOLD.EXE
module173= module173=
ver173=0 ver173=0
flag173=570688034 flag173=570688034
flagg173=0 flagg173=2179072
tflag173=258 tflag173=387
initx173=0 initx173=0
inity173=0 inity173=0
minx173=0 minx173=0
@ -3063,9 +3063,9 @@ title180=Urban Assault
path180=D:\Games\Urban Assault\UA.EXE path180=D:\Games\Urban Assault\UA.EXE
module180= module180=
ver180=0 ver180=0
flag180=-1610465246 flag180=671236130
flagg180=256 flagg180=256
tflag180=3 tflag180=259
initx180=0 initx180=0
inity180=0 inity180=0
minx180=0 minx180=0
@ -3745,9 +3745,9 @@ initts170=0
opengllib171= opengllib171=
initts171=0 initts171=0
opengllib172= opengllib172=
initts172=0 initts172=8
opengllib173= opengllib173=
initts173=0 initts173=8
opengllib174= opengllib174=
initts174=0 initts174=0
opengllib175= opengllib175=
@ -3960,3 +3960,23 @@ sizx197=800
sizy197=600 sizy197=600
maxfps197=0 maxfps197=0
initts197=0 initts197=0
title198=Doom 95
path198=D:\Games\Doom95\DOOM95.EXE
module198=
opengllib198=
ver198=0
flag198=134217762
flagg198=65536
tflag198=3
initx198=0
inity198=0
minx198=0
miny198=0
maxx198=0
maxy198=0
posx198=50
posy198=50
sizx198=800
sizy198=600
maxfps198=0
initts198=-9

View File

@ -39,7 +39,7 @@ static char *Flag2Names[32]={
"KEEPCURSORFIXED", "DISABLEGAMMARAMP", "DIFFERENTIALMOUSE", "FIXNCHITTEST", "KEEPCURSORFIXED", "DISABLEGAMMARAMP", "DIFFERENTIALMOUSE", "FIXNCHITTEST",
"LIMITFPS", "SKIPFPS", "SHOWFPS", "HIDEMULTIMONITOR", "LIMITFPS", "SKIPFPS", "SHOWFPS", "HIDEMULTIMONITOR",
"TIMESTRETCH", "HOOKOPENGL", "WALLPAPERMODE", "SHOWHWCURSOR", "TIMESTRETCH", "HOOKOPENGL", "WALLPAPERMODE", "SHOWHWCURSOR",
"HOOKGDI", "", "", "", "HOOKGDI", "SHOWFPSOVERLAY", "FAKEVERSION", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
}; };
@ -1035,6 +1035,14 @@ void HookSysLibs(char *module)
tmp = HookAPI(module, "winmm.dll", NULL, "timeGetTime", exttimeGetTime); tmp = HookAPI(module, "winmm.dll", NULL, "timeGetTime", exttimeGetTime);
if(tmp) ptimeGetTime = (timeGetTime_Type)tmp; if(tmp) ptimeGetTime = (timeGetTime_Type)tmp;
} }
if(dxw.dwFlags2 & FAKEVERSION){
tmp = HookAPI(module, "kernel32.dll", GetVersion, "GetVersion", extGetVersion);
if(tmp) pGetVersion = (GetVersion_Type)tmp;
tmp = HookAPI(module, "kernel32.dll", GetVersionEx, "GetVersionEx", extGetVersionEx);
if(tmp) pGetVersionEx = (GetVersionEx_Type)tmp;
}
return; return;
} }

View File

@ -54,6 +54,7 @@ void dxwCore::InitTarget(TARGETMAP *target)
TimeShift = target->InitTS; TimeShift = target->InitTS;
if(TimeShift < -8) TimeShift = -8; if(TimeShift < -8) TimeShift = -8;
if(TimeShift > 8) TimeShift = 8; if(TimeShift > 8) TimeShift = 8;
FakeVersionId = target->FakeVersionId;
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */

View File

@ -77,6 +77,7 @@ public: // simple data variables
WORD palVersion; WORD palVersion;
WORD palNumEntries; WORD palNumEntries;
PALETTEENTRY palPalEntry[256]; PALETTEENTRY palPalEntry[256];
short FakeVersionId;
// Implementation // Implementation
protected: protected:

View File

@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdio.h> #include <stdio.h>
#include "dxwnd.h" #include "dxwnd.h"
#define VERSION "2.02.06" #define VERSION "2.02.08"
LRESULT CALLBACK HookProc(int ncode, WPARAM wparam, LPARAM lparam); LRESULT CALLBACK HookProc(int ncode, WPARAM wparam, LPARAM lparam);

Binary file not shown.

View File

@ -3598,11 +3598,11 @@ ULONG WINAPI extReleaseD(LPDIRECTDRAW lpdd)
while(lpDDSEmu_Back->Release()); while(lpDDSEmu_Back->Release());
lpDDSEmu_Back=NULL; lpDDSEmu_Back=NULL;
} }
//if (lpDDSHDC) { if (lpDDP) {
// OutTraceD("Release(D): released lpDDSHDC=%x\n", lpDDSHDC); OutTraceD("Release(D): released lpDDP=%x\n", lpDDP);
// while(lpDDSHDC->Release()); while(lpDDP->Release());
// lpDDSHDC=NULL; lpDDP=NULL;
//} }
lpServiceDD = NULL; // v2.1.87 lpServiceDD = NULL; // v2.1.87
ref=0; // it should be .... ref=0; // it should be ....
} }
@ -3613,9 +3613,9 @@ ULONG WINAPI extReleaseD(LPDIRECTDRAW lpdd)
OutTraceD("Release(D): RefCount=0 - service object RESET condition\n"); OutTraceD("Release(D): RefCount=0 - service object RESET condition\n");
lpDDSEmu_Prim=NULL; lpDDSEmu_Prim=NULL;
lpDDSEmu_Back=NULL; lpDDSEmu_Back=NULL;
//lpDDSHDC=NULL;
lpDDC=NULL; lpDDC=NULL;
lpDDSBack=NULL; lpDDSBack=NULL;
lpDDP=NULL;
} }
} }
} }
@ -3756,15 +3756,14 @@ HRESULT WINAPI extReleaseP(LPDIRECTDRAWPALETTE lpddPalette)
// current palette (ref=0!) causing a game crash. The fix pretends that the palette // current palette (ref=0!) causing a game crash. The fix pretends that the palette
// was released when attempting the operation to the last object reference (LastRefCount==1) // was released when attempting the operation to the last object reference (LastRefCount==1)
// returning a ref 0 without actually releasing the object. // returning a ref 0 without actually releasing the object.
//v2.02.08: Better fix: to avoid the problem, just remember to NULL-ify the global main
// palette pointer lpDDP
ULONG ref; ULONG ref;
static int LastRefCount=-1;
OutTraceD("Release(P): lpddPalette=%x\n", lpddPalette);
if(LastRefCount==1) {
OutTraceD("Release(P): ASSERT lpddPalette=%x Release FIX returning 0\n", lpddPalette);
return 0;
}
ref=(*pReleaseP)(lpddPalette); ref=(*pReleaseP)(lpddPalette);
LastRefCount=ref;
OutTraceD("Release(P): lpddPalette=%x ref=%x\n", lpddPalette, ref); OutTraceD("Release(P): lpddPalette=%x ref=%x\n", lpddPalette, ref);
if(lpddPalette==lpDDP && ref==0){
OutTraceD("Release(P): clearing lpDDP=%x->NULL\n", lpDDP);
lpDDP=NULL;
}
return ref; return ref;
} }

View File

@ -2594,4 +2594,89 @@ int WINAPI extShowCursor(BOOL bShow)
ret=(*pShowCursor)(bShow); ret=(*pShowCursor)(bShow);
OutTraceD("ShowCursor: ret=%x\n", ret); OutTraceD("ShowCursor: ret=%x\n", ret);
return ret; return ret;
}
/*
From MSDN:
Operating system Version number dwMajorVersion dwMinorVersion Other
Windows 8 6.2 6 2 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2012 6.2 6 2 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
Windows 7 6.1 6 1 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2008 R2 6.1 6 1 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
Windows Server 2008 6.0 6 0 OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION
Windows Vista 6.0 6 0 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2003 R2 5.2 5 2 GetSystemMetrics(SM_SERVERR2) != 0
Windows Home Server 5.2 5 2 OSVERSIONINFOEX.wSuiteMask & VER_SUITE_WH_SERVER
Windows Server 2003 5.2 5 2 GetSystemMetrics(SM_SERVERR2) == 0
Windows XP Pro x64 Ed. 5.2 5 2 (OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION) && (SYSTEM_INFO.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64)
Windows XP 5.1 5 1 Not applicable
Windows 2000 5.0 5 0 Not applicable
*/
static struct {char bMajor; char bMinor; char *sName;} WinVersions[6]=
{
{5, 0, "Windows 2000"},
{5, 1, "Windows XP"},
{5, 2, "Windows Server 2003"},
{6, 0, "Windows Vista"},
{6, 1, "Windows 7"},
{6, 2, "Windows 8"}
};
BOOL WINAPI extGetVersionEx(LPOSVERSIONINFO lpVersionInfo)
{
BOOL ret;
ret=(*pGetVersionEx)(lpVersionInfo);
if(!ret) {
OutTraceE("GetVersionEx: ERROR err=%d\n", GetLastError());
return ret;
}
OutTraceD("GetVersionEx: version=%d.%d build=(%d)\n",
lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwBuildNumber);
if(dxw.dwFlags2 & FAKEVERSION) {
// fake Win XP build 0
lpVersionInfo->dwMajorVersion = WinVersions[dxw.FakeVersionId].bMajor;
lpVersionInfo->dwMinorVersion = WinVersions[dxw.FakeVersionId].bMinor;
lpVersionInfo->dwBuildNumber = 0;
OutTraceD("GetVersionEx: FIXED version=%d.%d build=(%d) os=\"%s\"\n",
lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwBuildNumber,
WinVersions[dxw.FakeVersionId].sName);
}
return TRUE;
}
DWORD WINAPI extGetVersion(void)
{
DWORD dwVersion;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuild = 0;
dwVersion = (*pGetVersion)();
// Get the Windows version.
dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
// Get the build number.
if (dwVersion < 0x80000000)
dwBuild = (DWORD)(HIWORD(dwVersion));
OutTraceD("GetVersion: version=%d.%d build=(%d)\n", dwMajorVersion, dwMinorVersion, dwBuild);
if(dxw.dwFlags2 & FAKEVERSION) {
dwVersion = WinVersions[dxw.FakeVersionId].bMajor | (WinVersions[dxw.FakeVersionId].bMinor << 8);
dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
dwBuild = (DWORD)(HIWORD(dwVersion));
OutTraceD("GetVersion: FIXED version=%d.%d build=(%d) os=\"%s\"\n",
dwMajorVersion, dwMinorVersion, dwBuild, WinVersions[dxw.FakeVersionId].sName);
}
return dwVersion;
} }

View File

@ -45,6 +45,8 @@ typedef FARPROC (WINAPI *GetProcAddress_Type)(HMODULE, LPCSTR);
typedef void (WINAPI *GetSystemTime_Type)(LPSYSTEMTIME); typedef void (WINAPI *GetSystemTime_Type)(LPSYSTEMTIME);
typedef void (WINAPI *GetSystemTimeAsFileTime_Type)(LPFILETIME); typedef void (WINAPI *GetSystemTimeAsFileTime_Type)(LPFILETIME);
typedef DWORD (WINAPI *GetTickCount_Type)(void); typedef DWORD (WINAPI *GetTickCount_Type)(void);
typedef DWORD (WINAPI *GetVersion_Type)(void);
typedef BOOL (WINAPI *GetVersionEx_Type)(LPOSVERSIONINFO);
typedef HMODULE (WINAPI *LoadLibraryA_Type)(LPCTSTR); typedef HMODULE (WINAPI *LoadLibraryA_Type)(LPCTSTR);
typedef HMODULE (WINAPI *LoadLibraryExA_Type)(LPCTSTR, HANDLE, DWORD); typedef HMODULE (WINAPI *LoadLibraryExA_Type)(LPCTSTR, HANDLE, DWORD);
typedef LPTOP_LEVEL_EXCEPTION_FILTER typedef LPTOP_LEVEL_EXCEPTION_FILTER
@ -145,6 +147,8 @@ DXWEXTERN GetProcAddress_Type pGetProcAddress DXWINITIALIZED;
DXWEXTERN GetSystemTime_Type pGetSystemTime DXWINITIALIZED; DXWEXTERN GetSystemTime_Type pGetSystemTime DXWINITIALIZED;
DXWEXTERN GetSystemTimeAsFileTime_Type pGetSystemTimeAsFileTime DXWINITIALIZED; DXWEXTERN GetSystemTimeAsFileTime_Type pGetSystemTimeAsFileTime DXWINITIALIZED;
DXWEXTERN GetTickCount_Type pGetTickCount DXWINITIALIZED; DXWEXTERN GetTickCount_Type pGetTickCount DXWINITIALIZED;
DXWEXTERN GetVersion_Type pGetVersion DXWINITIALIZED;
DXWEXTERN GetVersionEx_Type pGetVersionEx DXWINITIALIZED;
DXWEXTERN LoadLibraryA_Type pLoadLibraryA DXWINITIALIZED; DXWEXTERN LoadLibraryA_Type pLoadLibraryA DXWINITIALIZED;
DXWEXTERN LoadLibraryExA_Type pLoadLibraryExA DXWINITIALIZED; DXWEXTERN LoadLibraryExA_Type pLoadLibraryExA DXWINITIALIZED;
DXWEXTERN SetUnhandledExceptionFilter_Type pSetUnhandledExceptionFilter DXWINITIALIZED; DXWEXTERN SetUnhandledExceptionFilter_Type pSetUnhandledExceptionFilter DXWINITIALIZED;
@ -238,6 +242,8 @@ extern FARPROC WINAPI extGetProcAddress(HMODULE, LPCSTR);
extern void WINAPI extGetSystemTime(LPSYSTEMTIME); extern void WINAPI extGetSystemTime(LPSYSTEMTIME);
extern void WINAPI extGetSystemTimeAsFileTime(LPFILETIME); extern void WINAPI extGetSystemTimeAsFileTime(LPFILETIME);
extern DWORD WINAPI extGetTickCount(void); extern DWORD WINAPI extGetTickCount(void);
extern DWORD WINAPI extGetVersion(void);
extern BOOL WINAPI extGetVersionEx(LPOSVERSIONINFO);
extern HMODULE WINAPI extLoadLibraryA(LPCTSTR); extern HMODULE WINAPI extLoadLibraryA(LPCTSTR);
extern HMODULE WINAPI extLoadLibraryExA(LPCTSTR, HANDLE, DWORD); extern HMODULE WINAPI extLoadLibraryExA(LPCTSTR, HANDLE, DWORD);
extern LPTOP_LEVEL_EXCEPTION_FILTER WINAPI extSetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER); extern LPTOP_LEVEL_EXCEPTION_FILTER WINAPI extSetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER);

View File

@ -120,9 +120,11 @@
#define IDC_WALLPAPERMODE 1081 #define IDC_WALLPAPERMODE 1081
#define IDC_HOOKGDI 1082 #define IDC_HOOKGDI 1082
#define IDC_SHOWFPSOVERLAY 1083 #define IDC_SHOWFPSOVERLAY 1083
#define IDC_FAKEVERSION 1084
#define IDC_COMBOTS 1085 #define IDC_COMBOTS 1085
#define IDC_LIST2 1088 #define IDC_LIST2 1088
#define IDC_LISTTS 1088 #define IDC_LISTTS 1088
#define IDC_LISTFAKE 1089
#define ID_MODIFY 32771 #define ID_MODIFY 32771
#define ID_DELETE 32772 #define ID_DELETE 32772
#define ID_ADD 32773 #define ID_ADD 32773

View File

@ -82,6 +82,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_ShowFPSOverlay = FALSE; m_ShowFPSOverlay = FALSE;
m_TimeStretch = FALSE; m_TimeStretch = FALSE;
m_HookOpenGL = FALSE; m_HookOpenGL = FALSE;
m_FakeVersion = FALSE;
m_InitX = 0; m_InitX = 0;
m_InitY = 0; m_InitY = 0;
m_MaxX = 0; m_MaxX = 0;
@ -114,18 +115,31 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
// pEdit->SetReadOnly(!bEnable); // pEdit->SetReadOnly(!bEnable);
//} //}
static struct {char bMajor; char bMinor; char *sName;} WinVersions[6]=
{
{5, 0, "Windows 2000"},
{5, 1, "Windows XP"},
{5, 2, "Windows Server 2003"},
{6, 0, "Windows Vista"},
{6, 1, "Windows 7"},
{6, 2, "Windows 8"}
};
BOOL CTargetDlg::OnInitDialog() BOOL CTargetDlg::OnInitDialog()
{ {
CListBox *TSList; CListBox *List;
CDialog::OnInitDialog(); CDialog::OnInitDialog();
int i; int i;
extern char *GetTSCaption(int); extern char *GetTSCaption(int);
//MessageBoxEx(0, "Init Dialog", "Warning", MB_OK | MB_ICONEXCLAMATION, NULL); List=(CListBox *)this->GetDlgItem(IDC_LISTTS);
TSList=(CListBox *)this->GetDlgItem(IDC_LISTTS); List->ResetContent();
TSList->ResetContent(); for(i=-8; i<=8; i++) List->AddString(GetTSCaption(i));
for(i=-8; i<=8; i++) TSList->AddString(GetTSCaption(i)); List->SetCurSel(m_InitTS);
TSList->SetCurSel(m_InitTS); List=(CListBox *)this->GetDlgItem(IDC_LISTFAKE);
List->ResetContent();
for(i=0; i<6; i++) List->AddString(WinVersions[i].sName);
List->SetCurSel(m_FakeVersion);
return TRUE; return TRUE;
} }
@ -199,6 +213,7 @@ void CTargetDlg::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_SHOWFPSOVERLAY, m_ShowFPSOverlay); DDX_Check(pDX, IDC_SHOWFPSOVERLAY, m_ShowFPSOverlay);
DDX_Check(pDX, IDC_TIMESTRETCH, m_TimeStretch); DDX_Check(pDX, IDC_TIMESTRETCH, m_TimeStretch);
DDX_Check(pDX, IDC_HOOKOPENGL, m_HookOpenGL); DDX_Check(pDX, IDC_HOOKOPENGL, m_HookOpenGL);
DDX_Check(pDX, IDC_FAKEVERSION, m_FakeVersion);
DDX_Text(pDX, IDC_INITX, m_InitX); DDX_Text(pDX, IDC_INITX, m_InitX);
DDX_Text(pDX, IDC_INITY, m_InitY); DDX_Text(pDX, IDC_INITY, m_InitY);
DDX_Text(pDX, IDC_MAXX, m_MaxX); DDX_Text(pDX, IDC_MAXX, m_MaxX);
@ -212,6 +227,7 @@ void CTargetDlg::DoDataExchange(CDataExchange* pDX)
DDX_Text(pDX, IDC_MAXFPS, m_MaxFPS); DDX_Text(pDX, IDC_MAXFPS, m_MaxFPS);
//DDX_Text(pDX, IDC_INITTS, m_InitTS); //DDX_Text(pDX, IDC_INITTS, m_InitTS);
DDX_LBIndex(pDX, IDC_LISTTS, m_InitTS); DDX_LBIndex(pDX, IDC_LISTTS, m_InitTS);
DDX_LBIndex(pDX, IDC_LISTFAKE, m_FakeVersionId);
//}}AFX_DATA_MAP //}}AFX_DATA_MAP
} }

View File

@ -87,6 +87,7 @@ public:
BOOL m_ShowFPSOverlay; BOOL m_ShowFPSOverlay;
BOOL m_TimeStretch; BOOL m_TimeStretch;
BOOL m_HookOpenGL; BOOL m_HookOpenGL;
BOOL m_FakeVersion;
int m_InitX; int m_InitX;
int m_InitY; int m_InitY;
int m_MaxX; int m_MaxX;
@ -99,6 +100,7 @@ public:
int m_SizY; int m_SizY;
int m_MaxFPS; int m_MaxFPS;
int m_InitTS; int m_InitTS;
int m_FakeVersionId;
//}}AFX_DATA //}}AFX_DATA

Binary file not shown.

View File

@ -298,15 +298,15 @@ BEGIN
CONTROL "Limit available resources",IDC_LIMITRESOURCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,184,93,10 CONTROL "Limit available resources",IDC_LIMITRESOURCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,184,93,10
CONTROL "Force win resize",IDC_FORCEWINRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,134,98,9 CONTROL "Force win resize",IDC_FORCEWINRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,134,98,9
CONTROL "fix WM_NCHITTEST",IDC_FIXNCHITTEST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,94,98,9 CONTROL "fix WM_NCHITTEST",IDC_FIXNCHITTEST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,94,98,9
CONTROL "Limit",IDC_LIMITFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,98,28,9 CONTROL "Limit",IDC_LIMITFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,112,28,9
EDITTEXT IDC_MAXFPS,635,101,26,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT EDITTEXT IDC_MAXFPS,635,115,26,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "Skip",IDC_SKIPFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,108,27,9 CONTROL "Skip",IDC_SKIPFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,122,27,9
LTEXT "delay (msec)",IDC_STATIC,591,103,43,8 LTEXT "delay (msec)",IDC_STATIC,591,117,43,8
GROUPBOX "Frame per Second",IDC_STATIC,549,84,120,86 GROUPBOX "Frame per Second",IDC_STATIC,549,102,120,68
CONTROL "Show FPS on title",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,120,72,9 CONTROL "Show FPS on title",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,134,72,9
GROUPBOX "",IDC_STATIC,555,94,110,24 GROUPBOX "",IDC_STATIC,555,108,110,24
CONTROL "Hide multi-monitor config.",IDC_HIDEMULTIMONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,144,98,9 CONTROL "Hide multi-monitor config.",IDC_HIDEMULTIMONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,433,144,98,9
CONTROL "Time Stretch - initial:",IDC_TIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,140,75,9 CONTROL "Time Stretch - initial:",IDC_TIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,154,75,9
GROUPBOX "OpenGL",IDC_STATIC,549,3,120,50 GROUPBOX "OpenGL",IDC_STATIC,549,3,120,50
CONTROL "Hook OpenGL",IDC_HOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,14,98,9 CONTROL "Hook OpenGL",IDC_HOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,14,98,9
EDITTEXT IDC_OPENGLLIB,554,36,108,12,ES_AUTOHSCROLL EDITTEXT IDC_OPENGLLIB,554,36,108,12,ES_AUTOHSCROLL
@ -316,8 +316,11 @@ BEGIN
GROUPBOX "GDI Handling",IDC_STATIC,172,144,120,62 GROUPBOX "GDI Handling",IDC_STATIC,172,144,120,62
CONTROL "Hook GDI",IDC_HOOKGDI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,154,102,9 CONTROL "Hook GDI",IDC_HOOKGDI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,154,102,9
CONTROL "Disable setting gamma ramp",IDC_DISABLEGAMMARAMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,174,102,9 CONTROL "Disable setting gamma ramp",IDC_DISABLEGAMMARAMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,174,102,9
CONTROL "Show FPS overlay",IDC_SHOWFPSOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,130,72,9 CONTROL "Show FPS overlay",IDC_SHOWFPSOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,557,144,72,9
LISTBOX IDC_LISTTS,635,131,26,27,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LISTBOX IDC_LISTTS,635,135,26,27,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Fake Version",IDC_STATIC,551,55,118,44
CONTROL "",IDC_FAKEVERSION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,558,74,10,9
LISTBOX IDC_LISTFAKE,577,67,84,27,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END END
IDD_STATUS DIALOGEX 0, 0, 186, 95 IDD_STATUS DIALOGEX 0, 0, 186, 95

Binary file not shown.

View File

@ -432,6 +432,7 @@ void CDxwndhostView::OnModify()
dlg.m_ShowFPSOverlay = TargetMaps[i].flags2 & SHOWFPSOVERLAY ? 1 : 0; dlg.m_ShowFPSOverlay = TargetMaps[i].flags2 & SHOWFPSOVERLAY ? 1 : 0;
dlg.m_TimeStretch = TargetMaps[i].flags2 & TIMESTRETCH ? 1 : 0; dlg.m_TimeStretch = TargetMaps[i].flags2 & TIMESTRETCH ? 1 : 0;
dlg.m_HookOpenGL = TargetMaps[i].flags2 & HOOKOPENGL ? 1 : 0; dlg.m_HookOpenGL = TargetMaps[i].flags2 & HOOKOPENGL ? 1 : 0;
dlg.m_FakeVersion = TargetMaps[i].flags2 & FAKEVERSION ? 1 : 0;
dlg.m_InitX = TargetMaps[i].initx; dlg.m_InitX = TargetMaps[i].initx;
dlg.m_InitY = TargetMaps[i].inity; dlg.m_InitY = TargetMaps[i].inity;
dlg.m_MinX = TargetMaps[i].minx; dlg.m_MinX = TargetMaps[i].minx;
@ -444,6 +445,7 @@ void CDxwndhostView::OnModify()
dlg.m_SizY = TargetMaps[i].sizy; dlg.m_SizY = TargetMaps[i].sizy;
dlg.m_MaxFPS = TargetMaps[i].MaxFPS; dlg.m_MaxFPS = TargetMaps[i].MaxFPS;
dlg.m_InitTS = TargetMaps[i].InitTS+8; dlg.m_InitTS = TargetMaps[i].InitTS+8;
dlg.m_FakeVersionId = TargetMaps[i].FakeVersionId;
if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){ if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){
strcpy_s(TargetMaps[i].path, sizeof(TargetMaps[i].path), dlg.m_FilePath); strcpy_s(TargetMaps[i].path, sizeof(TargetMaps[i].path), dlg.m_FilePath);
strcpy_s(TargetMaps[i].module, sizeof(TargetMaps[i].module), dlg.m_Module); strcpy_s(TargetMaps[i].module, sizeof(TargetMaps[i].module), dlg.m_Module);
@ -529,6 +531,7 @@ void CDxwndhostView::OnModify()
if(dlg.m_ShowFPSOverlay) TargetMaps[i].flags2 |= SHOWFPSOVERLAY; if(dlg.m_ShowFPSOverlay) TargetMaps[i].flags2 |= SHOWFPSOVERLAY;
if(dlg.m_TimeStretch) TargetMaps[i].flags2 |= TIMESTRETCH; if(dlg.m_TimeStretch) TargetMaps[i].flags2 |= TIMESTRETCH;
if(dlg.m_HookOpenGL) TargetMaps[i].flags2 |= HOOKOPENGL; if(dlg.m_HookOpenGL) TargetMaps[i].flags2 |= HOOKOPENGL;
if(dlg.m_FakeVersion) TargetMaps[i].flags2 |= FAKEVERSION;
TargetMaps[i].initx = dlg.m_InitX; TargetMaps[i].initx = dlg.m_InitX;
TargetMaps[i].inity = dlg.m_InitY; TargetMaps[i].inity = dlg.m_InitY;
TargetMaps[i].minx = dlg.m_MinX; TargetMaps[i].minx = dlg.m_MinX;
@ -541,6 +544,7 @@ void CDxwndhostView::OnModify()
TargetMaps[i].sizy = dlg.m_SizY; TargetMaps[i].sizy = dlg.m_SizY;
TargetMaps[i].MaxFPS = dlg.m_MaxFPS; TargetMaps[i].MaxFPS = dlg.m_MaxFPS;
TargetMaps[i].InitTS = dlg.m_InitTS-8; TargetMaps[i].InitTS = dlg.m_InitTS-8;
TargetMaps[i].FakeVersionId = dlg.m_FakeVersionId;
strcpy_s(TargetMaps[i].module, sizeof(TargetMaps[i].module), dlg.m_Module); strcpy_s(TargetMaps[i].module, sizeof(TargetMaps[i].module), dlg.m_Module);
strcpy_s(TargetMaps[i].OpenGLLib, sizeof(TargetMaps[i].OpenGLLib), dlg.m_OpenGLLib); strcpy_s(TargetMaps[i].OpenGLLib, sizeof(TargetMaps[i].OpenGLLib), dlg.m_OpenGLLib);
strcpy_s(TitleMaps[i].title, sizeof(TitleMaps[i].title), dlg.m_Title); strcpy_s(TitleMaps[i].title, sizeof(TitleMaps[i].title), dlg.m_Title);
@ -819,6 +823,7 @@ void CDxwndhostView::OnAdd()
if(dlg.m_ShowFPSOverlay) TargetMaps[i].flags2 |= SHOWFPSOVERLAY; if(dlg.m_ShowFPSOverlay) TargetMaps[i].flags2 |= SHOWFPSOVERLAY;
if(dlg.m_TimeStretch) TargetMaps[i].flags2 |= TIMESTRETCH; if(dlg.m_TimeStretch) TargetMaps[i].flags2 |= TIMESTRETCH;
if(dlg.m_HookOpenGL) TargetMaps[i].flags2 |= HOOKOPENGL; if(dlg.m_HookOpenGL) TargetMaps[i].flags2 |= HOOKOPENGL;
if(dlg.m_FakeVersion) TargetMaps[i].flags2 |= FAKEVERSION;
TargetMaps[i].initx = dlg.m_InitX; TargetMaps[i].initx = dlg.m_InitX;
TargetMaps[i].inity = dlg.m_InitY; TargetMaps[i].inity = dlg.m_InitY;
TargetMaps[i].minx = dlg.m_MinX; TargetMaps[i].minx = dlg.m_MinX;
@ -830,6 +835,7 @@ void CDxwndhostView::OnAdd()
TargetMaps[i].sizx = dlg.m_SizX; TargetMaps[i].sizx = dlg.m_SizX;
TargetMaps[i].sizy = dlg.m_SizY; TargetMaps[i].sizy = dlg.m_SizY;
TargetMaps[i].MaxFPS = dlg.m_MaxFPS; TargetMaps[i].MaxFPS = dlg.m_MaxFPS;
TargetMaps[i].FakeVersionId = dlg.m_FakeVersionId;
if (dlg.m_InitTS>=-8 && dlg.m_InitTS<=8) if (dlg.m_InitTS>=-8 && dlg.m_InitTS<=8)
TargetMaps[i].InitTS = dlg.m_InitTS-8; TargetMaps[i].InitTS = dlg.m_InitTS-8;
else else