diff --git a/src/variable_command.sh b/src/variable_command.sh index 6e8b7f8..2d491c2 100644 --- a/src/variable_command.sh +++ b/src/variable_command.sh @@ -15,7 +15,7 @@ LIST_SUPPORTED="${args[--list-supported]}" supported_variables=$(echo "LockBios NetworkBoot UsbDriverStack SmmBwp"\ "Ps2Controller BootManagerEnabled PCIeResizeableBarsEnabled"\ "EnableCamera EnableWifiBt SerialRedirection SerialRedirection2"\ - "MeMode FanCurveOption CpuThrottlingThreshold") + "MeMode FanCurveOption CpuThrottlingThreshold DGPUEnabled") typeof() { @@ -44,6 +44,9 @@ typeof() CpuThrottlingThreshold) echo "uint8" ;; + DGPUEnabled) + echo "enum_dgpuenabled" + ;; *) echo "unknown" ;; @@ -91,6 +94,16 @@ valueof() exit 18 fi ;; + enum_dgpuenabled) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "iGPU Only";; + 1) echo "NVIDIA Optimus";; + 2) echo "dGPU Only";; + *) echo "Error!"; exit 18;; + esac + ;; uint8) _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 @@ -115,6 +128,9 @@ acceptedvaluesfor() enum_fancurve) echo "Silent / Performance" ;; + enum_dgpuenabled) + echo "iGPU Only / NVIDIA Optimus / dGPU Only" + ;; uint8) echo "0-255 (Actual supported values may vary)" ;; @@ -187,6 +203,7 @@ list_variables() enum_bool \ |enum_memode \ |enum_fancurve \ + |enum_dgpuenabled \ |uint8) echo -e "$var\t$(valueof $var)\t$(acceptedvaluesfor $var)" ;;