mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
allow to toggle windowed mode with F4 in HoMM games
This commit is contained in:
parent
8316f89eb4
commit
c7312c2c07
@ -103,6 +103,7 @@ typedef struct CNCDDRAWCONFIG
|
|||||||
BOOL stronghold_hack;
|
BOOL stronghold_hack;
|
||||||
BOOL mgs_hack;
|
BOOL mgs_hack;
|
||||||
BOOL tlc_hack;
|
BOOL tlc_hack;
|
||||||
|
BOOL homm_hack;
|
||||||
|
|
||||||
} CNCDDRAWCONFIG;
|
} CNCDDRAWCONFIG;
|
||||||
|
|
||||||
|
@ -113,6 +113,7 @@ void cfg_load()
|
|||||||
GET_BOOL(g_config.stronghold_hack, "stronghold_hack", FALSE);
|
GET_BOOL(g_config.stronghold_hack, "stronghold_hack", FALSE);
|
||||||
GET_BOOL(g_config.mgs_hack, "mgs_hack", FALSE);
|
GET_BOOL(g_config.mgs_hack, "mgs_hack", FALSE);
|
||||||
GET_BOOL(g_config.tlc_hack, "tlc_hack", FALSE);
|
GET_BOOL(g_config.tlc_hack, "tlc_hack", FALSE);
|
||||||
|
GET_BOOL(g_config.homm_hack, "homm_hack", FALSE);
|
||||||
|
|
||||||
GameHandlesClose = GameHandlesClose || g_config.infantryhack;
|
GameHandlesClose = GameHandlesClose || g_config.infantryhack;
|
||||||
|
|
||||||
@ -874,11 +875,17 @@ static void cfg_create_ini()
|
|||||||
"[Heroes3]\n"
|
"[Heroes3]\n"
|
||||||
"renderer=opengl\n"
|
"renderer=opengl\n"
|
||||||
"game_handles_close=true\n"
|
"game_handles_close=true\n"
|
||||||
|
"homm_hack=true\n"
|
||||||
"\n"
|
"\n"
|
||||||
"; Heroes of Might and Magic III HD Mod\n"
|
"; Heroes of Might and Magic III HD Mod\n"
|
||||||
"[Heroes3 HD]\n"
|
"[Heroes3 HD]\n"
|
||||||
"renderer=opengl\n"
|
"renderer=opengl\n"
|
||||||
"game_handles_close=true\n"
|
"game_handles_close=true\n"
|
||||||
|
"homm_hack=true\n"
|
||||||
|
"\n"
|
||||||
|
"; Heroes of Might and Magic IV\n"
|
||||||
|
"[heroes4]\n"
|
||||||
|
"homm_hack=true\n"
|
||||||
"\n"
|
"\n"
|
||||||
"; Hard Truck: Road to Victory\n"
|
"; Hard Truck: Road to Victory\n"
|
||||||
"[htruck]\n"
|
"[htruck]\n"
|
||||||
|
@ -777,6 +777,12 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||||||
}
|
}
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
{
|
{
|
||||||
|
if (g_config.homm_hack && wParam == VK_F4) /* Heroes of Might and Magic 3 and 4 */
|
||||||
|
{
|
||||||
|
util_toggle_fullscreen();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_config.hotkeys.unlock_cursor1 &&
|
if (g_config.hotkeys.unlock_cursor1 &&
|
||||||
(wParam == VK_CONTROL || wParam == g_config.hotkeys.unlock_cursor1))
|
(wParam == VK_CONTROL || wParam == g_config.hotkeys.unlock_cursor1))
|
||||||
{
|
{
|
||||||
@ -808,6 +814,9 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||||||
}
|
}
|
||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
{
|
{
|
||||||
|
if (g_config.homm_hack && wParam == VK_F4) /* Heroes of Might and Magic 3 and 4 */
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (g_config.hotkeys.screenshot && wParam == g_config.hotkeys.screenshot)
|
if (g_config.hotkeys.screenshot && wParam == g_config.hotkeys.screenshot)
|
||||||
ss_take_screenshot(g_ddraw.primary);
|
ss_take_screenshot(g_ddraw.primary);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user