diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index b800e834..0f8d4b37 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -93,7 +93,7 @@ LRESULT APIENTRY WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; } - if(s_pOverlay->IsEnabled() && uMsg != WM_PAINT && uMsg != WM_ACTIVATE && uMsg != WM_QUIT && uMsg != WM_CLOSE) + if(s_pOverlay->IsEnabled() && uMsg != WM_PAINT && uMsg != WM_ACTIVATE && uMsg != WM_QUIT && uMsg != WM_CLOSE && uMsg != WM_DESTROY) { return true; } @@ -247,8 +247,8 @@ void Overlay::Render(IDXGISwapChain3* pSwapChain) static std::vector s_consoleResult; static char command[512] = { 0 }; - ImGui::InputText("Console", command, std::size(command)); - if (ImGui::Button("Execute")) + auto execute = ImGui::InputText("Console", command, std::size(command), ImGuiInputTextFlags_EnterReturnsTrue); + if (ImGui::Button("Execute") || execute) { Result result;