Fix the condition of the hook.

This commit is contained in:
OBattler
2025-01-03 13:03:56 +01:00
parent c9f0280951
commit ff098f6c7e

View File

@@ -154,8 +154,8 @@ emu_LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
if (show_second_monitors) for (int monitor_index = 1; monitor_index < MONITORS_NUM; monitor_index++) { if (show_second_monitors) for (int monitor_index = 1; monitor_index < MONITORS_NUM; monitor_index++) {
const auto &secondaryRenderer = main_window->renderers[monitor_index]; const auto &secondaryRenderer = main_window->renderers[monitor_index];
is_over_window = is_over_window && (secondaryRenderer != nullptr) && is_over_window = is_over_window || ((secondaryRenderer != nullptr) &&
(GetForegroundWindow() == ((HWND) secondaryRenderer->winId())); (GetForegroundWindow() == ((HWND) secondaryRenderer->winId())));
} }
if ((nCode < 0) || (nCode != HC_ACTION)/* || (!mouse_capture && !video_fullscreen)*/ || !is_over_window) if ((nCode < 0) || (nCode != HC_ACTION)/* || (!mouse_capture && !video_fullscreen)*/ || !is_over_window)