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

v2_02_35_src

Former-commit-id: 454030ad57769588f94804d3b02764a1ce5232c7
This commit is contained in:
gho tik 2013-09-18 12:38:18 -04:00 committed by Refael ACkermann
parent 0b52adcc2b
commit 8b109aa710
19 changed files with 166 additions and 42 deletions

View File

@ -100,6 +100,7 @@
#define YUV2RGB 0x00040000 // Simulate YUV to RGB color conversion #define YUV2RGB 0x00040000 // Simulate YUV to RGB color conversion
#define RGB2YUV 0x00080000 // Simulate RGB to YUV color conversion #define RGB2YUV 0x00080000 // Simulate RGB to YUV color conversion
#define BUFFEREDIOFIX 0x00100000 // fix buffered IO incompatibilities between pre-Win98 and post-WinNT #define BUFFEREDIOFIX 0x00100000 // fix buffered IO incompatibilities between pre-Win98 and post-WinNT
#define FILTERMESSAGES 0x00200000 // eliminates window-related messages that might be offending for a fullscreen program
// 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

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:996722440a942e7241f3ee9fc60589c3dee97d84b8487c8c319ebf8962da3105 oid sha256:3f5743861a1292a4618e1a2ba0010db02dbcd6cf7af54405d41963ffc14594c0
size 406016 size 407040

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0ccd2bbf780cc35a20ef2cd852c3b1a5934717b1d477906c67b3d3a9ad156e19 oid sha256:fdfc4f4a7a785e89e56cf5ea2ec95e1735e2ffe4a572a4036764839d377bf628
size 524800 size 524800

52
build/dxwnd.ini Normal file
View File

@ -0,0 +1,52 @@
[window]
posx=1435
posy=210
sizx=320
sizy=420
[target]
title0=Rayman 2 Demo
path0=D:\Games\Rayman2Demo\Rayman2Demo.exe
module0=
opengllib0=
ver0=1
coord0=0
flag0=402653217
flagg0=1207959552
flagh0=2097172
flagi0=0
tflag0=64
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
title1=Mirror's Edge
path1=D:\Games\Mirror's Edge\Binaries\MirrorsEdge.exe
module1=
opengllib1=
ver1=0
coord1=0
flag1=134217762
flagg1=1207959552
flagh1=2097172
flagi1=0
tflag1=512
initx1=0
inity1=0
minx1=0
miny1=0
maxx1=0
maxy1=0
posx1=50
posy1=50
sizx1=800
sizy1=600
maxfps1=0
initts1=6

View File

