Skip to content

Commit

Permalink
#373 fix double screenshot issue
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Jan 1, 2025
1 parent d106cf3 commit b7b60aa
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,22 @@ LRESULT CALLBACK keyboard_hook_proc(int code, WPARAM wParam, LPARAM lParam)
return 1;
}

if (wParam == g_config.hotkeys.screenshot && key_released)
if (wParam == g_config.hotkeys.screenshot)
{
ss_take_screenshot(g_ddraw.primary);
// VK_SNAPSHOT does not have a KEYDOWN event...
if (g_config.hotkeys.screenshot == VK_SNAPSHOT)
{
if (key_released)
{
ss_take_screenshot(g_ddraw.primary);
return 1;
}
}
else if (key_triggered)
{
ss_take_screenshot(g_ddraw.primary);
return 1;
}
}

if (wParam == g_config.hotkeys.unlock_cursor1 || wParam == VK_CONTROL)
Expand Down

0 comments on commit b7b60aa

Please sign in to comment.