mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_04_06_src
Former-commit-id: 91f17dc67c3b955350280809333f442ac6afb059
This commit is contained in:
parent
9a53a5014c
commit
f260a88bac
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:614dc453abbfbc0659502a136e3cd3b2dbb7e794dc3c964ffd2f53a784c6f429
|
||||
oid sha256:8448e58dc97c4a242f28a3c94cd1e3837f13fd9cb48d6c3342f84df91fccbbf3
|
||||
size 779264
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f5c8f132cd8013ecb60b7bd0b0a17727fc0e4ffbc2c17756dcb835897d511427
|
||||
size 671232
|
||||
oid sha256:41137464c3c599b09e720882a36a3e1c939081fa477027447459c269fdb15971
|
||||
size 673280
|
||||
|
@ -1453,4 +1453,12 @@ fix?: bypass for WM_FONTCHANGE: avoids "Warhammer: Shadow of the Horned Rat" cra
|
||||
add: WinG32 debug highlighting of blitted rects on screen
|
||||
add: GDI32 debug highlighting of blitted rects on screen
|
||||
add: hooks for GDI32 GetTextExtentPointA and GetTextExtentPoint32A: needed for proper string rendering on "Warhammer: Shadow of the Horned Rat"
|
||||
add: hook for GDI32 GdiAlphaBlend, very rare call that appeared in "RHEM" during savegame load.
|
||||
add: hook for GDI32 GdiAlphaBlend, very rare call that appeared in "RHEM" during savegame load.
|
||||
|
||||
v2.04.06
|
||||
GUI:
|
||||
add: Expert mode
|
||||
DLL:
|
||||
fix: corrected condition to print two virtual registry log messages
|
||||
fix: improved logic to recover surfaces with DDSCAPS_TEXTURE capability - ref. "Dominant Species"
|
||||
fix: fixed cursor clipping state and toggle key to make it work in all conditions
|
@ -101,7 +101,7 @@ static int ReplaceVar(char *pData, LPBYTE *lplpData, LPDWORD lpcbData)
|
||||
}
|
||||
// set output vars if not NULL
|
||||
iTokenLength = strlen(sTokenValue);
|
||||
OutTrace("REPLACED token=%d val=\"%s\" len=%d\n", iTokenIndex, sTokenValue, iTokenLength);
|
||||
OutTraceR("REPLACED token=%d val=\"%s\" len=%d\n", iTokenIndex, sTokenValue, iTokenLength);
|
||||
if(lplpData) {
|
||||
strcpy((char *)*lplpData, sTokenValue);
|
||||
*lplpData += iTokenLength;
|
||||
@ -456,7 +456,7 @@ static LONG myRegOpenKeyEx(
|
||||
if(RegBuf[0]=='['){
|
||||
// beware: registry keys are case insensitive. Must use _strnicmp instead of strncmp
|
||||
if((!_strnicmp(&RegBuf[1],sKey,strlen(sKey))) && (RegBuf[strlen(sKey)+1]==']')){
|
||||
OutTrace("%s: found fake Key=\"%s\" hkResult=%x\n", label, sKey, phkResult ? *phkResult : 0);
|
||||
OutTraceR("%s: found fake Key=\"%s\" hkResult=%x\n", label, sKey, phkResult ? *phkResult : 0);
|
||||
fclose(regf);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
@ -715,11 +715,13 @@ static HRESULT BuildGenericEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf
|
||||
|
||||
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, pu);
|
||||
// v2.04.05: error condition found & fixed on certain platforms for "Dominant Species" only (so far).
|
||||
if ((res == DDERR_UNSUPPORTED) && (ddsd.ddsCaps.dwCaps == (DDSCAPS_SYSTEMMEMORY|DDSCAPS_TEXTURE))){
|
||||
if (((res == DDERR_UNSUPPORTED) || (res == DDERR_UNSUPPORTEDMODE)) &&
|
||||
(ddsd.ddsCaps.dwCaps & DDSCAPS_TEXTURE)){
|
||||
OutTraceDW("BuildGenericEmu: CreateSurface ERROR res=%x(%s) at %d, TEXTURE->OFFSCREENPLAIN retry\n", res, ExplainDDError(res), __LINE__);
|
||||
ddsd.ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN);
|
||||
ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_TEXTURE|DDSCAPS_ALLOCONLOAD);
|
||||
ddsd.ddsCaps.dwCaps |= (DDSCAPS_OFFSCREENPLAIN);
|
||||
res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, pu);
|
||||
}
|
||||
}
|
||||
if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res!=DD_OK)){
|
||||
OutTraceDW("BuildGenericEmu: CreateSurface ERROR res=%x(%s) at %d, retry\n", res, ExplainDDError(res), __LINE__);
|
||||
ddsd.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY;
|
||||
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "TlHelp32.h"
|
||||
|
||||
#define VERSION "2.04.05"
|
||||
#define VERSION "2.04.06"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
|
||||
|
Binary file not shown.
@ -1822,48 +1822,48 @@ HRESULT WINAPI extTexInitialize(void *t, LPDIRECT3DDEVICE lpd3dd, LPDIRECTDRAWSU
|
||||
return (*pTInitialize)(t, lpd3dd, lpdds);
|
||||
}
|
||||
|
||||
HRESULT WINAPI extTexGetHandle(TexGetHandle_Type pTGetHandle, void *t, LPDIRECT3DDEVICE lpd3dd, LPD3DTEXTUREHANDLE lpth)
|
||||
static HRESULT WINAPI extTexGetHandle(int version, TexGetHandle_Type pTGetHandle, void *t, LPDIRECT3DDEVICE lpd3dd, LPD3DTEXTUREHANDLE lpth)
|
||||
{
|
||||
HRESULT ret;
|
||||
OutTrace("Texture::GetHandle lpt=%x lpd3dd=%x lpth=%x\n", t, lpd3dd, lpth);
|
||||
OutTrace("Texture(%d)::GetHandle lpt=%x lpd3dd=%x lpth=%x\n", version, t, lpd3dd, lpth);
|
||||
ret = (*pTGetHandle)(t, lpd3dd, lpth);
|
||||
if(ret) OutTraceE("Texture::Load ERROR res=%x(%s)\n", ret, ExplainDDError(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extTexGetHandle1(void *t, LPDIRECT3DDEVICE lpd3dd, LPD3DTEXTUREHANDLE lpth)
|
||||
{ return extTexGetHandle(pTGetHandle1, t, lpd3dd, lpth); }
|
||||
{ return extTexGetHandle(1, pTGetHandle1, t, lpd3dd, lpth); }
|
||||
HRESULT WINAPI extTexGetHandle2(void *t, LPDIRECT3DDEVICE2 lpd3dd, LPD3DTEXTUREHANDLE lpth)
|
||||
{ return extTexGetHandle(pTGetHandle2, t, (LPDIRECT3DDEVICE)lpd3dd, lpth); }
|
||||
{ return extTexGetHandle(2, pTGetHandle2, t, (LPDIRECT3DDEVICE)lpd3dd, lpth); }
|
||||
|
||||
|
||||
HRESULT WINAPI extTexPaletteChanged(TexPaletteChanged_Type pTPaletteChanged, void *t, DWORD dw1, DWORD dw2)
|
||||
static HRESULT WINAPI extTexPaletteChanged(int version, TexPaletteChanged_Type pTPaletteChanged, void *t, DWORD dw1, DWORD dw2)
|
||||
{
|
||||
HRESULT ret;
|
||||
OutTrace("Texture::PaletteChanged lpt=%x dw1=%x dw2=%x\n", t, dw1, dw2);
|
||||
OutTrace("Texture(%d)::PaletteChanged lpt=%x dw1=%x dw2=%x\n", version, t, dw1, dw2);
|
||||
ret = (*pTPaletteChanged)(t, dw1, dw2);
|
||||
if(ret) OutTraceE("Texture::PaletteChanged ERROR res=%x(%s)\n", ret, ExplainDDError(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extTexPaletteChanged1(void *t, DWORD dw1, DWORD dw2)
|
||||
{ return extTexPaletteChanged(pTPaletteChanged1, t, dw1, dw2); }
|
||||
{ return extTexPaletteChanged(1, pTPaletteChanged1, t, dw1, dw2); }
|
||||
HRESULT WINAPI extTexPaletteChanged2(void *t, DWORD dw1, DWORD dw2)
|
||||
{ return extTexPaletteChanged(pTPaletteChanged2, t, dw1, dw2); }
|
||||
{ return extTexPaletteChanged(2, pTPaletteChanged2, t, dw1, dw2); }
|
||||
|
||||
HRESULT WINAPI extTexLoad(TexLoad_Type pTLoad, void *t, LPDIRECT3DTEXTURE lpt)
|
||||
HRESULT WINAPI extTexLoad(int version, TexLoad_Type pTLoad, void *t, LPDIRECT3DTEXTURE lpt)
|
||||
{
|
||||
HRESULT ret;
|
||||
OutTrace("Texture::Load lpt=%x lpd3dt=%x\n", t, lpt);
|
||||
OutTrace("Texture(%d)::Load lpt=%x lpd3dt=%x\n", version, t, lpt);
|
||||
ret = (*pTLoad)(t, lpt);
|
||||
if(ret) OutTraceE("Texture::Load ERROR res=%x(%s)\n", ret, ExplainDDError(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extTexLoad1(void *t, LPDIRECT3DTEXTURE lpt)
|
||||
{ return extTexLoad(pTLoad1, t, lpt); }
|
||||
{ return extTexLoad(1, pTLoad1, t, lpt); }
|
||||
HRESULT WINAPI extTexLoad2(void *t, LPDIRECT3DTEXTURE lpt)
|
||||
{ return extTexLoad(pTLoad2, t, lpt); }
|
||||
{ return extTexLoad(2, pTLoad2, t, lpt); }
|
||||
|
||||
HRESULT WINAPI extTexUnload(void *t)
|
||||
{
|
||||
|
@ -467,7 +467,7 @@ BOOL IsIATSequential(HMODULE module)
|
||||
// skip first string
|
||||
for(; *fname; fname++); for(; !*fname; fname++);
|
||||
// if second string is another DLL it is sequential, otherwise not.
|
||||
OutTraceB("IsIATSequential: second entry=%s\n", fname);
|
||||
//OutTraceB("IsIATSequential: second entry=%s\n", fname);
|
||||
return (BOOL)stristr(fname, ".DLL");
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
|
@ -224,7 +224,7 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
POINT prev, curr;
|
||||
RECT rect;
|
||||
static int i=0;
|
||||
static int ClipCursorToggleState = 1;
|
||||
static int ClipCursorToggleState = 0;
|
||||
WNDPROC pWindowProc;
|
||||
extern void dxwFixWindowPos(char *, HWND, LPARAM);
|
||||
extern LPRECT lpClipRegion;
|
||||
@ -236,9 +236,20 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
extern void DDrawScreenShot(int);
|
||||
|
||||
if(DoOnce){
|
||||
RECT cliprect;
|
||||
BOOL clipret;
|
||||
DoOnce=FALSE;
|
||||
IsToBeLocked=(dxw.dwFlags1 & LOCKWINPOS);
|
||||
LastTimeShift=SaveTimeShift=dxw.TimeShift;
|
||||
clipret = (*pGetClipCursor)(&cliprect);
|
||||
// v2.04.06: you always get a clipper area. To tell that the clipper is NOT active for your window
|
||||
// you can compare the clipper area with the whole desktop. If they are equivalent, you have no
|
||||
// clipper (or you are in fullscreen mode, but that is equivalent).
|
||||
ClipCursorToggleState = TRUE;
|
||||
if (((cliprect.right - cliprect.left) == (*pGetSystemMetrics)(SM_CXVIRTUALSCREEN)) &&
|
||||
((cliprect.bottom - cliprect.top) == (*pGetSystemMetrics)(SM_CYVIRTUALSCREEN)))
|
||||
ClipCursorToggleState = FALSE;
|
||||
OutTraceDW("Initial clipper status=%x\n", ClipCursorToggleState);
|
||||
}
|
||||
|
||||
// v2.1.93: adjust clipping region
|
||||
@ -467,7 +478,10 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
case WM_MBUTTONUP:
|
||||
case WM_MBUTTONDBLCLK:
|
||||
if(dxw.Windowize){
|
||||
if((dxw.dwFlags1 & CLIPCURSOR) && ClipCursorToggleState) dxw.SetClipCursor();
|
||||
if((dxw.dwFlags1 & CLIPCURSOR) && !ClipCursorToggleState) {
|
||||
ClipCursorToggleState = TRUE;
|
||||
dxw.SetClipCursor();
|
||||
}
|
||||
if((dxw.dwFlags1 & MODIFYMOUSE) && !(dxw.dwFlags1 & MESSAGEPROC)){ // mouse processing
|
||||
// scale mouse coordinates
|
||||
prev.x = LOWORD(lparam);
|
||||
@ -488,7 +502,10 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
OutTraceDW("WindowProc: hwnd=%x GOT FOCUS\n", hwnd);
|
||||
if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor();
|
||||
if(dxw.dwFlags1 & CLIPCURSOR) {
|
||||
ClipCursorToggleState = TRUE;
|
||||
dxw.SetClipCursor();
|
||||
}
|
||||
if (dxw.dwFlags1 & DISABLECLIPPING) extClipCursor(lpClipRegion);
|
||||
break;
|
||||
case WM_KILLFOCUS:
|
||||
@ -551,11 +568,9 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
||||
DxWndKey=dxw.MapKeysConfig(message, lparam, wparam);
|
||||
switch (DxWndKey){
|
||||
case DXVK_CLIPTOGGLE:
|
||||
if(dxw.dwFlags1 & CLIPCURSOR){
|
||||
OutTraceDW("WindowProc: WM_SYSKEYDOWN key=%x ToggleState=%x\n",wparam,ClipCursorToggleState);
|
||||
ClipCursorToggleState = !ClipCursorToggleState;
|
||||
ClipCursorToggleState ? dxw.SetClipCursor() : dxw.EraseClipCursor();
|
||||
}
|
||||
OutTraceDW("WindowProc: WM_SYSKEYDOWN key=%x ToggleState=%x\n", wparam, ClipCursorToggleState);
|
||||
ClipCursorToggleState = !ClipCursorToggleState;
|
||||
ClipCursorToggleState ? dxw.SetClipCursor() : dxw.EraseClipCursor();
|
||||
break;
|
||||
case DXVK_REFRESH:
|
||||
dxw.ScreenRefresh();
|
||||
|
@ -80,7 +80,7 @@ IMPLEMENT_DYNAMIC(CGlobalSettings, CDialog)
|
||||
CGlobalSettings::CGlobalSettings(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CGlobalSettings::IDD, pParent)
|
||||
{
|
||||
m_DebugMode = GetPrivateProfileInt("window", "debug", 0, gInitPath);
|
||||
//m_DebugMode = GetPrivateProfileInt("window", "debug", 0, gInitPath);
|
||||
m_AutoHideMode = GetPrivateProfileInt("window", "autohide", 0, gInitPath);
|
||||
m_CheckAdminRights = GetPrivateProfileInt("window", "checkadmin", 0, gInitPath);
|
||||
m_NameFromFolder = GetPrivateProfileInt("window", "namefromfolder", 0, gInitPath);
|
||||
@ -112,7 +112,7 @@ void CGlobalSettings::DoDataExchange(CDataExchange* pDX)
|
||||
CString sDefaultPosX, sDefaultPosY;
|
||||
sDefaultPosX.Format("%d", m_DefaultPosX);
|
||||
sDefaultPosY.Format("%d", m_DefaultPosY);
|
||||
DDX_Check(pDX, IDC_CONFIG_DEBUGMODE, m_DebugMode);
|
||||
//DDX_Check(pDX, IDC_CONFIG_DEBUGMODE, m_DebugMode);
|
||||
DDX_Check(pDX, IDC_CONFIG_AUTOHIDE, m_AutoHideMode);
|
||||
DDX_Check(pDX, IDC_CONFIG_CHECKADMIN, m_CheckAdminRights);
|
||||
DDX_Check(pDX, IDC_CONFIG_NAMEFROMFOLDER, m_NameFromFolder);
|
||||
@ -180,8 +180,8 @@ void CGlobalSettings::OnOK()
|
||||
char val[32];
|
||||
CDialog::OnOK();
|
||||
// boolean flags
|
||||
sprintf_s(val, sizeof(val), "%i", m_DebugMode);
|
||||
WritePrivateProfileString("window", "debug", val, gInitPath);
|
||||
//sprintf_s(val, sizeof(val), "%i", m_DebugMode);
|
||||
//WritePrivateProfileString("window", "debug", val, gInitPath);
|
||||
sprintf_s(val, sizeof(val), "%i", m_AutoHideMode);
|
||||
WritePrivateProfileString("window", "autohide", val, gInitPath);
|
||||
sprintf_s(val, sizeof(val), "%i", m_CheckAdminRights);
|
||||
@ -244,7 +244,7 @@ void CGlobalSettings::OnOK()
|
||||
WritePrivateProfileString("keymapping", HKeys[i].sIniLabel, "", gInitPath);
|
||||
}
|
||||
//(CDxwndhostView *)(this->GetParent())->UpdateHotKeys();
|
||||
gbDebug = m_DebugMode;
|
||||
//gbDebug = m_DebugMode;
|
||||
gAutoHideMode = m_AutoHideMode;
|
||||
gWarnOnExit = m_WarnOnExit;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
BOOL m_DebugMode;
|
||||
//BOOL m_DebugMode;
|
||||
BOOL m_UpdatePaths;
|
||||
BOOL m_AutoHideMode;
|
||||
BOOL m_CheckAdminRights;
|
||||
|
Binary file not shown.
@ -148,17 +148,6 @@ BOOL CDxwndhostApp::InitInstance()
|
||||
|
||||
// standard initialization
|
||||
|
||||
// Register the document template.
|
||||
|
||||
CSingleDocTemplate* pDocTemplate;
|
||||
pDocTemplate = new CSingleDocTemplate(
|
||||
IDR_MAINFRAME,
|
||||
RUNTIME_CLASS(CDxwndhostDoc),
|
||||
RUNTIME_CLASS(CMainFrame), // SDI main frame window
|
||||
RUNTIME_CLASS(CDxwndhostView));
|
||||
AddDocTemplate(pDocTemplate);
|
||||
|
||||
|
||||
// DDE file open: Parse command line for standard shell commands and so on.
|
||||
// Parse command line for standard shell commands, DDE, file open
|
||||
// and user-defined flags. The CCommandLine class has been replaced
|
||||
@ -174,6 +163,16 @@ BOOL CDxwndhostApp::InitInstance()
|
||||
if(!gAutoHideMode) gAutoHideMode = GetPrivateProfileInt("window", "autohide", 0, InitPath); // debug flag set from config file
|
||||
gWarnOnExit = GetPrivateProfileInt("window", "warnonexit", 0, InitPath); // WarnOnExit flag set from config file
|
||||
|
||||
// Register the document template.
|
||||
|
||||
CSingleDocTemplate* pDocTemplate;
|
||||
pDocTemplate = new CSingleDocTemplate(
|
||||
gbDebug ? IDR_MAINFRAME_EX : IDR_MAINFRAME,
|
||||
RUNTIME_CLASS(CDxwndhostDoc),
|
||||
RUNTIME_CLASS(CMainFrame), // SDI main frame window
|
||||
RUNTIME_CLASS(CDxwndhostView));
|
||||
AddDocTemplate(pDocTemplate);
|
||||
|
||||
if(!LangSelected){
|
||||
LANGID LangId;
|
||||
char LangString[20+1];
|
||||
|
Binary file not shown.
Binary file not shown.
@ -129,6 +129,7 @@ BEGIN_MESSAGE_MAP(CDxwndhostView, CListView)
|
||||
ON_COMMAND(ID_DELETE, OnDelete)
|
||||
ON_COMMAND(ID_FILE_SORTPROGRAMSLIST, OnSort)
|
||||
ON_COMMAND(ID_EDIT_GLOBALSETTINGS, OnGlobalSettings)
|
||||
ON_COMMAND(ID_OPTIONS_EXPERTMODE, OnExpertModeToggle)
|
||||
ON_COMMAND(ID_FILE_CLEARALLLOGS, OnClearAllLogs)
|
||||
ON_COMMAND(ID_FILE_GOTOTRAYICON, OnGoToTrayIcon)
|
||||
ON_COMMAND(ID_FILE_SAVE, OnSaveFile)
|
||||
@ -2539,6 +2540,19 @@ void CDxwndhostView::OnGlobalSettings()
|
||||
pDlg->ShowWindow(SW_SHOW);
|
||||
}
|
||||
|
||||
void CDxwndhostView::OnExpertModeToggle()
|
||||
{
|
||||
CMenu *menu;
|
||||
gbDebug = !gbDebug;
|
||||
menu = this->GetParent()->GetMenu();
|
||||
::DestroyMenu(menu->GetSafeHmenu());
|
||||
menu->LoadMenu(gbDebug ? IDR_MAINFRAME_EX : IDR_MAINFRAME);
|
||||
this->GetParent()->SetMenu(menu);
|
||||
menu->CheckMenuItem(ID_OPTIONS_EXPERTMODE, gbDebug ? MF_CHECKED : MF_UNCHECKED);
|
||||
WritePrivateProfileString("window", "debug", (gbDebug ? "1" : "0"), gInitPath);
|
||||
|
||||
}
|
||||
|
||||
void CDxwndhostView::OnViewTimeSlider()
|
||||
{
|
||||
CTimeSliderDialog *pDlg = new CTimeSliderDialog();
|
||||
|
@ -83,6 +83,7 @@ protected:
|
||||
afx_msg void OnTaskbarShow();
|
||||
afx_msg void OnSort();
|
||||
afx_msg void OnGlobalSettings();
|
||||
afx_msg void OnExpertModeToggle();
|
||||
afx_msg void OnViewLog();
|
||||
afx_msg void OnDeleteLog();
|
||||
afx_msg void OnDebugView();
|
||||
|
BIN
host/resource
BIN
host/resource
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user