Fixed renegade not importing from registry

This commit is contained in:
2024-03-02 12:13:34 -06:00
parent 2a4bb87e68
commit 58daeffb14

View File

@@ -319,7 +319,8 @@ class W3DHub
begin begin
reg_constant.open(registry_path, reg_type) do |reg| reg_constant.open(registry_path, reg_type) do |reg|
if (install_path = reg["InstallDir"]) if (install_path = reg["InstallPath"])
install_path = File.dirname(install_path)
install_path.gsub!("\\", "/") install_path.gsub!("\\", "/")
exe_path = app_id == "ecw" ? "#{install_path}/game500.exe" : "#{install_path}/game.exe" exe_path = app_id == "ecw" ? "#{install_path}/game500.exe" : "#{install_path}/game.exe"