From 0d0e117514d6e6f9b529cf9e001cb767305ffb53 Mon Sep 17 00:00:00 2001 From: "black.dragon74" Date: Tue, 20 Oct 2020 17:50:07 +0530 Subject: [PATCH] Update install script and support hex to dec conv Signed-off-by: black.dragon74 --- ALCPlugFix-Swift/Constants/Constants.swift | 2 +- ALCPlugFix-Swift/Misc/install.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ALCPlugFix-Swift/Constants/Constants.swift b/ALCPlugFix-Swift/Constants/Constants.swift index eea04d0..2cdbe20 100644 --- a/ALCPlugFix-Swift/Constants/Constants.swift +++ b/ALCPlugFix-Swift/Constants/Constants.swift @@ -75,6 +75,6 @@ func getUint64Verb(from stringCommand: String) -> UInt64 { extension String { // To be used only in ALCPlugFix func toUInt64() -> UInt64 { - return UInt64(self.replacingOccurrences(of: "0x", with: "")) ?? 0 + return UInt64(self.replacingOccurrences(of: "0x", with: ""), radix: 16) ?? 0 } } diff --git a/ALCPlugFix-Swift/Misc/install.sh b/ALCPlugFix-Swift/Misc/install.sh index 12b7913..879dcd8 100755 --- a/ALCPlugFix-Swift/Misc/install.sh +++ b/ALCPlugFix-Swift/Misc/install.sh @@ -19,10 +19,6 @@ function cleanUpOldInstall() { # Remove any existing alc-verb install sudo launchctl unload /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist sudo rm -rf /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist - - # Clean up old clients - sudo rm -rf $(which alc-verb) - sudo rm -rf $(which hda-verb) } # Function that exits with an error code and message