diff --git a/Include/dxwnd.h b/Include/dxwnd.h index 5efc826..19f592c 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -100,6 +100,7 @@ #define YUV2RGB 0x00040000 // Simulate YUV to RGB 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 FILTERMESSAGES 0x00200000 // eliminates window-related messages that might be offending for a fullscreen program // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general diff --git a/build/dxwnd.dll b/build/dxwnd.dll index c3b90e9..55ef062 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:996722440a942e7241f3ee9fc60589c3dee97d84b8487c8c319ebf8962da3105 -size 406016 +oid sha256:3f5743861a1292a4618e1a2ba0010db02dbcd6cf7af54405d41963ffc14594c0 +size 407040 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index 29a59a1..d840ab8 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ccd2bbf780cc35a20ef2cd852c3b1a5934717b1d477906c67b3d3a9ad156e19 +oid sha256:fdfc4f4a7a785e89e56cf5ea2ec95e1735e2ffe4a572a4036764839d377bf628 size 524800 diff --git a/build/dxwnd.ini b/build/dxwnd.ini new file mode 100644 index 0000000..aeb736c --- /dev/null +++ b/build/dxwnd.ini @@ -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 diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index ae2bc15..dcc2b62 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -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. 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 + diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index d28f439..37b7074 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -372,7 +372,7 @@ static void DescribeSurface(LPDIRECTDRAWSURFACE lpdds, int dxversion, char *labe res=lpdds->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); } 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); } @@ -2225,9 +2225,12 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS HRESULT res; // create BackBuffer surface - ClearSurfaceDesc((void *)&ddsd, dxversion); - ddsd.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH; - ddsd.ddsCaps.dwCaps=DDSCAPS_SYSTEMMEMORY; + // ClearSurfaceDesc((void *)&ddsd, dxversion); + memcpy(&ddsd, lpddsd, lpddsd->dwSize); + 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; ddsd.dwWidth = dxw.GetScreenWidth(); ddsd.dwHeight = dxw.GetScreenHeight(); @@ -2235,6 +2238,8 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS LPDIRECTDRAWSURFACE lpPrim; DDSURFACEDESC2 prim; (*pGetGDISurface)(lpPrimaryDD, &lpPrim); + memset(&prim, 0, sizeof(DDSURFACEDESC2)); + prim.dwSize = (dxversion >= 4) ? sizeof(DDSURFACEDESC2) : sizeof(DDSURFACEDESC); res=lpPrim->GetSurfaceDesc((DDSURFACEDESC *)&prim); (*pReleaseS)(lpPrim); ddsd.dwWidth = prim.dwWidth; @@ -2244,9 +2249,16 @@ static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Backbuf]" , __LINE__); res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); if(res) { - OutTraceE("CreateSurface ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); - if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); - return res; + if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res==DDERR_OUTOFVIDEOMEMORY)){ + OutTraceD("CreateSurface: CreateSurface DDERR_OUTOFVIDEOMEMORY ERROR at %d, retry in SYSTEMMEMORY\n", __LINE__); + 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) { ddsd.ddsCaps.dwCaps=DDSCAPS_VIDEOMEMORY; diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index 014885e..92f45fb 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -59,7 +59,7 @@ static char *Flag3Names[32]={ "SAVECAPS", "SINGLEPROCAFFINITY", "EMULATEREGISTRY", "CDROMDRIVETYPE", "NOWINDOWMOVE", "DISABLEHAL", "LOCKSYSCOLORS", "EMULATEDC", "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:29", "Flags3:30", "Flags3:31", "Flags3:32", }; @@ -843,6 +843,28 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp } #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){ // v2.02.13: added WM_GETMINMAXINFO/WM_NCCALCSIZE interception - (see Actua Soccer 3 problems...) //case WM_NCDESTROY: @@ -1028,9 +1050,11 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp GetHookInfo()->CursorY=HIWORD(lparam); break; case WM_SETFOCUS: + OutTraceD("WindowProc: hwnd=%x GOT FOCUS\n", hwnd); if (dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion); break; case WM_KILLFOCUS: + OutTraceD("WindowProc: hwnd=%x LOST FOCUS\n", hwnd); if (dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor(); if (dxw.dwFlags1 & ENABLECLIPPING) (*pClipCursor)(NULL); break; diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index 74c3782..46282f0 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -202,6 +202,12 @@ POINT dxwCore::FixCursorPos(POINT prev) // remember: rect from GetClientRect always start at 0,0! if(dxw.dwFlags1 & MODIFYMOUSE){ 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 OutTraceD("GetClientRect ERROR %d at %d\n", GetLastError(),__LINE__); curr.x = curr.y = 0; @@ -210,13 +216,13 @@ POINT dxwCore::FixCursorPos(POINT prev) h = rect.bottom - rect.top; if (dxw.dwFlags2 & KEEPASPECTRATIO) { - if ((w * iSizY) > (h * iSizX)){ - b = (w - (h * iSizX / iSizY))/2; + if ((w * iRatioY) > (h * iRatioX)){ + b = (w - (h * iRatioX / iRatioY))/2; curr.x -= b; w -= 2*b; } else { - b = (h - (w * iSizY / iSizX))/2; + b = (h - (w * iRatioY / iRatioX))/2; curr.y -= b; h -= 2*b; } @@ -329,15 +335,21 @@ void dxwCore::SethWnd(HWND hwnd) void dxwCore::FixWorkarea(LPRECT workarea) { 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; h = workarea->bottom - workarea->top; - if ((w * iSizY) > (h * iSizX)){ - b = (w - (h * iSizX / iSizY))/2; + if ((w * iRatioY) > (h * iRatioX)){ + b = (w - (h * iRatioX / iRatioY))/2; workarea->left += b; workarea->right -= b; } else { - b = (h - (w * iSizY / iSizX))/2; + b = (h - (w * iRatioY / iRatioX))/2; workarea->top += b; workarea->bottom -= b; } @@ -349,23 +361,29 @@ RECT dxwCore::MapWindowRect(LPRECT lpRect) RECT RetRect; RECT ClientRect; 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)){ OutTraceE("GetClientRect ERROR: err=%d hwnd=%x at %d\n", GetLastError(), hWnd, __LINE__); // v2.02.31: try.... ClientRect.top=ClientRect.left=0; - ClientRect.right=dxw.iSizX; - ClientRect.bottom=dxw.iSizY; + ClientRect.right=iRatioX; + ClientRect.bottom=iRatioY; } RetRect=ClientRect; bx = by = 0; if (dwFlags2 & KEEPASPECTRATIO){ w = RetRect.right - RetRect.left; h = RetRect.bottom - RetRect.top; - if ((w * iSizY) > (h * iSizX)){ - bx = (w - (h * iSizX / iSizY))/2; + if ((w * iRatioY) > (h * iRatioX)){ + bx = (w - (h * iRatioX / iRatioY))/2; } else { - by = (h - (w * iSizY / iSizX))/2; + by = (h - (w * iRatioY / iRatioX))/2; } OutTraceB("bx=%d by=%d\n", bx, by); } @@ -478,8 +496,8 @@ void dxwCore::UnmapClient(LPPOINT lppoint) (*pGetClientRect)(hWnd, &client); w = client.right ? client.right : iSizX; h = client.bottom ? client.bottom : iSizY; - lppoint->x = (lppoint->x * (int)dwScreenWidth) / w; - lppoint->y = (lppoint->y * (int)dwScreenHeight) / h; + if(w) lppoint->x = (lppoint->x * (int)dwScreenWidth) / w; + if(h) lppoint->y = (lppoint->y * (int)dwScreenHeight) / h; } void dxwCore::UnmapClient(int *nXDest, int *nYDest) @@ -489,8 +507,8 @@ void dxwCore::UnmapClient(int *nXDest, int *nYDest) (*pGetClientRect)(hWnd, &client); w = client.right ? client.right : iSizX; h = client.bottom ? client.bottom : iSizY; - *nXDest= *nXDest * (int)dwScreenWidth / w; - *nYDest= *nYDest * (int)dwScreenHeight / h; + if(w) *nXDest= *nXDest * (int)dwScreenWidth / w; + if(h) *nYDest= *nYDest * (int)dwScreenHeight / h; } void dxwCore::MapWindow(LPRECT rect) diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index 89dfac1..d180677 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "dxwnd.h" #include "dxwcore.hpp" -#define VERSION "2.02.34" +#define VERSION "2.02.35" #define DDTHREADLOCK 1 diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index c09b79a..9dad871 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/host/Resource.h b/host/Resource.h index e18d3b4..07e632e 100644 --- a/host/Resource.h +++ b/host/Resource.h @@ -169,6 +169,7 @@ #define IDC_RGB2YUV 1126 #define IDC_FIXD3DFRAME 1127 #define IDC_BUFFEREDIOFIX 1128 +#define IDC_FILTERMESSAGES 1129 #define ID_MODIFY 32771 #define ID_DELETE 32772 #define ID_ADD 32773 diff --git a/host/TabProgram.cpp b/host/TabProgram.cpp index 90b34ed..71dcc11 100644 --- a/host/TabProgram.cpp +++ b/host/TabProgram.cpp @@ -36,6 +36,7 @@ void CTabProgram::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_HOOKDLLS, cTarget->m_HookDLLs); DDX_Check(pDX, IDC_EMULATEREGISTRY, cTarget->m_EmulateRegistry); 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_HOOKENABLED, cTarget->m_HookEnabled); DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner); diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index 6357e12..80eeeed 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -51,6 +51,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_HookEnabled = TRUE; // default true !! m_EmulateRegistry = FALSE; // default true !! m_FullScreenOnly = FALSE; + m_FilterMessages = FALSE; m_NoBanner = FALSE; m_StartDebug = FALSE; m_FilePath = _T(""); diff --git a/host/TargetDlg.h b/host/TargetDlg.h index 103d7d4..a296bd2 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -45,6 +45,7 @@ public: BOOL m_HookDLLs; BOOL m_EmulateRegistry; BOOL m_FullScreenOnly; + BOOL m_FilterMessages; BOOL m_NoBanner; BOOL m_StartDebug; BOOL m_HookEnabled; diff --git a/host/dxwnd.ini b/host/dxwnd.ini new file mode 100644 index 0000000..f677540 --- /dev/null +++ b/host/dxwnd.ini @@ -0,0 +1,5 @@ +[window] +posx=1330 +posy=241 +sizx=320 +sizy=200 diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps index 1e474f3..a6286a8 100644 Binary files a/host/dxwndhost.aps and b/host/dxwndhost.aps differ diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc index 218996b..c027695 100644 --- a/host/dxwndhost.rc +++ b/host/dxwndhost.rc @@ -246,8 +246,8 @@ BEGIN EDITTEXT IDC_TITLE,7,22,162,14,ES_AUTOHSCROLL LTEXT "Name:",IDC_STATIC,7,9,77,9 EDITTEXT IDC_FILE,7,54,162,14,ES_AUTOHSCROLL - EDITTEXT IDC_MODULE,7,85,162,14,ES_AUTOHSCROLL - LTEXT "Additional Hooked Modules:",IDC_STATIC,7,73,125,9 + EDITTEXT IDC_MODULE,188,23,105,14,ES_AUTOHSCROLL | NOT WS_VISIBLE + LTEXT "Additional Hooked Modules:",IDC_STATIC,168,7,125,9,NOT WS_VISIBLE LTEXT "Path:",IDC_STATIC,7,42,77,9 PUSHBUTTON "...",IDC_OPEN,176,53,13,16 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_SIZX,85,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 "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,160,109,10 - CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,136,109,10 - CONTROL "Run in Window",IDC_WINDOWIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,148,124,10 - GROUPBOX "Generic",IDC_STATIC,7,103,286,84 - CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,124,108,10 - CONTROL "use DLL Injection",IDC_STARTDEBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,136,100,10 - CONTROL "Remap Client Rect",IDC_CLIENTREMAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,112,115,10 - CONTROL "Hook all DLLs",IDC_HOOKDLLS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,160,124,10 - CONTROL "Hook enabled",IDC_HOOKENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,112,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,138,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,126,124,10 + GROUPBOX "Generic",IDC_STATIC,7,77,286,106 + 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,114,100,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,138,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 "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",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 "Emulate Registry",IDC_EMULATEREGISTRY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,172,124,10 - CONTROL "Fullscreen only",IDC_FULLSCREENONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,172,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,150,124,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 IDD_TAB_LOG DIALOGEX 0, 0, 300, 240 diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index f751908..eeb1246 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhostView.cpp b/host/dxwndhostView.cpp index 1514f94..69a50f4 100644 --- a/host/dxwndhostView.cpp +++ b/host/dxwndhostView.cpp @@ -114,6 +114,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg) if(dlg->m_NoBanner) t->flags2 |= NOBANNER; if(dlg->m_StartDebug) t->flags2 |= STARTDEBUG; if(dlg->m_FullScreenOnly) t->flags3 |= FULLSCREENONLY; + if(dlg->m_FilterMessages) t->flags3 |= FILTERMESSAGES; t->flags &= ~EMULATEFLAGS; 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_StartDebug = t->flags2 & STARTDEBUG ? 1 : 0; dlg->m_FullScreenOnly = t->flags3 & FULLSCREENONLY ? 1 : 0; + dlg->m_FilterMessages = t->flags3 & FILTERMESSAGES ? 1 : 0; dlg->m_DxEmulationMode = 0; if(t->flags & EMULATEBUFFER) dlg->m_DxEmulationMode = 1;