From 3df5dfc5280fcc556989136c2651855aac190a0a Mon Sep 17 00:00:00 2001 From: Julian Xhokaxhiu Date: Fri, 13 Sep 2024 23:24:10 +0200 Subject: [PATCH] SeventhHeavenUI: Fix Steam path detection If the user has never installed it, the code path wrongly assumed empty path and attempts to lookup the Steam files. Instead it should move on because the returned value should be null. --- SeventhHeavenUI/Classes/GameConverter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SeventhHeavenUI/Classes/GameConverter.cs b/SeventhHeavenUI/Classes/GameConverter.cs index 34d39ccd..db11fce1 100644 --- a/SeventhHeavenUI/Classes/GameConverter.cs +++ b/SeventhHeavenUI/Classes/GameConverter.cs @@ -85,11 +85,11 @@ public static string GetInstallLocation(FF7Version installedVersion) public static string GetSteamPath() { - string ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath32Bit, "SteamPath", "") as string; + string ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath32Bit, "SteamPath") as string; - if (ret == null) ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath64Bit, "SteamPath", "") as string; + if (ret == null) ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath64Bit, "SteamPath") as string; - return ret.Replace("/","\\"); + return ret != null ? ret.Replace("/","\\") : ret; } public static string GetSteamExePath()