From 8ef7672d03e88b778570aa5206d3d61402189694 Mon Sep 17 00:00:00 2001
From: Htylol <dixperm909@yandex.ru>
Date: Fri, 16 Aug 2024 09:50:35 +0500
Subject: [PATCH] Fixed combobox gpu when there is no vulkan driver

---
 data_from_portwine/scripts/functions_helper | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper
index e76ef1e6..be7b1aa5 100755
--- a/data_from_portwine/scripts/functions_helper
+++ b/data_from_portwine/scripts/functions_helper
@@ -562,22 +562,34 @@ debug_timer () {
             print_warning "It took $DIFF milliseconds"
         fi
     fi
+    return 0
 }
 
 combobox_fix () {
-    if [[ -z "$1" ]] || [[ -z "$2" && "$1" != "--empty" ]] ; then
+    if [[ -z "$1" ]] ; then
         print_error "no argument specified for combobox_fix"
         return 1
     else
-        if [[ "$1" == "--disabled" ]] || [[ "$1" == "--empty" ]] ; then
+        if [[ "$1" == "--disabled" ]] ; then
             if [[ -z "$3" ]] ; then
-                print_error "no argument specified for combobox_fix"
-                return 1
+                echo "disabled"
+                return 0
+            fi
+            name1="$2"
+            name2="$3"
+        elif [[ "$1" == "--empty" ]] ; then
+            if [[ -z "$3" ]] ; then
+                echo ""
+                return 0
             fi
             name1="$2"
             name2="$3"
         else
             name1="$1"
+            if [[ -z "$2" ]] ; then
+                echo "${name1}"
+                return 0
+            fi
             name2="$2"
         fi
         name3="${name2//\!${name1}\!/\!}"