From 5fe06f8b560b403794f9cfa8e7c75bc8858f59be Mon Sep 17 00:00:00 2001 From: Romke van Dijk Date: Tue, 24 May 2022 17:12:04 +0200 Subject: [PATCH] Detecting Microsoft GPU correctly and making voucher persist in devcontainer Fixes #774 --- .devcontainer/adduser.php | 1 + src/inc/api/APIUpdateClientInformation.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/adduser.php b/.devcontainer/adduser.php index 679dbb2b5..07d6e74ef 100644 --- a/.devcontainer/adduser.php +++ b/.devcontainer/adduser.php @@ -44,3 +44,4 @@ // Create voucher for dev agent AgentUtils::createVoucher("devvoucher"); +ConfigUtils::updateConfig(array("config_voucherDeletion" => "1")); diff --git a/src/inc/api/APIUpdateClientInformation.class.php b/src/inc/api/APIUpdateClientInformation.class.php index 9927b2033..cbfb2b30a 100644 --- a/src/inc/api/APIUpdateClientInformation.class.php +++ b/src/inc/api/APIUpdateClientInformation.class.php @@ -19,7 +19,7 @@ public function execute($QUERY = array()) { $cpuOnly = 1; foreach ($devices as $device) { $device = strtolower($device); - if ((strpos($device, "amd") !== false) || (strpos($device, "ati ") !== false) || (strpos($device, "radeon") !== false) || strpos($device, "nvidia") !== false || strpos($device, "gtx") !== false || strpos($device, "ti") !== false) { + if ((strpos($device, "amd") !== false) || (strpos($device, "ati ") !== false) || (strpos($device, "radeon") !== false) || strpos($device, "nvidia") !== false || strpos($device, "gtx") !== false || strpos($device, "ti") !== false|| strpos($device, "microsoft") != false) { $cpuOnly = 0; } }