mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_03_69_src
Former-commit-id: 4f4cf2e5e767eebd57c07acb242cb4f7d131fa8f
This commit is contained in:
parent
82aec03bcd
commit
8425298274
@ -223,7 +223,7 @@
|
|||||||
#define BLOCKPRIORITYCLASS 0x00000020 // blocks attempts to change the process priority class
|
#define BLOCKPRIORITYCLASS 0x00000020 // blocks attempts to change the process priority class
|
||||||
#define CPUSLOWDOWN 0x00000040 // reduces CPU time dedicated to non time critical threads
|
#define CPUSLOWDOWN 0x00000040 // reduces CPU time dedicated to non time critical threads
|
||||||
#define CPUMAXUSAGE 0x00000080 // reduces CPU time to non time critical threads that consume more than the given ratio
|
#define CPUMAXUSAGE 0x00000080 // reduces CPU time to non time critical threads that consume more than the given ratio
|
||||||
|
#define NOWINERRORS 0x00000100 // suppress some possible window errors returning OK also in case of failure
|
||||||
// eighth flags DWORD dxw.dwFlags8:
|
// eighth flags DWORD dxw.dwFlags8:
|
||||||
|
|
||||||
// logging Tflags DWORD:
|
// logging Tflags DWORD:
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:3c7dbfc11581e871c2b2611baad8c24e7e904c1264771fbddf1ae438805b6817
|
oid sha256:c7943551fe966c9338314466a778a5b8116dbf776047162959a1403ad895a167
|
||||||
size 651776
|
size 652800
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a0ffb89088ea50da7077abb29aa298d730841a13f2a8b0e9882b088e0a8290c6
|
oid sha256:1dfdcf69403a93563f73c0f77084c8c054b570c2c2681aa1323aa5d7d0c70ae0
|
||||||
size 568320
|
size 568320
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[target]
|
[target]
|
||||||
title0=Microsoft Golf '98 trial (win)
|
title0=Microsoft Golf 1998 Edition
|
||||||
path0=D:\Games\MSGolf98\MSGOLF98\GAME.EXE
|
path0=D:\Games\Microsoft Golf 1998 Edition\game.exe
|
||||||
launchpath0=
|
launchpath0=
|
||||||
module0=
|
module0=
|
||||||
opengllib0=
|
opengllib0=
|
||||||
@ -13,10 +13,11 @@ flagg0=-671088640
|
|||||||
flagh0=1302
|
flagh0=1302
|
||||||
flagi0=1212547076
|
flagi0=1212547076
|
||||||
flagj0=4224
|
flagj0=4224
|
||||||
flagk0=67436544
|
flagk0=327680
|
||||||
flagl0=4
|
flagl0=260
|
||||||
flagm0=0
|
flagm0=0
|
||||||
tflag0=0
|
tflag0=0
|
||||||
|
dflag0=0
|
||||||
posx0=50
|
posx0=50
|
||||||
posy0=50
|
posy0=50
|
||||||
sizx0=0
|
sizx0=0
|
||||||
@ -27,3 +28,4 @@ winver0=0
|
|||||||
maxres0=-1
|
maxres0=-1
|
||||||
swapeffect0=0
|
swapeffect0=0
|
||||||
maxddinterface0=7
|
maxddinterface0=7
|
||||||
|
slowratio0=1
|
31
build/exports/Microsoft Golf 1999 Edition.dxw
Normal file
31
build/exports/Microsoft Golf 1999 Edition.dxw
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[target]
|
||||||
|
title0=Microsoft Golf 1999 Edition
|
||||||
|
path0=D:\Games\Microsoft Golf 1999 Edition\game.exe
|
||||||
|
launchpath0=
|
||||||
|
module0=
|
||||||
|
opengllib0=
|
||||||
|
notes0=
|
||||||
|
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\MSGolf98\\MSGOLF98"\n"InstallType"="1"\n"InstallPath"="D:\\Games\\MSGolf98\\MSGOLF98\\"\n"CDPath"="D:\\Games\\MSGolf98\\MSGOLF98"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\MSGolf98\\MSGOLF98"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009\n
|
||||||
|
ver0=0
|
||||||
|
coord0=0
|
||||||
|
flag0=136314914
|
||||||
|
flagg0=-671088640
|
||||||
|
flagh0=1302
|
||||||
|
flagi0=1212547076
|
||||||
|
flagj0=4224
|
||||||
|
flagk0=327680
|
||||||
|
flagl0=260
|
||||||
|
flagm0=0
|
||||||
|
tflag0=0
|
||||||
|
dflag0=0
|
||||||
|
posx0=50
|
||||||
|
posy0=50
|
||||||
|
sizx0=0
|
||||||
|
sizy0=0
|
||||||
|
maxfps0=0
|
||||||
|
initts0=0
|
||||||
|
winver0=0
|
||||||
|
maxres0=-1
|
||||||
|
swapeffect0=0
|
||||||
|
maxddinterface0=7
|
||||||
|
slowratio0=1
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Miscrosoft Golf '98 Trial
|
|
||||||
path0=D:\Games\msgolf\Golf '98 Trial\game.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"InstallType"="1"\n"InstalledPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"CDPath"="D:\\Games\\msgolf\\Golf '98 Trial\\"\n"ITF File Path"="D:\\Games\\msgolf\\Golf '98 Trial\\golf.itf"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\msgolf\\Golf '98 Trial"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009\n\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games]\n[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Golf '98]\n[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Golf '98\Version 1.0 Demo]\n"AppPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"InstallType"="1"\n"InstalledPath"="D:\\Games\\msgolf\\Golf '98 Trial"\n"CDPath"="D:\\Games\\msgolf\\Golf '98 Trial\\"\n"ITF File Path"="D:\\Games\\msgolf\\Golf '98 Trial\\golf.itf"\n"Launched"="1"\n"PID"=""\n"Path"="D:\\Games\\msgolf\\Golf '98 Trial"\n"VersionType"="TrialVersion"\n"InstalledGroup"="1"\n"LangID"=dword:00000009
|
|
||||||
ver0=0
|
|
||||||
coord0=0
|
|
||||||
flag0=2101474
|
|
||||||
flagg0=1476395016
|
|
||||||
flagh0=1044
|
|
||||||
flagi0=1210187780
|
|
||||||
flagj0=128
|
|
||||||
flagk0=327680
|
|
||||||
flagl0=4
|
|
||||||
flagm0=0
|
|
||||||
tflag0=0
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=880
|
|
||||||
sizy0=660
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=0
|
|
@ -1110,4 +1110,10 @@ fix: GUI placement coordinates are not saved when terminating in minimized or ma
|
|||||||
|
|
||||||
v2.03.68
|
v2.03.68
|
||||||
add: options to limit the cpu usage of program threads, either inconditionally ("CPU slow down") or only for CPU consuming threads ("CPU max usage").
|
add: options to limit the cpu usage of program threads, either inconditionally ("CPU slow down") or only for CPU consuming threads ("CPU max usage").
|
||||||
fix: some logging details
|
fix: some logging details
|
||||||
|
|
||||||
|
v2.03.69
|
||||||
|
fix: fixed "CPU max usage" option
|
||||||
|
fix: WindowFromPoint & WindowFromPointEx hooks
|
||||||
|
fix: recovered partilly working implementation of "shared dc" mode
|
||||||
|
add: "Suppress Win errors" option, needed to skip a blocking error and make "Migrosoft Golf '98" starting
|
||||||
|
272
dll/cpulimit.cpp
272
dll/cpulimit.cpp
@ -31,7 +31,6 @@ DWORD WINAPI CpuLimit(LPVOID lpThreadParameter)
|
|||||||
OutTrace("starting CPULimit dwOwnerPID=%x Ratio=1:%d\n", dwOwnerPID, iSlowDownRatio);
|
OutTrace("starting CPULimit dwOwnerPID=%x Ratio=1:%d\n", dwOwnerPID, iSlowDownRatio);
|
||||||
if(!dwOwnerPID) return FALSE;
|
if(!dwOwnerPID) return FALSE;
|
||||||
if(iSlowDownRatio < 1) return FALSE;
|
if(iSlowDownRatio < 1) return FALSE;
|
||||||
//while(TRUE)
|
|
||||||
return LimitCpuUsage(dwOwnerPID, dwOwnerThread, iSlowDownRatio);
|
return LimitCpuUsage(dwOwnerPID, dwOwnerThread, iSlowDownRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,12 +62,13 @@ BOOL SlowCpuSpeed(DWORD dwOwnerPID, DWORD dwOwnerThread, int iSlowDownRatio)
|
|||||||
// and stop each low-priority thread
|
// and stop each low-priority thread
|
||||||
iThreadIndex = 0;
|
iThreadIndex = 0;
|
||||||
do {
|
do {
|
||||||
if((te32.th32OwnerProcessID == dwOwnerPID) && (te32.th32ThreadID != dwOwnerThread)){
|
if( (te32.th32OwnerProcessID == dwOwnerPID) &&
|
||||||
if (te32.tpBasePri < THREAD_PRIORITY_TIME_CRITICAL) {
|
(te32.th32ThreadID != dwOwnerThread) &&
|
||||||
HANDLE hThread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, te32.th32ThreadID);
|
(te32.tpBasePri < THREAD_PRIORITY_TIME_CRITICAL)) {
|
||||||
SuspendThread(hThread);
|
|
||||||
SuspThreads[iThreadIndex++] = hThread;
|
HANDLE hThread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, te32.th32ThreadID);
|
||||||
}
|
SuspendThread(hThread);
|
||||||
|
SuspThreads[iThreadIndex++] = hThread;
|
||||||
}
|
}
|
||||||
} while(Thread32Next(hThreadSnap, &te32) && (iThreadIndex<MAX_THREAD_ARRAY));
|
} while(Thread32Next(hThreadSnap, &te32) && (iThreadIndex<MAX_THREAD_ARRAY));
|
||||||
iNumThreads = iThreadIndex;
|
iNumThreads = iThreadIndex;
|
||||||
@ -92,149 +92,195 @@ BOOL SlowCpuSpeed(DWORD dwOwnerPID, DWORD dwOwnerThread, int iSlowDownRatio)
|
|||||||
typedef struct{
|
typedef struct{
|
||||||
DWORD tid;
|
DWORD tid;
|
||||||
HANDLE hThread;
|
HANDLE hThread;
|
||||||
//ULARGE_INTEGER LastUsed;
|
FILETIME LastUsed;
|
||||||
DWORD LastUsed;
|
|
||||||
signed long DeltaUsed;
|
signed long DeltaUsed;
|
||||||
BOOL Suspended;
|
BOOL Suspended;
|
||||||
} ThreadDesc_Type;
|
} ThreadDesc_Type;
|
||||||
|
|
||||||
#define DELTA_TIME 2
|
static FILETIME FTFTSUM(FILETIME a, FILETIME b)
|
||||||
|
{
|
||||||
|
FILETIME s;
|
||||||
|
s.dwHighDateTime = a.dwHighDateTime + b.dwHighDateTime;
|
||||||
|
__try{ s.dwLowDateTime = a.dwLowDateTime + b.dwLowDateTime;}
|
||||||
|
__except (EXCEPTION_EXECUTE_HANDLER){ s.dwHighDateTime += 1; }; // add reminder on overflow
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
static FILETIME FTDWSUM(FILETIME a, DWORD b)
|
||||||
|
{
|
||||||
|
FILETIME s;
|
||||||
|
s.dwHighDateTime = a.dwHighDateTime;
|
||||||
|
__try{ s.dwLowDateTime = a.dwLowDateTime + b;}
|
||||||
|
__except (EXCEPTION_EXECUTE_HANDLER){ s.dwHighDateTime += 1; }; // add reminder on overflow
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DWORD DWDIFF(FILETIME a, FILETIME b)
|
||||||
|
{
|
||||||
|
// we suppose that the difference can't be greater to 2^sizeof(DWORD), so
|
||||||
|
// dwHighDateTime values are either identical or 1 greater
|
||||||
|
DWORD d;
|
||||||
|
if(a.dwHighDateTime == a.dwHighDateTime)
|
||||||
|
d = a.dwLowDateTime - b.dwLowDateTime;
|
||||||
|
else
|
||||||
|
d = b.dwLowDateTime - a.dwLowDateTime;
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
//#define DEBUGTRACE 1
|
||||||
|
|
||||||
|
static BOOL RefreshThreadList(int *iNumThreads, ThreadDesc_Type ProcessThreads[], DWORD dwOwnerPID, DWORD dwOwnerThread)
|
||||||
|
{
|
||||||
|
THREADENTRY32 te32;
|
||||||
|
HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
|
||||||
|
int iThreadIndex;
|
||||||
|
FILETIME CreationTime, ExitTime, KernelTime, UserTime;
|
||||||
|
|
||||||
|
OutTrace("LimitCpuUsage: refreshing thread list\n");
|
||||||
|
te32.dwSize = sizeof(THREADENTRY32);
|
||||||
|
|
||||||
|
// Take a snapshot of all running threads
|
||||||
|
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
||||||
|
if(hThreadSnap == INVALID_HANDLE_VALUE) {
|
||||||
|
OutTrace("LimitCpuUsage: CreateToolhelp32Snapshot ERROR err=%d\n", GetLastError());
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve information about the first thread, and exit if unsuccessful
|
||||||
|
if(!Thread32First(hThreadSnap, &te32)){
|
||||||
|
OutTrace("LimitCpuUsage: Thread32First ERROR err=%d\n", GetLastError()); // Show cause of failure
|
||||||
|
CloseHandle(hThreadSnap); // Must clean up the snapshot object!
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now walk the thread list of the system threads,
|
||||||
|
// and take a snapshot of each target low-priority thread
|
||||||
|
do {
|
||||||
|
if( (te32.th32OwnerProcessID == dwOwnerPID) &&
|
||||||
|
(te32.th32ThreadID != dwOwnerThread) &&
|
||||||
|
(te32.tpBasePri < THREAD_PRIORITY_TIME_CRITICAL)) {
|
||||||
|
|
||||||
|
// find threads already listed
|
||||||
|
BOOL IsListed = FALSE;
|
||||||
|
iThreadIndex = *iNumThreads;
|
||||||
|
for(int j=0; j<(*iNumThreads); j++){
|
||||||
|
if(ProcessThreads[j].tid == 0) iThreadIndex=j; // find a list hole, if existing
|
||||||
|
if(te32.th32ThreadID == ProcessThreads[j].tid){
|
||||||
|
IsListed = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if not in the list, add
|
||||||
|
if(!IsListed){
|
||||||
|
HANDLE hThread = OpenThread(THREAD_QUERY_INFORMATION|THREAD_SUSPEND_RESUME, FALSE, te32.th32ThreadID);
|
||||||
|
if(!GetThreadTimes(hThread, &CreationTime, &ExitTime, &KernelTime, &UserTime)) continue;
|
||||||
|
ProcessThreads[iThreadIndex].LastUsed = FTFTSUM(UserTime, KernelTime);
|
||||||
|
ProcessThreads[iThreadIndex].hThread =hThread;
|
||||||
|
ProcessThreads[iThreadIndex].tid = te32.th32ThreadID;
|
||||||
|
ProcessThreads[iThreadIndex].Suspended = FALSE;
|
||||||
|
#ifdef DEBUGTRACE
|
||||||
|
OutTrace("Tid[%d]:%x init time=%d\n", iThreadIndex, te32.th32ThreadID, ProcessThreads[iThreadIndex].LastUsed);
|
||||||
|
#endif
|
||||||
|
iThreadIndex++;
|
||||||
|
if(iThreadIndex> *iNumThreads) *iNumThreads = iThreadIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while(Thread32Next(hThreadSnap, &te32) && (*iNumThreads<MAX_THREAD_ARRAY-1));
|
||||||
|
#ifdef DEBUGTRACE
|
||||||
|
OutTrace("Got %d threads\n", *iNumThreads);
|
||||||
|
#endif
|
||||||
|
// Don't forget to clean up the snapshot object.
|
||||||
|
CloseHandle(hThreadSnap);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL LimitCpuUsage(DWORD dwOwnerPID, DWORD dwOwnerThread, int iSlowDownRatio)
|
BOOL LimitCpuUsage(DWORD dwOwnerPID, DWORD dwOwnerThread, int iSlowDownRatio)
|
||||||
{
|
{
|
||||||
HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
|
|
||||||
THREADENTRY32 te32;
|
|
||||||
ThreadDesc_Type ProcessThreads[MAX_THREAD_ARRAY];
|
ThreadDesc_Type ProcessThreads[MAX_THREAD_ARRAY];
|
||||||
int iThreadIndex, iNumThreads;
|
int iThreadIndex, iNumThreads;
|
||||||
int cycle;
|
int cycle;
|
||||||
|
int iResumeCount;
|
||||||
|
DWORD iTimeLimit = 100000;
|
||||||
|
DWORD iTimeSlot = 100000 / iSlowDownRatio;
|
||||||
FILETIME CreationTime, ExitTime, KernelTime, UserTime;
|
FILETIME CreationTime, ExitTime, KernelTime, UserTime;
|
||||||
//ULARGE_INTEGER iKernelTime, iUserTime;
|
|
||||||
DWORD iKernelTime, iUserTime;
|
|
||||||
DWORD iTimeLimit = (100000 * DELTA_TIME);
|
|
||||||
DWORD iTimeSlot = (100000 * DELTA_TIME) /iSlowDownRatio;
|
|
||||||
OutTrace("LimitCpuUsage: TimeLimit=%ld TimeSlot=%ld\n", iTimeLimit, iTimeSlot);
|
OutTrace("LimitCpuUsage: TimeLimit=%ld TimeSlot=%ld\n", iTimeLimit, iTimeSlot);
|
||||||
|
|
||||||
// Fill in the size of the structure before using it.
|
// Fill in the size of the structure before using it.
|
||||||
te32.dwSize = sizeof(THREADENTRY32);
|
|
||||||
for(int i=0; i<MAX_THREAD_ARRAY; i++) {
|
for(int i=0; i<MAX_THREAD_ARRAY; i++) {
|
||||||
ProcessThreads[i].LastUsed = 0;
|
|
||||||
ProcessThreads[i].DeltaUsed = 0;
|
ProcessThreads[i].DeltaUsed = 0;
|
||||||
ProcessThreads[i].Suspended = FALSE;
|
ProcessThreads[i].Suspended = FALSE;
|
||||||
ProcessThreads[i].hThread = NULL;
|
|
||||||
ProcessThreads[i].tid = 0;
|
ProcessThreads[i].tid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
iNumThreads = 0;
|
iNumThreads = 0;
|
||||||
for(cycle=0; TRUE; cycle++){
|
for(cycle=0; TRUE; cycle++){
|
||||||
if(cycle == 0){
|
if(cycle == 0) if(!RefreshThreadList(&iNumThreads, ProcessThreads, dwOwnerPID, dwOwnerThread)) break;
|
||||||
// Take a snapshot of all running threads
|
|
||||||
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
|
||||||
if(hThreadSnap == INVALID_HANDLE_VALUE) {
|
|
||||||
OutTrace("LimitCpuUsage: CreateToolhelp32Snapshot ERROR err=%d\n", GetLastError());
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Retrieve information about the first thread, and exit if unsuccessful
|
|
||||||
if(!Thread32First(hThreadSnap, &te32)){
|
|
||||||
OutTrace("LimitCpuUsage: Thread32First ERROR err=%d\n", GetLastError()); // Show cause of failure
|
|
||||||
CloseHandle(hThreadSnap); // Must clean up the snapshot object!
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
iThreadIndex = iNumThreads;
|
|
||||||
// Now walk the thread list of the system threads,
|
|
||||||
// and take a snapshot of each target low-priority thread
|
|
||||||
do {
|
|
||||||
if( (te32.th32OwnerProcessID == dwOwnerPID) &&
|
|
||||||
(te32.th32ThreadID != dwOwnerThread) &&
|
|
||||||
(te32.tpBasePri < THREAD_PRIORITY_TIME_CRITICAL)) {
|
|
||||||
|
|
||||||
// find threads already listed
|
|
||||||
BOOL IsListed = FALSE;
|
|
||||||
for(int j=0; j<iNumThreads; j++){
|
|
||||||
if(te32.th32ThreadID == ProcessThreads[j].tid){
|
|
||||||
IsListed = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if not in the list, add
|
|
||||||
if(!IsListed){
|
|
||||||
HANDLE hThread = OpenThread(THREAD_SUSPEND_RESUME|THREAD_QUERY_INFORMATION, FALSE, te32.th32ThreadID);
|
|
||||||
if(!GetThreadTimes(hThread, &CreationTime, &ExitTime, &KernelTime, &UserTime)) continue;
|
|
||||||
iUserTime = UserTime.dwLowDateTime;
|
|
||||||
iKernelTime = KernelTime.dwLowDateTime;
|
|
||||||
ProcessThreads[iThreadIndex].hThread = hThread;
|
|
||||||
ProcessThreads[iThreadIndex].LastUsed = iUserTime + iKernelTime;
|
|
||||||
//OutTrace("Tid[%d]=%x init time=%d\n", iThreadIndex, hThread, ProcessThreads[iThreadIndex].LastUsed);
|
|
||||||
iThreadIndex++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while(Thread32Next(hThreadSnap, &te32) && (iThreadIndex<MAX_THREAD_ARRAY));
|
|
||||||
iNumThreads = iThreadIndex;
|
|
||||||
//OutTrace("Got %d threads\n", iNumThreads);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't forget to clean up the snapshot object.
|
|
||||||
CloseHandle(hThreadSnap);
|
|
||||||
|
|
||||||
if(cycle > 100) cycle=0; // every 100 cyces forces a thread list refresh
|
if(cycle > 100) cycle=0; // every 100 cyces forces a thread list refresh
|
||||||
|
|
||||||
Sleep(DELTA_TIME);
|
for(iThreadIndex=0; iThreadIndex<iNumThreads; iThreadIndex++) {
|
||||||
|
ThreadDesc_Type *t = &ProcessThreads[iThreadIndex];
|
||||||
|
if (t->DeltaUsed > (signed long)iTimeLimit) {
|
||||||
|
#ifdef DEBUGTRACE
|
||||||
|
OutTrace("Tid[%d]:%x delta=%d stopped at %d\n", iThreadIndex, t->tid, t->DeltaUsed, __LINE__);
|
||||||
|
#endif
|
||||||
|
if ((iResumeCount=SuspendThread(t->hThread))== -1) {
|
||||||
|
t->tid = NULL;
|
||||||
|
CloseHandle(t->hThread);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
t->Suspended = TRUE;
|
||||||
|
t->DeltaUsed -= iTimeSlot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Sleep(iSlowDownRatio);
|
||||||
|
|
||||||
for(iThreadIndex=0; iThreadIndex<iNumThreads; iThreadIndex++) {
|
for(iThreadIndex=0; iThreadIndex<iNumThreads; iThreadIndex++) {
|
||||||
ThreadDesc_Type *t = &ProcessThreads[iThreadIndex];
|
ThreadDesc_Type *t = &ProcessThreads[iThreadIndex];
|
||||||
|
|
||||||
if (t->hThread == NULL) continue; // skip terminated ones
|
if (t->tid == NULL) continue; // skip terminated ones
|
||||||
if(!GetThreadTimes(t->hThread, &CreationTime, &ExitTime, &KernelTime, &UserTime)) {
|
|
||||||
//OutTrace("Tid[%d]=%x died at %d\n", iThreadIndex, t->hThread, __LINE__);
|
|
||||||
//CloseHandle(t->hThread);
|
|
||||||
t->hThread = NULL;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (t->Suspended) {
|
if (t->Suspended) {
|
||||||
t->DeltaUsed -= iTimeSlot;
|
#ifdef DEBUGTRACE
|
||||||
//OutTrace("Tid[%d]=%x suspended delta=%ld\n", iThreadIndex, t->hThread, t->DeltaUsed);
|
OutTrace("Tid[%d]=%x delta=%d started at %d\n", iThreadIndex, t->tid, t->DeltaUsed, __LINE__);
|
||||||
if(t->DeltaUsed < 0) {
|
#endif
|
||||||
if (ResumeThread(t->hThread)== -1){
|
if ((iResumeCount=ResumeThread(t->hThread))== -1) {
|
||||||
//OutTrace("Tid[%d]=%x died at %d\n", iThreadIndex, t->hThread, __LINE__);
|
t->tid = NULL;
|
||||||
//CloseHandle(t->hThread);
|
CloseHandle(t->hThread);
|
||||||
t->hThread = NULL;
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
t->Suspended = FALSE;
|
|
||||||
}
|
}
|
||||||
|
t->Suspended = FALSE;
|
||||||
|
t->DeltaUsed -= iTimeSlot;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iUserTime = UserTime.dwLowDateTime;
|
if(!GetThreadTimes(t->hThread, &CreationTime, &ExitTime, &KernelTime, &UserTime)) {
|
||||||
iKernelTime = KernelTime.dwLowDateTime;
|
t->tid = NULL;
|
||||||
t->DeltaUsed = t->DeltaUsed + (iUserTime + iKernelTime) - t->LastUsed;
|
CloseHandle(t->hThread);
|
||||||
t->LastUsed = iUserTime + iKernelTime;
|
continue;
|
||||||
//OutTrace("Tid[%d]=%x active delta=%ld\n", iThreadIndex, t->hThread, t->DeltaUsed);
|
}
|
||||||
if (t->DeltaUsed > (signed long)iTimeLimit) {
|
FILETIME tmp = t->LastUsed;
|
||||||
//OutTrace("Tid[%d]=%x stopped last=%ld\n", iThreadIndex, t->hThread, t->DeltaUsed);
|
t->LastUsed = FTFTSUM(UserTime, KernelTime);
|
||||||
if (SuspendThread(t->hThread)== -1) {
|
t->DeltaUsed = t->DeltaUsed + DWDIFF(t->LastUsed, tmp);
|
||||||
//OutTrace("Tid[%d]=%x died at %d\n", iThreadIndex, t->hThread, __LINE__);
|
#ifdef DEBUGTRACE
|
||||||
//CloseHandle(t->hThread);
|
OutTrace("Tid[%d]:%x delta=%d measured at %d\n", iThreadIndex, t->tid, t->DeltaUsed, __LINE__);
|
||||||
t->hThread = NULL;
|
#endif
|
||||||
continue;
|
|
||||||
}
|
|
||||||
t->Suspended = TRUE;
|
|
||||||
t->DeltaUsed -= iTimeSlot;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// should never go here ....
|
|
||||||
OutTrace("end of cycle\n");
|
|
||||||
for(int i=0; i<MAX_THREAD_ARRAY; i++) {
|
|
||||||
HANDLE hThread = ProcessThreads[i].hThread;
|
|
||||||
if(hThread){
|
|
||||||
if(ProcessThreads[i].Suspended) ResumeThread(hThread);
|
|
||||||
CloseHandle(hThread);
|
|
||||||
}
|
}
|
||||||
|
Sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// should never go here, but in case, awake all suspended threads
|
||||||
|
for(iThreadIndex=0; iThreadIndex<iNumThreads; iThreadIndex++) {
|
||||||
|
ThreadDesc_Type *t = &ProcessThreads[iThreadIndex];
|
||||||
|
if (t->tid && t->Suspended) {
|
||||||
|
ResumeThread(t->hThread);
|
||||||
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "TlHelp32.h"
|
#include "TlHelp32.h"
|
||||||
|
|
||||||
#define VERSION "2.03.68"
|
#define VERSION "2.03.69"
|
||||||
|
|
||||||
#define DDTHREADLOCK 1
|
#define DDTHREADLOCK 1
|
||||||
//#define LOCKTHREADS
|
//#define LOCKTHREADS
|
||||||
|
Binary file not shown.
106
dll/shareddc.cpp
106
dll/shareddc.cpp
@ -21,7 +21,6 @@
|
|||||||
extern HandleDDThreadLock_Type pReleaseDDThreadLock;
|
extern HandleDDThreadLock_Type pReleaseDDThreadLock;
|
||||||
extern GetDC_Type pGetDCMethod();
|
extern GetDC_Type pGetDCMethod();
|
||||||
extern ReleaseDC_Type pReleaseDCMethod();
|
extern ReleaseDC_Type pReleaseDCMethod();
|
||||||
//void setClippingRegion(HDC, HDC, HWND, bool, const POINT&);
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------+
|
/*---------------------------------------------------------------------------------+
|
||||||
| |
|
| |
|
||||||
@ -192,8 +191,8 @@ HDC dxwSDC::GetPrimaryDC(HDC hdc)
|
|||||||
origin.y -= mainwin.y;
|
origin.y -= mainwin.y;
|
||||||
OutTraceB("dxwSDC::GetPrimaryDC: origin=(%d,%d)\n", origin.x, origin.y);
|
OutTraceB("dxwSDC::GetPrimaryDC: origin=(%d,%d)\n", origin.x, origin.y);
|
||||||
|
|
||||||
copyDcAttributes(VirtualHDC, hdc, origin);
|
copyDcAttributes(VirtualHDC, hdc, origin);
|
||||||
setClippingRegion(VirtualHDC, hdc, dxw.GethWnd(), FALSE, origin); // no good
|
setClippingRegion(VirtualHDC, hdc, origin);
|
||||||
|
|
||||||
return VirtualHDC;
|
return VirtualHDC;
|
||||||
}
|
}
|
||||||
@ -369,60 +368,77 @@ void dxwSDC::copyDcAttributes(HDC destDC, HDC origDc, POINT origin)
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
HDC compatDc;
|
HDC compatDc;
|
||||||
|
POINT origin;
|
||||||
HWND rootWnd;
|
HWND rootWnd;
|
||||||
} ExcludeClipRectsData_Type;
|
} ExcludeClipRectsData_Type;
|
||||||
|
|
||||||
static BOOL CALLBACK excludeClipRectForOverlappingWindow(HWND hwnd, LPARAM lParam)
|
static BOOL CALLBACK excludeClipRectsForOverlappingWindows(HWND hwnd, LPARAM lParam)
|
||||||
{
|
{
|
||||||
ExcludeClipRectsData_Type *excludeClipRectsData = (ExcludeClipRectsData_Type *)lParam;
|
ExcludeClipRectsData_Type *excludeClipRectsData = (ExcludeClipRectsData_Type *)lParam;
|
||||||
if (hwnd == excludeClipRectsData->rootWnd) return FALSE;
|
if (!IsWindowVisible(hwnd)) return TRUE; // go ahead
|
||||||
if (!IsWindowVisible(hwnd)) return TRUE;
|
if (hwnd == excludeClipRectsData->rootWnd) return FALSE; // stop
|
||||||
|
if(dxw.IsDesktop(hwnd)) return FALSE;
|
||||||
RECT windowRect = {};
|
|
||||||
GetWindowRect(hwnd, &windowRect);
|
|
||||||
|
|
||||||
HRGN windowRgn = (*pCreateRectRgnIndirect)(&windowRect);
|
|
||||||
ExtSelectClipRgn(excludeClipRectsData->compatDc, windowRgn, RGN_DIFF);
|
|
||||||
DeleteObject(windowRgn);
|
|
||||||
OutTraceB("dxwSDC::excludeClipRect: hwnd=%x rect=(%d,%d)-(%d,%d)\n", hwnd, windowRect.left, windowRect.top, windowRect.right, windowRect.bottom);
|
|
||||||
|
|
||||||
|
RECT rect = {};
|
||||||
|
(*pGetClientRect)(hwnd, &rect);
|
||||||
|
OffsetRect(&rect, -excludeClipRectsData->origin.x, -excludeClipRectsData->origin.y);
|
||||||
|
ExcludeClipRect(excludeClipRectsData->compatDc, rect.left, rect.top, rect.right, rect.bottom);
|
||||||
|
OutTraceB("dxwSDC::excludeClipRects: hwnd=%x rect=(%d,%d)-(%d,%d)\n", hwnd, rect.left, rect.top, rect.right, rect.bottom);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void excludeClipRectsForOverlappingWindows(HWND hwnd, BOOL isMenuWindow, HDC compatDc)
|
void dxwSDC::setClippingRegion(HDC compatDc, HDC origDc, POINT origin)
|
||||||
{
|
{
|
||||||
ExcludeClipRectsData_Type excludeClipRectsData = { compatDc, GetAncestor(hwnd, GA_ROOT) };
|
OutTraceB("dxwSDC::setClippingRegion: compdc=%x origdc=%x origin=(%d,%d)\n", compatDc, origDc, origin.x, origin.y);
|
||||||
if (!isMenuWindow){
|
HRGN clipRgn = CreateRectRgn(0, 0, 0, 0);
|
||||||
EnumWindows(&excludeClipRectForOverlappingWindow, (LPARAM)(&excludeClipRectsData));
|
const bool isEmptyClipRgn = (1 != GetRandomRgn(origDc, clipRgn, SYSRGN));
|
||||||
|
OutTraceB("dxwSDC::setClippingRegion: isEmptyClipRgn=%x\n", isEmptyClipRgn);
|
||||||
|
// scale clip region
|
||||||
|
POINT upleft={0, 0};
|
||||||
|
//(*pClientToScreen)(dxw.GethWnd(), &upleft);
|
||||||
|
(*pClientToScreen)(CurrenthWnd, &upleft);
|
||||||
|
if(IsDebug){
|
||||||
|
OutTraceB("dxwSDC::setClippingRegion: upleft=(%d,%d)\n", upleft.x, upleft.y);
|
||||||
}
|
}
|
||||||
|
OffsetRgn(clipRgn, -upleft.x, -upleft.y);
|
||||||
HWND menuWindow = FindWindow((LPCSTR)(0x8000), NULL);
|
if(IsDebug){
|
||||||
while (menuWindow && menuWindow != hwnd){
|
RECT RgnBox;
|
||||||
excludeClipRectForOverlappingWindow(menuWindow, (LPARAM)(&excludeClipRectsData));
|
GetRgnBox(clipRgn, &RgnBox);
|
||||||
menuWindow = FindWindowEx(NULL, menuWindow, (LPCSTR)(0x8000), NULL);
|
OutTraceB("dxwSDC::setClippingRegion: RgnBox=(%d,%d)-(%d,%d) size=(%dx%d)\n",
|
||||||
|
RgnBox.left, RgnBox.top, RgnBox.right, RgnBox.bottom, RgnBox.right-RgnBox.left, RgnBox.bottom-RgnBox.top);
|
||||||
}
|
}
|
||||||
}
|
// end of scaling
|
||||||
|
SelectClipRgn(compatDc, isEmptyClipRgn ? NULL : clipRgn);
|
||||||
void dxwSDC::setClippingRegion(HDC compatDc, HDC origDc, HWND hwnd, bool isMenuWindow, const POINT& origin)
|
|
||||||
{
|
|
||||||
HRGN clipRgn = (*pCreateRectRgn)(0, 0, 0, 0);
|
|
||||||
if (1 == GetClipRgn(origDc, clipRgn)){
|
|
||||||
OffsetRgn(clipRgn, origin.x, origin.y);
|
|
||||||
SelectClipRgn(compatDc, clipRgn);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((hwnd) && (dxw.dwFlags7 & FIXCLIPPERAREA)){
|
|
||||||
if (isMenuWindow || 1 != GetRandomRgn(origDc, clipRgn, SYSRGN)){
|
|
||||||
RECT rect = {};
|
|
||||||
(*pGetWindowRect)(hwnd, &rect);
|
|
||||||
(*pSetRectRgn)(clipRgn, rect.left, rect.top, rect.right, rect.bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
excludeClipRectsForOverlappingWindows(hwnd, isMenuWindow, compatDc);
|
|
||||||
ExtSelectClipRgn(compatDc, clipRgn, RGN_AND);
|
|
||||||
}
|
|
||||||
|
|
||||||
DeleteObject(clipRgn);
|
DeleteObject(clipRgn);
|
||||||
SetMetaRgn(compatDc);
|
|
||||||
|
HRGN origClipRgn = (*pCreateRectRgn)(0, 0, 0, 0);
|
||||||
|
if (1 == GetClipRgn(origDc, origClipRgn))
|
||||||
|
{
|
||||||
|
OutTraceB("dxwSDC::setClippingRegion: GetClipRgn==1\n");
|
||||||
|
OffsetRgn(origClipRgn, origin.x, origin.y);
|
||||||
|
ExtSelectClipRgn(compatDc, origClipRgn, RGN_AND);
|
||||||
|
if(IsDebug){
|
||||||
|
RECT RgnBox;
|
||||||
|
GetRgnBox(origClipRgn, &RgnBox); // for logging only
|
||||||
|
OutTraceB("dxwSDC::setClippingRegion: OrigRgnBox=(%d,%d)-(%d,%d)\n", RgnBox.left, RgnBox.top, RgnBox.right, RgnBox.bottom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DeleteObject(origClipRgn);
|
||||||
|
|
||||||
|
if(dxw.dwFlags7 & FIXCLIPPERAREA){
|
||||||
|
// to finish .....
|
||||||
|
// on Win10 this part seems unnecessary and giving troubles .....
|
||||||
|
if (!isEmptyClipRgn){
|
||||||
|
OutTraceB("dxwSDC::setClippingRegion: isEmptyClipRgn FALSE\n");
|
||||||
|
HWND hwnd = WindowFromDC(origDc);
|
||||||
|
if (hwnd && (!dxw.IsDesktop(hwnd))){
|
||||||
|
ExcludeClipRectsData_Type excludeClipRectsData = { compatDc, origin, dxw.GethWnd() };
|
||||||
|
//ExcludeClipRectsData_Type excludeClipRectsData = { compatDc, origin, GetAncestor(hwnd, GA_ROOT) };
|
||||||
|
OutTraceB("dxwSDC::setClippingRegion: compatdc=%x origin=(%d,%d) ancestor=%x\n",
|
||||||
|
compatDc, origin.x, origin.y, dxw.GethWnd());
|
||||||
|
EnumWindows(&excludeClipRectsForOverlappingWindows,(LPARAM)(&excludeClipRectsData));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ public: // methods
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void copyDcAttributes(HDC, HDC, POINT);
|
void copyDcAttributes(HDC, HDC, POINT);
|
||||||
void setClippingRegion(HDC, HDC, HWND, bool, const POINT &);
|
void setClippingRegion(HDC, HDC, POINT);
|
||||||
|
|
||||||
HDC PrimaryDC;
|
HDC PrimaryDC;
|
||||||
HDC VirtualHDC;
|
HDC VirtualHDC;
|
||||||
|
@ -2636,6 +2636,7 @@ BOOL WINAPI extDestroyWindow(HWND hWnd)
|
|||||||
// v2.02.43: "Empire Earth" builds test surfaces that must be destroyed!
|
// v2.02.43: "Empire Earth" builds test surfaces that must be destroyed!
|
||||||
// v2.03.20: "Prince of Persia 3D" destroys the main window that must be preserved!
|
// v2.03.20: "Prince of Persia 3D" destroys the main window that must be preserved!
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
|
||||||
OutTraceB("DestroyWindow: hwnd=%x\n", hWnd);
|
OutTraceB("DestroyWindow: hwnd=%x\n", hWnd);
|
||||||
if (hWnd == dxw.GethWnd()) {
|
if (hWnd == dxw.GethWnd()) {
|
||||||
if(dxw.dwFlags6 & NODESTROYWINDOW) {
|
if(dxw.dwFlags6 & NODESTROYWINDOW) {
|
||||||
@ -2651,6 +2652,8 @@ BOOL WINAPI extDestroyWindow(HWND hWnd)
|
|||||||
}
|
}
|
||||||
res=(*pDestroyWindow)(hWnd);
|
res=(*pDestroyWindow)(hWnd);
|
||||||
if(!res)OutTraceE("DestroyWindow: ERROR err=%d\n", GetLastError());
|
if(!res)OutTraceE("DestroyWindow: ERROR err=%d\n", GetLastError());
|
||||||
|
|
||||||
|
if(dxw.dwFlags7 & NOWINERRORS) return TRUE; // v2.03.69: suppress unessential errors
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3132,14 +3135,12 @@ BOOL WINAPI extGetCursorInfo(PCURSORINFO pci)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- to be hooked ....
|
|
||||||
|
|
||||||
HWND WINAPI extWindowFromPoint(POINT Point)
|
HWND WINAPI extWindowFromPoint(POINT Point)
|
||||||
{
|
{
|
||||||
HWND ret;
|
HWND ret;
|
||||||
OutTraceDW("WindowFromPoint: point=(%d,%d)\n", Point.x, Point.y);
|
OutTraceDW("WindowFromPoint: point=(%d,%d)\n", Point.x, Point.y);
|
||||||
if(dxw.IsFullScreen()){
|
if(dxw.IsFullScreen()){
|
||||||
dxw.UnmapWindow(&Point);
|
dxw.MapWindow(&Point); // v2.03.69 fix
|
||||||
OutTraceDW("WindowFromPoint: FIXED point=(%d,%d)\n", Point.x, Point.y);
|
OutTraceDW("WindowFromPoint: FIXED point=(%d,%d)\n", Point.x, Point.y);
|
||||||
}
|
}
|
||||||
ret = (*pWindowFromPoint)(Point);
|
ret = (*pWindowFromPoint)(Point);
|
||||||
@ -3152,7 +3153,7 @@ HWND WINAPI extChildWindowFromPoint(HWND hWndParent, POINT Point)
|
|||||||
HWND ret;
|
HWND ret;
|
||||||
OutTraceDW("ChildWindowFromPoint: hWndParent=%x point=(%d,%d)\n", hWndParent, Point.x, Point.y);
|
OutTraceDW("ChildWindowFromPoint: hWndParent=%x point=(%d,%d)\n", hWndParent, Point.x, Point.y);
|
||||||
if(dxw.IsDesktop(hWndParent) && dxw.IsFullScreen() && dxw.Windowize){
|
if(dxw.IsDesktop(hWndParent) && dxw.IsFullScreen() && dxw.Windowize){
|
||||||
dxw.UnmapClient(&Point);
|
dxw.MapClient(&Point);
|
||||||
OutTraceDW("ChildWindowFromPoint: FIXED point=(%d,%d)\n", Point.x, Point.y);
|
OutTraceDW("ChildWindowFromPoint: FIXED point=(%d,%d)\n", Point.x, Point.y);
|
||||||
}
|
}
|
||||||
ret = (*pChildWindowFromPoint)(hWndParent, Point);
|
ret = (*pChildWindowFromPoint)(hWndParent, Point);
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Betrayal in Antara
|
|
||||||
path0=D:\Games\Betrayal in Antara\ANTARAR.EXE
|
|
||||||
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
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=800
|
|
||||||
sizy0=600
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Blood 2 the Chosen
|
|
||||||
path0=D:\Games\Blood2\CLIENT.EXE
|
|
||||||
launchpath0=D:\Games\Blood2\BLOOD2.EXE
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=0
|
|
||||||
coord0=0
|
|
||||||
flag0=136315042
|
|
||||||
flagg0=1207959552
|
|
||||||
flagh0=20
|
|
||||||
flagi0=138412036
|
|
||||||
flagj0=4224
|
|
||||||
flagk0=65536
|
|
||||||
flagl0=0
|
|
||||||
flagm0=0
|
|
||||||
tflag0=0
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=1200
|
|
||||||
sizy0=900
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Bugs Bunny Lost In Time
|
|
||||||
path0=D:\Games\Bugs.Bunny.Lost.In.Time\bin\bugs.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=7
|
|
||||||
coord0=0
|
|
||||||
flag0=681574434
|
|
||||||
flagg0=1209139200
|
|
||||||
flagh0=20
|
|
||||||
flagi0=138412036
|
|
||||||
flagj0=4224
|
|
||||||
flagk0=98304
|
|
||||||
flagl0=0
|
|
||||||
flagm0=0
|
|
||||||
tflag0=0
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=800
|
|
||||||
sizy0=600
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Gooka The Mystery of Janatris
|
|
||||||
path0=D:\Games\Gooka The Mystery of Janatris\Gooka\gooka2.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=0
|
|
||||||
coord0=0
|
|
||||||
flag0=136315394
|
|
||||||
flagg0=1207959552
|
|
||||||
flagh0=20
|
|
||||||
flagi0=138412038
|
|
||||||
flagj0=4224
|
|
||||||
flagk0=268500992
|
|
||||||
flagl0=8
|
|
||||||
flagm0=0
|
|
||||||
tflag0=0
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=800
|
|
||||||
sizy0=600
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,30 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=NHL 2002
|
|
||||||
path0=D:\Games\NHL 2002\nhl2002.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=7
|
|
||||||
coord0=0
|
|
||||||
flag0=681574499
|
|
||||||
flagg0=1476395008
|
|
||||||
flagh0=528
|
|
||||||
flagi0=136314884
|
|
||||||
flagj0=1073746048
|
|
||||||
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
|
|
@ -1,35 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=No Respect (1.1)
|
|
||||||
path0=D:\Games\No Respect\nr11.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=0
|
|
||||||
coord0=0
|
|
||||||
flag0=681574434
|
|
||||||
flagg0=1207959552
|
|
||||||
flagh0=20
|
|
||||||
flagi0=138412036
|
|
||||||
flagj0=4224
|
|
||||||
flagk0=327680
|
|
||||||
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
|
|
||||||
swapeffect0=0
|
|
||||||
flagl0=0
|
|
||||||
flagm0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,32 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=No Respect
|
|
||||||
path0=D:\Games\No Respect\NR.EXE
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=0
|
|
||||||
coord0=0
|
|
||||||
flag0=136314914
|
|
||||||
flagg0=1207959552
|
|
||||||
flagh0=20
|
|
||||||
flagi0=138412036
|
|
||||||
flagj0=4224
|
|
||||||
flagk0=327680
|
|
||||||
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
|
|
||||||
swapeffect0=0
|
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Phantasmagoria 2
|
|
||||||
path0=D:\Games\Phantasmagoria 2\SIERRAW.EXE
|
|
||||||
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
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=800
|
|
||||||
sizy0=600
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,29 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Silver
|
|
||||||
path0=D:\Games\Silver\silver.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=0
|
|
||||||
coord0=0
|
|
||||||
flag0=136314998
|
|
||||||
flagg0=1207959552
|
|
||||||
flagh0=20
|
|
||||||
flagi0=138412036
|
|
||||||
flagj0=4224
|
|
||||||
flagk0=268500992
|
|
||||||
flagl0=0
|
|
||||||
flagm0=0
|
|
||||||
tflag0=0
|
|
||||||
posx0=50
|
|
||||||
posy0=50
|
|
||||||
sizx0=800
|
|
||||||
sizy0=600
|
|
||||||
maxfps0=0
|
|
||||||
initts0=0
|
|
||||||
winver0=0
|
|
||||||
maxres0=-1
|
|
||||||
swapeffect0=0
|
|
||||||
maxddinterface0=7
|
|
@ -1,30 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=The Hobbit(TM) Demo
|
|
||||||
path0=D:\Games\The Hobbit(TM) Demo\MeridianDemo.exe
|
|
||||||
launchpath0=
|
|
||||||
module0=
|
|
||||||
opengllib0=
|
|
||||||
notes0=
|
|
||||||
registry0=
|
|
||||||
ver0=8
|
|
||||||
coord0=0
|
|
||||||
flag0=136315426
|
|
||||||
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
|
|
@ -1,30 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Urban Chaos
|
|
||||||
path0=D:\Games\Urban Chaos\fallen.exe
|
|
||||||
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
|
|
@ -1,30 +0,0 @@
|
|||||||
[target]
|
|
||||||
title0=Weird War
|
|
||||||
path0=D:\Games\Weird War\WeirdWar.exe
|
|
||||||
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
|
|
@ -36,6 +36,7 @@ void CTabSysLibs::DoDataExchange(CDataExchange* pDX)
|
|||||||
DDX_Check(pDX, IDC_FIXCLIPPERAREA, cTarget->m_FixClipperArea);
|
DDX_Check(pDX, IDC_FIXCLIPPERAREA, cTarget->m_FixClipperArea);
|
||||||
DDX_Check(pDX, IDC_CREATEDESKTOP, cTarget->m_CreateDesktop);
|
DDX_Check(pDX, IDC_CREATEDESKTOP, cTarget->m_CreateDesktop);
|
||||||
DDX_Check(pDX, IDC_SYNCPALETTE, cTarget->m_SyncPalette);
|
DDX_Check(pDX, IDC_SYNCPALETTE, cTarget->m_SyncPalette);
|
||||||
|
DDX_Check(pDX, IDC_NOWINERRORS, cTarget->m_NoWinErrors);
|
||||||
|
|
||||||
// OpenGL
|
// OpenGL
|
||||||
DDX_Check(pDX, IDC_HOOKOPENGL, cTarget->m_HookOpenGL); // duplicated
|
DDX_Check(pDX, IDC_HOOKOPENGL, cTarget->m_HookOpenGL); // duplicated
|
||||||
|
@ -224,6 +224,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
|
|||||||
m_FixClipperArea = FALSE; // ??
|
m_FixClipperArea = FALSE; // ??
|
||||||
m_CreateDesktop = FALSE;
|
m_CreateDesktop = FALSE;
|
||||||
m_SyncPalette = FALSE;
|
m_SyncPalette = FALSE;
|
||||||
|
m_NoWinErrors = FALSE;
|
||||||
m_AnalyticMode = FALSE;
|
m_AnalyticMode = FALSE;
|
||||||
m_NoPaletteUpdate = FALSE;
|
m_NoPaletteUpdate = FALSE;
|
||||||
m_WireFrame = FALSE;
|
m_WireFrame = FALSE;
|
||||||
|
@ -179,6 +179,7 @@ public:
|
|||||||
BOOL m_FixClipperArea;
|
BOOL m_FixClipperArea;
|
||||||
BOOL m_CreateDesktop;
|
BOOL m_CreateDesktop;
|
||||||
BOOL m_SyncPalette;
|
BOOL m_SyncPalette;
|
||||||
|
BOOL m_NoWinErrors;
|
||||||
BOOL m_AnalyticMode;
|
BOOL m_AnalyticMode;
|
||||||
BOOL m_NoPaletteUpdate;
|
BOOL m_NoPaletteUpdate;
|
||||||
BOOL m_LimitResources;
|
BOOL m_LimitResources;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -446,6 +446,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
|
|||||||
if(dlg->m_FixClipperArea) t->flags7 |= FIXCLIPPERAREA;
|
if(dlg->m_FixClipperArea) t->flags7 |= FIXCLIPPERAREA;
|
||||||
if(dlg->m_CreateDesktop) t->flags6 |= CREATEDESKTOP;
|
if(dlg->m_CreateDesktop) t->flags6 |= CREATEDESKTOP;
|
||||||
if(dlg->m_SyncPalette) t->flags6 |= SYNCPALETTE;
|
if(dlg->m_SyncPalette) t->flags6 |= SYNCPALETTE;
|
||||||
|
if(dlg->m_NoWinErrors) t->flags7 |= NOWINERRORS;
|
||||||
if(dlg->m_AnalyticMode) t->flags3 |= ANALYTICMODE;
|
if(dlg->m_AnalyticMode) t->flags3 |= ANALYTICMODE;
|
||||||
if(dlg->m_ReplacePrivOps) t->flags5 |= REPLACEPRIVOPS;
|
if(dlg->m_ReplacePrivOps) t->flags5 |= REPLACEPRIVOPS;
|
||||||
t->posx = dlg->m_PosX;
|
t->posx = dlg->m_PosX;
|
||||||
@ -706,6 +707,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
|
|||||||
dlg->m_FixClipperArea = t->flags7 & FIXCLIPPERAREA ? 1 : 0;
|
dlg->m_FixClipperArea = t->flags7 & FIXCLIPPERAREA ? 1 : 0;
|
||||||
dlg->m_CreateDesktop = t->flags6 & CREATEDESKTOP ? 1 : 0;
|
dlg->m_CreateDesktop = t->flags6 & CREATEDESKTOP ? 1 : 0;
|
||||||
dlg->m_SyncPalette = t->flags6 & SYNCPALETTE ? 1 : 0;
|
dlg->m_SyncPalette = t->flags6 & SYNCPALETTE ? 1 : 0;
|
||||||
|
dlg->m_NoWinErrors = t->flags7 & NOWINERRORS ? 1 : 0;
|
||||||
dlg->m_AnalyticMode = t->flags3 & ANALYTICMODE ? 1 : 0;
|
dlg->m_AnalyticMode = t->flags3 & ANALYTICMODE ? 1 : 0;
|
||||||
dlg->m_ReplacePrivOps = t->flags5 & REPLACEPRIVOPS ? 1 : 0;
|
dlg->m_ReplacePrivOps = t->flags5 & REPLACEPRIVOPS ? 1 : 0;
|
||||||
dlg->m_PosX = t->posx;
|
dlg->m_PosX = t->posx;
|
||||||
|
BIN
host/resource
BIN
host/resource
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user