From ff3744ead9c16ae81b76ce178c25937d6c5b235f Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 20 Nov 2024 13:13:43 +0100 Subject: [PATCH] feat: Improve CPU detection (#854) --- src/proc.sh | 12 ++++-------- src/reset.sh | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/proc.sh b/src/proc.sh index 9a99206..5e0962e 100644 --- a/src/proc.sh +++ b/src/proc.sh @@ -34,15 +34,11 @@ if [[ "$KVM" != [Nn]* ]]; then if [ -n "$KVM_ERR" ]; then KVM="N" if [[ "$OSTYPE" =~ ^darwin ]]; then - warn "you are using MacOS which has no KVM support, this will cause a major loss of performance." + warn "you are using macOS which has no KVM support, this will cause a major loss of performance." else - if grep -qi Microsoft /proc/version; then - warn "you are using Windows 10 which has no KVM support, this will cause a major loss of performance." - else - error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance." - error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)." - [[ "$DEBUG" != [Yy1]* ]] && exit 88 - fi + error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance." + error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)." + [[ "$DEBUG" != [Yy1]* ]] && exit 88 fi fi diff --git a/src/reset.sh b/src/reset.sh index 00fd326..4ec141d 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -67,6 +67,7 @@ CPU="${CPU// CPU/}" CPU="${CPU// 16 Core/}" CPU="${CPU// Processor/}" CPU="${CPU// Quad core/}" +CPU="${CPU// Core TM/ Core}" CPU="${CPU// with Radeon Graphics/}" [ -z "${CPU// /}" ] && CPU="Unknown"