Browse Source

Updates: Allow downgrades (#1051)

pull/1080/head
Valentin Radu 4 years ago
parent
commit
70f99c18fa
  1. 2
      ExplorerPatcher/settings.reg
  2. 2
      ExplorerPatcher/settings10.reg
  3. 4
      ExplorerPatcher/updates.c

2
ExplorerPatcher/settings.reg

@ -562,6 +562,8 @@ @@ -562,6 +562,8 @@
"UpdatePolicy"=dword:00000001
;b Receive pre-release versions, if available (not recommended)
"UpdatePreferStaging"=dword:00000000
;b Suggest the latest version on the server, even if it's older (not recommended)
"UpdateAllowDowngrades"=dword:00000000
;t Update servers:
;w Releases
;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki.

2
ExplorerPatcher/settings10.reg

@ -492,6 +492,8 @@ @@ -492,6 +492,8 @@
"UpdatePolicy"=dword:00000001
;b Receive pre-release versions, if available (not recommended)
"UpdatePreferStaging"=dword:00000000
;b Suggest the latest version on the server, even if it's older (not recommended)
"UpdateAllowDowngrades"=dword:00000000
;t Update servers:
;w Releases
;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki.

4
ExplorerPatcher/updates.c

@ -287,7 +287,9 @@ BOOL IsUpdateAvailableHelper( @@ -287,7 +287,9 @@ BOOL IsUpdateAvailableHelper(
}
}
}
if (res == -1)
DWORD dwAllowDowngrades = FALSE, dwSize = sizeof(DWORD);
RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"UpdateAllowDowngrades", RRF_RT_DWORD, NULL, &dwAllowDowngrades, &dwSize);
if ((res == 1 && dwAllowDowngrades) || res == -1)
{
bIsUpdateAvailable = TRUE;
}

Loading…
Cancel
Save