mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-02-18 11:30:11 +00:00
imgui: fix End call when window is collapsed (#850)
This commit is contained in:
parent
e3c2a91477
commit
a0cf4ce7de
src
|
@ -253,8 +253,7 @@ void MsgDialogUi::Draw() {
|
||||||
SetNextWindowCollapsed(false);
|
SetNextWindowCollapsed(false);
|
||||||
KeepNavHighlight();
|
KeepNavHighlight();
|
||||||
// Hack to allow every dialog to have a unique window
|
// Hack to allow every dialog to have a unique window
|
||||||
if (Begin("Message Dialog##MessageDialog", nullptr,
|
if (Begin("Message Dialog##MessageDialog", nullptr, ImGuiWindowFlags_NoSavedSettings)) {
|
||||||
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings)) {
|
|
||||||
switch (state->GetMode()) {
|
switch (state->GetMode()) {
|
||||||
case MsgDialogMode::USER_MSG:
|
case MsgDialogMode::USER_MSG:
|
||||||
DrawUser();
|
DrawUser();
|
||||||
|
@ -266,8 +265,8 @@ void MsgDialogUi::Draw() {
|
||||||
DrawSystemMessage();
|
DrawSystemMessage();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
End();
|
|
||||||
}
|
}
|
||||||
|
End();
|
||||||
|
|
||||||
first_render = false;
|
first_render = false;
|
||||||
}
|
}
|
|
@ -9,8 +9,10 @@ void ImGui::Layers::VideoInfo::Draw() {
|
||||||
|
|
||||||
m_show = IsKeyPressed(ImGuiKey_F10, false) ^ m_show;
|
m_show = IsKeyPressed(ImGuiKey_F10, false) ^ m_show;
|
||||||
|
|
||||||
if (m_show && Begin("Video Info")) {
|
if (m_show) {
|
||||||
Text("Frame time: %.3f ms (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
|
if (Begin("Video Info")) {
|
||||||
|
Text("Frame time: %.3f ms (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
|
||||||
|
}
|
||||||
End();
|
End();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue