Skip to content

Commit

Permalink
Fix updater
Browse files Browse the repository at this point in the history
  • Loading branch information
user-grinch committed Oct 5, 2023
1 parent 4722ac8 commit a8fad43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/defines.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#define EDITOR_NAME "Map Editor"
#define EDITOR_VERSION_NUMBER "0.10"
#define EDITOR_VERSION EDITOR_VERSION_NUMBER"-alpha"
#define EDITOR_VERSION_NUMBER "1.0"
#define EDITOR_VERSION EDITOR_VERSION_NUMBER"-beta"
#define EDITOR_TITLE EDITOR_NAME " v" EDITOR_VERSION

#define DISCORD_INVITE "https://discord.gg/ZzW7kmf"
Expand Down
4 changes: 0 additions & 4 deletions src/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ EditorMgr::EditorMgr() {
gConfig.Set("Menu.LastUpdateChecked", st.wDay);
}

if (Updater::IsUpdateAvailable()) {
Log::Print<eLogLevel::Info>("New update available: %s", Updater::GetUpdateVersion().c_str());
}

if (!std::filesystem::exists(PLUGIN_PATH((char*)FILE_NAME))) {
Log::Print<eLogLevel::Error>("Failed to find MapEditor directory!");
return;
Expand Down
3 changes: 2 additions & 1 deletion src/utils/updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ std::string Updater::GetUpdateVersion() {
void Updater::CheckUpdate() {
if (Updater::curState == States::IDLE) {
Updater::curState = States::CHECKING;
CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&Updater::Process, nullptr, NULL, nullptr);
}
}

Expand All @@ -24,7 +25,7 @@ void Updater::Process() {
return;
}

const char* link = "https://api.github.com/repos/user-grinch/Cheat-Menu/tags";
const char* link = "https://api.github.com/repos/user-grinch/Map-Editor/tags";
char* path = PLUGIN_PATH((char*)FILE_NAME "/data/versioninfo.json");
HRESULT res = URLDownloadToFile(NULL, link, path, 0, NULL);

Expand Down

0 comments on commit a8fad43

Please sign in to comment.