Skip to content

Commit

Permalink
fix: force UI state when tabbing in with UI visible (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToeKneeRED authored Nov 26, 2024
1 parent 092adb6 commit 1fe2e20
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Code/client/Services/Generic/InputService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ LRESULT CALLBACK InputService::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR
}
ProcessKeyboard(virtualKey, scancode, KEYEVENT_CHAR, false, false);
}
// If the player tabs out/in with UI visible, this WndProc doesn't run during mouse or keyboard events.
// When player tabs in, force the UI state
else if (uMsg == WM_SETFOCUS && s_pOverlay->GetActive())
{
TiltedPhoques::DInputHook::Get().SetEnabled(true);
s_pOverlay->SetActive(true);
pRenderer->SetCursorVisible(true);
}
else if (uMsg == WM_INPUTLANGCHANGE)
{
s_currentACP = GetRealACP();
Expand Down

0 comments on commit 1fe2e20

Please sign in to comment.