fix: Only first opened popup appearing properly

This commit is contained in:
WerWolv 2025-09-08 19:51:58 +02:00
parent d08853df8c
commit b039bc14c6
2 changed files with 2 additions and 4 deletions

View File

@ -62,9 +62,6 @@ namespace hex {
std::string m_windowTitle, m_windowTitleFull;
double m_lastStartFrameTime = 0;
double m_lastFrameTime = 0;
std::set<int> m_pressedKeys;
ImGuiExt::ImHexCustomData m_imguiCustomData;

View File

@ -24,6 +24,7 @@
#include <hex/ui/popup.hpp>
#include <hex/ui/banner.hpp>
#include <cmath>
#include <chrono>
#include <csignal>
#include <numbers>
@ -535,7 +536,7 @@ namespace hex {
if (popupDelay <= -1.0) {
popupDelay = 0.2;
} else {
popupDelay -= m_lastFrameTime;
popupDelay -= io.DeltaTime;
if (popupDelay < 0 || popups.size() == 1) {
popupDelay = -2.0;
currPopup = std::move(popups.back());