فهرست منبع

UI/updater: Fix update bug for 32bit/64bit installs

It would only check whether it should download a package if the 32bit
version existed.  This would cause it to not download all files
correctly to update 64bit installs (post 22.0.1).
jp9000 7 سال پیش
والد
کامیت
11b84a5d85
1فایلهای تغییر یافته به همراه12 افزوده شده و 4 حذف شده
  1. 12 4
      UI/win-update/updater/updater.cpp

+ 12 - 4
UI/win-update/updater/updater.cpp

@@ -576,10 +576,18 @@ static inline bool FileExists(const wchar_t *path)
 
 static bool NonCorePackageInstalled(const char *name)
 {
-	if (strcmp(name, "obs-browser") == 0) {
-		return FileExists(L"obs-plugins\\32bit\\obs-browser.dll");
-	} else if (strcmp(name, "realsense") == 0) {
-		return FileExists(L"obs-plugins\\32bit\\win-ivcam.dll");
+	if (is32bit) {
+		if (strcmp(name, "obs-browser") == 0) {
+			return FileExists(L"obs-plugins\\32bit\\obs-browser.dll");
+		} else if (strcmp(name, "realsense") == 0) {
+			return FileExists(L"obs-plugins\\32bit\\win-ivcam.dll");
+		}
+	} else {
+		if (strcmp(name, "obs-browser") == 0) {
+			return FileExists(L"obs-plugins\\64bit\\obs-browser.dll");
+		} else if (strcmp(name, "realsense") == 0) {
+			return FileExists(L"obs-plugins\\64bit\\win-ivcam.dll");
+		}
 	}
 
 	return false;