From 3e4eeb86304f44b9b71296f014077ba7c1f61cb2 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Mon, 31 Jan 2022 23:25:17 +0600 Subject: [PATCH] Fix updater window not showing on start --- src/dllmain.cpp | 1 + src/interface.cpp | 11 ++++++----- src/version.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index eb7c908..eb362c2 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -5,6 +5,7 @@ void EditorThread(void* param) { ObjManager::Init(); + Updater::CheckUpdate(); Sleep(3000); // ------------------------------------------------------------- diff --git a/src/interface.cpp b/src/interface.cpp index fef8f7a..1243466 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -421,17 +421,18 @@ void Interface::AboutEditorMenu() void Interface::DrawPopupMenu() { - if (!m_bShowPopup) - { - return; - } - if (Updater::IsUpdateAvailable()) { + m_bShowPopup = true; m_popupTitle = "Update available!"; m_pPopupFunc = UpdateFoundMenu; } + if (!m_bShowPopup) + { + return; + } + ImGuiWindowFlags flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize; static ImVec2 prevSize; diff --git a/src/version.h b/src/version.h index 8850026..4465a65 100644 --- a/src/version.h +++ b/src/version.h @@ -1,6 +1,6 @@ #pragma once #define EDITOR_NAME "Map Editor" -#define EDITOR_VERSION_NUMBER "0.6" +#define EDITOR_VERSION_NUMBER "0.4" #define EDITOR_VERSION EDITOR_VERSION_NUMBER"-alpha" #define BUILD_NUMBER "20220131" #define EDITOR_TITLE EDITOR_NAME " v" EDITOR_VERSION_NUMBER