From d5f8dbfeea2fe32e6029987012f752a1e1df1c62 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 11 Aug 2022 17:16:36 +0200 Subject: [PATCH] Disable input to game when typing in console --- libultraship/libultraship/Window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index f4f047428..46c2eddb6 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -66,8 +66,11 @@ extern "C" { pad->err_no = 0; pad->gyro_x = 0; pad->gyro_y = 0; + + if (SohImGui::controller->Opened) return; - if (SohImGui::controller->Opened) return; + ImGuiIO io = ImGui::GetIO(); + if (io.WantCaptureKeyboard) return; Ship::GlobalCtx2::GetInstance()->GetWindow()->GetControlDeck()->WriteToPad(pad); Ship::ExecuteHooks(pad);