Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9580 from MetroidPrimeModding/redundant-update-tr…
…igger-check

[Updater] Check whether we've already had an update triggered
  • Loading branch information
leoetlino committed Mar 16, 2021
2 parents 646bdc9 + 1dc015c commit b980dd1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Core/UICommon/AutoUpdate.cpp
Expand Up @@ -31,6 +31,7 @@

namespace
{
bool s_update_triggered = false;
#ifdef _WIN32

const char UPDATER_FILENAME[] = "Updater.exe";
Expand Down Expand Up @@ -201,6 +202,14 @@ void AutoUpdateChecker::CheckForUpdate()
void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInformation& info,
AutoUpdateChecker::RestartMode restart_mode)
{
// Check to make sure we don't already have an update triggered
if (s_update_triggered)
{
WARN_LOG_FMT(COMMON, "Auto-update: received a redundant trigger request, ignoring");
return;
}

s_update_triggered = true;
#ifdef OS_SUPPORTS_UPDATER
std::map<std::string, std::string> updater_flags;
updater_flags["this-manifest-url"] = info.this_manifest_url;
Expand Down

0 comments on commit b980dd1

Please sign in to comment.