From cdf21ea6fd021368f4c303643ba9930a768b230f Mon Sep 17 00:00:00 2001 From: "ryan.kuba" Date: Thu, 16 Feb 2023 18:48:42 -0800 Subject: [PATCH] KASM-4038 fix yaml processor to now pass a bool value for hw3d --- unix/kasmvnc_defaults.yaml | 3 +++ unix/vncserver | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/unix/kasmvnc_defaults.yaml b/unix/kasmvnc_defaults.yaml index a4997e2..f086178 100644 --- a/unix/kasmvnc_defaults.yaml +++ b/unix/kasmvnc_defaults.yaml @@ -5,6 +5,9 @@ desktop: height: 768 allow_resize: true pixel_depth: 24 + gpu: + hw3d: false + drinode: /dev/dri/renderD128 network: protocol: http diff --git a/unix/vncserver b/unix/vncserver index c4e3b7d..0fcbdb3 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -2249,7 +2249,22 @@ sub DefineConfigToCLIConversion { name => "desktop.gpu.hw3d", type => KasmVNC::ConfigKey::BOOLEAN }) - ] + ], + toStringSub => sub { + $self = shift; + my $value = $self->configValue(); + + switch($value) { + case 'true' { + $valuesStr = '-hw3d '; + } + case 'false' { + $valuesStr = ' '; + } + } + + return $valuesStr; + } }), KasmVNC::CliOption->new({ name => 'drinode',