Skip to content

Commit 4b0e235

Browse files
committed
Fix closing in-game menu from Close button leaves cursor visible on screen
1 parent b7a025a commit 4b0e235

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

OptiScaler/menu/menu_common.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -3150,8 +3150,17 @@ bool MenuCommon::RenderMenu()
31503150

31513151
if (ImGui::Button("Close"))
31523152
{
3153-
_showMipmapCalcWindow = false;
31543153
_isVisible = false;
3154+
3155+
io.ConfigFlags = ImGuiConfigFlags_NavNoCaptureKeyboard | ImGuiConfigFlags_NoMouse | ImGuiConfigFlags_NoMouseCursorChange | ImGuiConfigFlags_NoKeyboard;
3156+
3157+
if (pfn_ClipCursor_hooked)
3158+
pfn_ClipCursor(&_cursorLimit);
3159+
3160+
_showMipmapCalcWindow = false;
3161+
io.MouseDrawCursor = false;
3162+
io.WantCaptureKeyboard = false;
3163+
io.WantCaptureMouse = false;
31553164
}
31563165

31573166
ImGui::Spacing();

0 commit comments

Comments
 (0)