@ -255,6 +255,11 @@ Added "Fix buffered IO after Win98" flag: this is meant to fix an incompatibilit
As a result, games like "Dylan Dog Horror Luna Park" show IO errors while reading data from the CD. Unfortunately, this is not the only problem of this game, so Dylan Dog fans will have to wait further. As a result, games like "Dylan Dog Horror Luna Park" show IO errors while reading data from the CD. Unfortunately, this is not the only problem of this game, so Dylan Dog fans will have to wait further.
Maybe some other programs suffer of this problem, and I will strongly appreciate if anyone finds some. Maybe some other programs suffer of this problem, and I will strongly appreciate if anyone finds some.
v2.02.35
fixed BACKBUFFER surface attributes in direct (not emulated) mode: Rayman 2 playable again
added FILTERMESSAGES flag ("filter offending messages") to eliminate some problems to games not developed to work windowized (Rayman 2, Mirror's Edge ...)
fixed bug crashing the program when "keep aspect ratio" is selected with window size set to 0

View File

@ -372,7 +372,7 @@ static void DescribeSurface(LPDIRECTDRAWSURFACE lpdds, int dxversion, char *labe
res=lpdds->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); res=lpdds->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd);
} }
if(res)return; if(res)return;
OutTrace("Surface %s: ddsd=%x dxversion=%d ", lpdds, dxversion); OutTrace("Surface %s: ddsd=%x dxversion=%d ", label, lpdds, dxversion);
DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, label, line); DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, label, line);
} }
@ -2225,9 +2225,12 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS
HRESULT res; HRESULT res;
// create BackBuffer surface // create BackBuffer surface
ClearSurfaceDesc((void *)&ddsd, dxversion); // ClearSurfaceDesc((void *)&ddsd, dxversion);
ddsd.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH; memcpy(&ddsd, lpddsd, lpddsd->dwSize);
ddsd.ddsCaps.dwCaps=DDSCAPS_SYSTEMMEMORY; ddsd.dwFlags &= ~(DDSD_WIDTH|DDSD_HEIGHT|DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE|DDSD_PIXELFORMAT);
ddsd.dwFlags |= (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH);
ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX);
//ddsd.ddsCaps.dwCaps|=DDSCAPS_SYSTEMMEMORY;
if (dxversion >= 4) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; if (dxversion >= 4) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN;
ddsd.dwWidth = dxw.GetScreenWidth(); ddsd.dwWidth = dxw.GetScreenWidth();
ddsd.dwHeight = dxw.GetScreenHeight(); ddsd.dwHeight = dxw.GetScreenHeight();
@ -2235,6 +2238,8 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS
LPDIRECTDRAWSURFACE lpPrim; LPDIRECTDRAWSURFACE lpPrim;
DDSURFACEDESC2 prim; DDSURFACEDESC2 prim;
(*pGetGDISurface)(lpPrimaryDD, &lpPrim); (*pGetGDISurface)(lpPrimaryDD, &lpPrim);
memset(&prim, 0, sizeof(DDSURFACEDESC2));
prim.dwSize = (dxversion >= 4) ? sizeof(DDSURFACEDESC2) : sizeof(DDSURFACEDESC);
res=lpPrim->GetSurfaceDesc((DDSURFACEDESC *)&prim); res=lpPrim->GetSurfaceDesc((DDSURFACEDESC *)&prim);
(*pReleaseS)(lpPrim); (*pReleaseS)(lpPrim);
ddsd.dwWidth = prim.dwWidth; ddsd.dwWidth = prim.dwWidth;
@ -2244,9 +2249,16 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS
DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Backbuf]" , __LINE__); DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Backbuf]" , __LINE__);
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0);
if(res) { if(res) {
OutTraceE("CreateSurface ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res==DDERR_OUTOFVIDEOMEMORY)){
if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); OutTraceD("CreateSurface: CreateSurface DDERR_OUTOFVIDEOMEMORY ERROR at %d, retry in SYSTEMMEMORY\n", __LINE__);
return res; ddsd.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY; // try ...
ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; // try ...
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0);
}
if(res){
OutTraceE("CreateSurface ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
return res;
}
} }
if (dxw.dwFlags3 & SAVECAPS) { if (dxw.dwFlags3 & SAVECAPS) {
ddsd.ddsCaps.dwCaps=DDSCAPS_VIDEOMEMORY; ddsd.ddsCaps.dwCaps=DDSCAPS_VIDEOMEMORY;

View File

@ -59,7 +59,7 @@ static char *Flag3Names[32]={
"SAVECAPS", "SINGLEPROCAFFINITY", "EMULATEREGISTRY", "CDROMDRIVETYPE", "SAVECAPS", "SINGLEPROCAFFINITY", "EMULATEREGISTRY", "CDROMDRIVETYPE",
"NOWINDOWMOVE", "DISABLEHAL", "LOCKSYSCOLORS", "EMULATEDC", "NOWINDOWMOVE", "DISABLEHAL", "LOCKSYSCOLORS", "EMULATEDC",
"FULLSCREENONLY", "FONTBYPASS", "YUV2RGB", "RGB2YUV", "FULLSCREENONLY", "FONTBYPASS", "YUV2RGB", "RGB2YUV",
"BUFFEREDIOFIX", "Flags3:22", "Flags3:23", "Flags3:24", "BUFFEREDIOFIX", "FILTERMESSAGES", "Flags3:23", "Flags3:24",
"Flags3:25", "Flags3:26", "Flags3:27", "Flags3:28", "Flags3:25", "Flags3:26", "Flags3:27", "Flags3:28",
"Flags3:29", "Flags3:30", "Flags3:31", "Flags3:32", "Flags3:29", "Flags3:30", "Flags3:31", "Flags3:32",
}; };
@ -843,6 +843,28 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
} }
#endif #endif
if(dxw.dwFlags3 & FILTERMESSAGES){
LRESULT ret;
switch(message){
case WM_NCCALCSIZE:
case WM_NCMOUSEMOVE:
case WM_NCLBUTTONDOWN:
case WM_NCLBUTTONUP:
case WM_NCLBUTTONDBLCLK:
case WM_NCRBUTTONDOWN:
case WM_NCRBUTTONUP:
case WM_NCRBUTTONDBLCLK:
case WM_NCMBUTTONDOWN:
case WM_NCMBUTTONUP:
case WM_NCMBUTTONDBLCLK:
//case WM_WINDOWPOSCHANGING:
//case WM_WINDOWPOSCHANGED:
OutTraceW("WindowProc[%x]: WinMsg=%x filtered message=%x(%s)\n", hwnd, message, ExplainWinMessage(message));
ret=0;
return ret;
}
}
switch(message){ switch(message){
// v2.02.13: added WM_GETMINMAXINFO/WM_NCCALCSIZE interception - (see Actua Soccer 3 problems...) // v2.02.13: added WM_GETMINMAXINFO/WM_NCCALCSIZE interception - (see Actua Soccer 3 problems...)
//case WM_NCDESTROY: //case WM_NCDESTROY:
@ -1028,9 +1050,11 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
GetHookInfo()->CursorY=HIWORD(lparam); GetHookInfo()->CursorY=HIWORD(lparam);
break; break;
case WM_SETFOCUS: case WM_SETFOCUS:
OutTraceD("WindowProc: hwnd=%x GOT FOCUS\n", hwnd);
if (dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion); if (dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion);
break; break;
case WM_KILLFOCUS: case WM_KILLFOCUS:
OutTraceD("WindowProc: hwnd=%x LOST FOCUS\n", hwnd);
if (dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor(); if (dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor();
if (dxw.dwFlags1 & ENABLECLIPPING) (*pClipCursor)(NULL); if (dxw.dwFlags1 & ENABLECLIPPING) (*pClipCursor)(NULL);
break; break;

View File

@ -202,6 +202,12 @@ POINT dxwCore::FixCursorPos(POINT prev)
// remember: rect from GetClientRect always start at 0,0! // remember: rect from GetClientRect always start at 0,0!
if(dxw.dwFlags1 & MODIFYMOUSE){ if(dxw.dwFlags1 & MODIFYMOUSE){
int w, h, b; // width, height and border int w, h, b; // width, height and border
int iRatioX, iRatioY;
// ratio is the configured one, unless the values are 0. Then, it's the standard 4:3 ratio.
iRatioX = iSizX ? iSizX : 4;
iRatioY = iSizY ? iSizY : 3;
if (!(*pGetClientRect)(hWnd, &rect)) { // v2.02.30: always use desktop win if (!(*pGetClientRect)(hWnd, &rect)) { // v2.02.30: always use desktop win
OutTraceD("GetClientRect ERROR %d at %d\n", GetLastError(),__LINE__); OutTraceD("GetClientRect ERROR %d at %d\n", GetLastError(),__LINE__);
curr.x = curr.y = 0; curr.x = curr.y = 0;
@ -210,13 +216,13 @@ POINT dxwCore::FixCursorPos(POINT prev)
h = rect.bottom - rect.top; h = rect.bottom - rect.top;
if (dxw.dwFlags2 & KEEPASPECTRATIO) { if (dxw.dwFlags2 & KEEPASPECTRATIO) {
if ((w * iSizY) > (h * iSizX)){ if ((w * iRatioY) > (h * iRatioX)){
b = (w - (h * iSizX / iSizY))/2; b = (w - (h * iRatioX / iRatioY))/2;
curr.x -= b; curr.x -= b;
w -= 2*b; w -= 2*b;
} }
else { else {
b = (h - (w * iSizY / iSizX))/2; b = (h - (w * iRatioY / iRatioX))/2;
curr.y -= b; curr.y -= b;
h -= 2*b; h -= 2*b;
} }
@ -329,15 +335,21 @@ void dxwCore::SethWnd(HWND hwnd)
void dxwCore::FixWorkarea(LPRECT workarea) void dxwCore::FixWorkarea(LPRECT workarea)
{ {
int w, h, b; // width, height and border int w, h, b; // width, height and border
int iRatioX, iRatioY;
// ratio is the configured one, unless the values are 0. Then, it's the standard 4:3 ratio.
iRatioX = iSizX ? iSizX : 4;
iRatioY = iSizY ? iSizY : 3;
w = workarea->right - workarea->left; w = workarea->right - workarea->left;
h = workarea->bottom - workarea->top; h = workarea->bottom - workarea->top;
if ((w * iSizY) > (h * iSizX)){ if ((w * iRatioY) > (h * iRatioX)){
b = (w - (h * iSizX / iSizY))/2; b = (w - (h * iRatioX / iRatioY))/2;
workarea->left += b; workarea->left += b;
workarea->right -= b; workarea->right -= b;
} }
else { else {
b = (h - (w * iSizY / iSizX))/2; b = (h - (w * iRatioY / iRatioX))/2;
workarea->top += b; workarea->top += b;
workarea->bottom -= b; workarea->bottom -= b;
} }
@ -349,23 +361,29 @@ RECT dxwCore::MapWindowRect(LPRECT lpRect)
RECT RetRect; RECT RetRect;
RECT ClientRect; RECT ClientRect;
int w, h, bx, by; // width, height and x,y borders int w, h, bx, by; // width, height and x,y borders
int iRatioX, iRatioY;
// ratio is the configured one, unless the values are 0. Then, it's the standard 4:3 ratio.
iRatioX = iSizX ? iSizX : 4;
iRatioY = iSizY ? iSizY : 3;
if (!(*pGetClientRect)(hWnd, &ClientRect)){ if (!(*pGetClientRect)(hWnd, &ClientRect)){
OutTraceE("GetClientRect ERROR: err=%d hwnd=%x at %d\n", GetLastError(), hWnd, __LINE__); OutTraceE("GetClientRect ERROR: err=%d hwnd=%x at %d\n", GetLastError(), hWnd, __LINE__);
// v2.02.31: try.... // v2.02.31: try....
ClientRect.top=ClientRect.left=0; ClientRect.top=ClientRect.left=0;
ClientRect.right=dxw.iSizX; ClientRect.right=iRatioX;
ClientRect.bottom=dxw.iSizY; ClientRect.bottom=iRatioY;
} }
RetRect=ClientRect; RetRect=ClientRect;
bx = by = 0; bx = by = 0;
if (dwFlags2 & KEEPASPECTRATIO){ if (dwFlags2 & KEEPASPECTRATIO){
w = RetRect.right - RetRect.left; w = RetRect.right - RetRect.left;
h = RetRect.bottom - RetRect.top; h = RetRect.bottom - RetRect.top;
if ((w * iSizY) > (h * iSizX)){ if ((w * iRatioY) > (h * iRatioX)){
bx = (w - (h * iSizX / iSizY))/2; bx = (w - (h * iRatioX / iRatioY))/2;
} }
else { else {
by = (h - (w * iSizY / iSizX))/2; by = (h - (w * iRatioY / iRatioX))/2;
} }
OutTraceB("bx=%d by=%d\n", bx, by); OutTraceB("bx=%d by=%d\n", bx, by);
} }
@ -478,8 +496,8 @@ void dxwCore::UnmapClient(LPPOINT lppoint)
(*pGetClientRect)(hWnd, &client); (*pGetClientRect)(hWnd, &client);
w = client.right ? client.right : iSizX; w = client.right ? client.right : iSizX;
h = client.bottom ? client.bottom : iSizY; h = client.bottom ? client.bottom : iSizY;
lppoint->x = (lppoint->x * (int)dwScreenWidth) / w; if(w) lppoint->x = (lppoint->x * (int)dwScreenWidth) / w;
lppoint->y = (lppoint->y * (int)dwScreenHeight) / h; if(h) lppoint->y = (lppoint->y * (int)dwScreenHeight) / h;
} }
void dxwCore::UnmapClient(int *nXDest, int *nYDest) void dxwCore::UnmapClient(int *nXDest, int *nYDest)
@ -489,8 +507,8 @@ void dxwCore::UnmapClient(int *nXDest, int *nYDest)
(*pGetClientRect)(hWnd, &client); (*pGetClientRect)(hWnd, &client);
w = client.right ? client.right : iSizX; w = client.right ? client.right : iSizX;
h = client.bottom ? client.bottom : iSizY; h = client.bottom ? client.bottom : iSizY;
*nXDest= *nXDest * (int)dwScreenWidth / w; if(w) *nXDest= *nXDest * (int)dwScreenWidth / w;
*nYDest= *nYDest * (int)dwScreenHeight / h; if(h) *nYDest= *nYDest * (int)dwScreenHeight / h;
} }
void dxwCore::MapWindow(LPRECT rect) void dxwCore::MapWindow(LPRECT rect)

View File

@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dxwnd.h" #include "dxwnd.h"
#include "dxwcore.hpp" #include "dxwcore.hpp"
#define VERSION "2.02.34" #define VERSION "2.02.35"
#define DDTHREADLOCK 1 #define DDTHREADLOCK 1

Binary file not shown.

View File

@ -169,6 +169,7 @@
#define IDC_RGB2YUV 1126 #define IDC_RGB2YUV 1126
#define IDC_FIXD3DFRAME 1127 #define IDC_FIXD3DFRAME 1127
#define IDC_BUFFEREDIOFIX 1128 #define IDC_BUFFEREDIOFIX 1128
#define IDC_FILTERMESSAGES 1129
#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

@ -36,6 +36,7 @@ void CTabProgram::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_HOOKDLLS, cTarget->m_HookDLLs); DDX_Check(pDX, IDC_HOOKDLLS, cTarget->m_HookDLLs);
DDX_Check(pDX, IDC_EMULATEREGISTRY, cTarget->m_EmulateRegistry); DDX_Check(pDX, IDC_EMULATEREGISTRY, cTarget->m_EmulateRegistry);
DDX_Check(pDX, IDC_FULLSCREENONLY, cTarget->m_FullScreenOnly); DDX_Check(pDX, IDC_FULLSCREENONLY, cTarget->m_FullScreenOnly);
DDX_Check(pDX, IDC_FILTERMESSAGES, cTarget->m_FilterMessages);
DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin); DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin);
DDX_Check(pDX, IDC_HOOKENABLED, cTarget->m_HookEnabled); DDX_Check(pDX, IDC_HOOKENABLED, cTarget->m_HookEnabled);
DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner); DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner);

View File

@ -51,6 +51,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_HookEnabled = TRUE; // default true !! m_HookEnabled = TRUE; // default true !!
m_EmulateRegistry = FALSE; // default true !! m_EmulateRegistry = FALSE; // default true !!
m_FullScreenOnly = FALSE; m_FullScreenOnly = FALSE;
m_FilterMessages = FALSE;
m_NoBanner = FALSE; m_NoBanner = FALSE;
m_StartDebug = FALSE; m_StartDebug = FALSE;
m_FilePath = _T(""); m_FilePath = _T("");

View File

@ -45,6 +45,7 @@ public:
BOOL m_HookDLLs; BOOL m_HookDLLs;
BOOL m_EmulateRegistry; BOOL m_EmulateRegistry;
BOOL m_FullScreenOnly; BOOL m_FullScreenOnly;
BOOL m_FilterMessages;
BOOL m_NoBanner; BOOL m_NoBanner;
BOOL m_StartDebug; BOOL m_StartDebug;
BOOL m_HookEnabled; BOOL m_HookEnabled;

5
host/dxwnd.ini Normal file
View File

@ -0,0 +1,5 @@
[window]
posx=1330
posy=241
sizx=320
sizy=200

Binary file not shown.

View File

@ -246,8 +246,8 @@ BEGIN
EDITTEXT IDC_TITLE,7,22,162,14,ES_AUTOHSCROLL EDITTEXT IDC_TITLE,7,22,162,14,ES_AUTOHSCROLL
LTEXT "Name:",IDC_STATIC,7,9,77,9 LTEXT "Name:",IDC_STATIC,7,9,77,9
EDITTEXT IDC_FILE,7,54,162,14,ES_AUTOHSCROLL EDITTEXT IDC_FILE,7,54,162,14,ES_AUTOHSCROLL
EDITTEXT IDC_MODULE,7,85,162,14,ES_AUTOHSCROLL EDITTEXT IDC_MODULE,188,23,105,14,ES_AUTOHSCROLL | NOT WS_VISIBLE
LTEXT "Additional Hooked Modules:",IDC_STATIC,7,73,125,9 LTEXT "Additional Hooked Modules:",IDC_STATIC,168,7,125,9,NOT WS_VISIBLE
LTEXT "Path:",IDC_STATIC,7,42,77,9 LTEXT "Path:",IDC_STATIC,7,42,77,9
PUSHBUTTON "...",IDC_OPEN,176,53,13,16 PUSHBUTTON "...",IDC_OPEN,176,53,13,16
LTEXT "Window initial position && size",IDC_STATIC,18,198,115,9 LTEXT "Window initial position && size",IDC_STATIC,18,198,115,9
@ -259,23 +259,24 @@ BEGIN
EDITTEXT IDC_POSY,55,210,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT EDITTEXT IDC_POSY,55,210,19,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
EDITTEXT IDC_SIZX,85,210,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_SIZX,85,210,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT
EDITTEXT IDC_SIZY,113,210,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_SIZY,113,210,19,14,ES_AUTOHSCROLL,WS_EX_RIGHT
CONTROL "Do not notify on task switch",IDC_UNNOTIFY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,124,124,10 CONTROL "Do not notify on task switch",IDC_UNNOTIFY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,102,124,10
CONTROL "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,160,109,10 CONTROL "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,138,109,10
CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,136,109,10 CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,114,109,10
CONTROL "Run in Window",IDC_WINDOWIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,148,124,10 CONTROL "Run in Window",IDC_WINDOWIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,126,124,10
GROUPBOX "Generic",IDC_STATIC,7,103,286,84 GROUPBOX "Generic",IDC_STATIC,7,77,286,106
CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,124,108,10 CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,102,108,10
CONTROL "use DLL Injection",IDC_STARTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,136,100,10 CONTROL "use DLL Injection",IDC_STARTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,114,100,10
CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,112,115,10 CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,90,115,10
CONTROL "Hook all DLLs",IDC_HOOKDLLS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,160,124,10 CONTROL "Hook all DLLs",IDC_HOOKDLLS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,138,124,10
CONTROL "Hook enabled",IDC_HOOKENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,112,124,10 CONTROL "Hook enabled",IDC_HOOKENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,90,124,10
CONTROL "X,Y coordinates",IDC_COORDINATES,"Button",BS_AUTORADIOBUTTON | WS_GROUP,170,190,95,10 CONTROL "X,Y coordinates",IDC_COORDINATES,"Button",BS_AUTORADIOBUTTON | WS_GROUP,170,190,95,10
CONTROL "Desktop center",IDC_DESKTOPCENTER,"Button",BS_AUTORADIOBUTTON,170,200,95,10 CONTROL "Desktop center",IDC_DESKTOPCENTER,"Button",BS_AUTORADIOBUTTON,170,200,95,10
CONTROL "Desktop work area",IDC_DESKTOPWORKAREA,"Button",BS_AUTORADIOBUTTON,170,210,95,10 CONTROL "Desktop work area",IDC_DESKTOPWORKAREA,"Button",BS_AUTORADIOBUTTON,170,210,95,10
CONTROL "Desktop",IDC_DESKTOPFULL,"Button",BS_AUTORADIOBUTTON,170,220,95,10 CONTROL "Desktop",IDC_DESKTOPFULL,"Button",BS_AUTORADIOBUTTON,170,220,95,10
CONTROL "Hook child WindowProc",IDC_HOOKCHILDWIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,148,114,10 CONTROL "Hook child WindowProc",IDC_HOOKCHILDWIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,126,104,10
CONTROL "Emulate Registry",IDC_EMULATEREGISTRY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,172,124,10 CONTROL "Emulate Registry",IDC_EMULATEREGISTRY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,150,124,10
CONTROL "Fullscreen only",IDC_FULLSCREENONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,172,114,10 CONTROL "Fullscreen only",IDC_FULLSCREENONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,150,114,10
CONTROL "Filter offending messages",IDC_FILTERMESSAGES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,162,114,10
END END
IDD_TAB_LOG DIALOGEX 0, 0, 300, 240 IDD_TAB_LOG DIALOGEX 0, 0, 300, 240

Binary file not shown.

View File

@ -114,6 +114,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_NoBanner) t->flags2 |= NOBANNER; if(dlg->m_NoBanner) t->flags2 |= NOBANNER;
if(dlg->m_StartDebug) t->flags2 |= STARTDEBUG; if(dlg->m_StartDebug) t->flags2 |= STARTDEBUG;
if(dlg->m_FullScreenOnly) t->flags3 |= FULLSCREENONLY; if(dlg->m_FullScreenOnly) t->flags3 |= FULLSCREENONLY;
if(dlg->m_FilterMessages) t->flags3 |= FILTERMESSAGES;
t->flags &= ~EMULATEFLAGS; t->flags &= ~EMULATEFLAGS;
switch(dlg->m_DxEmulationMode){ switch(dlg->m_DxEmulationMode){
@ -243,6 +244,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_NoBanner = t->flags2 & NOBANNER ? 1 : 0; dlg->m_NoBanner = t->flags2 & NOBANNER ? 1 : 0;
dlg->m_StartDebug = t->flags2 & STARTDEBUG ? 1 : 0; dlg->m_StartDebug = t->flags2 & STARTDEBUG ? 1 : 0;
dlg->m_FullScreenOnly = t->flags3 & FULLSCREENONLY ? 1 : 0; dlg->m_FullScreenOnly = t->flags3 & FULLSCREENONLY ? 1 : 0;
dlg->m_FilterMessages = t->flags3 & FILTERMESSAGES ? 1 : 0;
dlg->m_DxEmulationMode = 0; dlg->m_DxEmulationMode = 0;
if(t->flags & EMULATEBUFFER) dlg->m_DxEmulationMode = 1; if(t->flags & EMULATEBUFFER) dlg->m_DxEmulationMode = 1;