From d1338fd92af511135a1ce4f6964ea6f41219fbd6 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Wed, 18 Dec 2024 07:34:36 +0100 Subject: [PATCH] add support for Die by the Sword --- src/config.c | 4 ++++ src/dd.c | 4 ++-- src/directinput.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/config.c b/src/config.c index ba89b87..c2b7710 100644 --- a/src/config.c +++ b/src/config.c @@ -846,6 +846,10 @@ static void cfg_create_ini() "resolutions=2\n" "singlecpu=false\n" "\n" + "; Die by the Sword\n" + "[windie]\n" + "maxgameticks=30\n" + "\n" "; Dragon Throne: Battle of Red Cliffs\n" "[AdSanguo]\n" "maxgameticks=60\n" diff --git a/src/dd.c b/src/dd.c index f5df432..aa183ea 100644 --- a/src/dd.c +++ b/src/dd.c @@ -1549,8 +1549,8 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags) { TRACE(" client rect=%dx%d\n", rc.right, rc.bottom); - g_ddraw.windowed_hack = TRUE; - dd_SetDisplayMode(rc.right, rc.bottom, 16, 0); + //g_ddraw.windowed_hack = TRUE; + //dd_SetDisplayMode(rc.right, rc.bottom, 16, 0); } } } diff --git a/src/directinput.c b/src/directinput.c index 7db6d2d..a0d077d 100644 --- a/src/directinput.c +++ b/src/directinput.c @@ -58,9 +58,9 @@ static HRESULT WINAPI fake_did_SetCooperativeLevel(IDirectInputDeviceA* This, HW TRACE(" mouse_device = %s\n", This == g_mouse_device ? "TRUE" : "FALSE"); dbg_dump_di_scm_flags(dwFlags); - if (This == g_mouse_device && g_ddraw.ref && (dwFlags & DISCL_EXCLUSIVE)) + if (This == g_mouse_device && (dwFlags & DISCL_EXCLUSIVE)) { - if (g_mouse_locked || g_config.devmode) + if (g_mouse_locked || g_config.devmode || !g_ddraw.ref) { while (real_ShowCursor(FALSE) >= 0); }