Skip to content

Commit

Permalink
add support for Die by the Sword
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Dec 18, 2024
1 parent 7af3be8 commit d1338fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/directinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d1338fd

Please sign in to comment.