prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Vulkan check will not work on certain distributions
  Note that this probably won't work on certain distributions, where this file, for instance, is actually called `/usr/lib/x86_64-linux-gnu/libvulkan.so.1` or similar. Confirmed not working on Linux Mint 19.
  
  _Originally posted by @Vexatos in https://github.com/lutris/lutris/pull/1186_
  
  </issue>
  <code>
  [start of lutris/util/vulkan.py]
  1 """Vulkan helper module"""
  2 import os
  3 from enum import Enum
  4 
  5 class vulkan_available(Enum):
  6     NONE = 0
  7     THIRTY_TWO = 1
  8     SIXTY_FOUR = 2
  9     ALL = 3
  10 
  11 def vulkan_check():
  12     vulkan_lib = os.path.isfile("/usr/lib/libvulkan.so")
  13     vulkan_lib32 = os.path.isfile("/usr/lib32/libvulkan.so")
  14     vulkan_lib_multi = os.path.isfile("/usr/lib/x86_64-linux-gnu/libvulkan.so")
  15     vulkan_lib32_multi = os.path.isfile("/usr/lib32/i386-linux-gnu/libvulkan.so")
  16     has_32_bit = vulkan_lib32 or vulkan_lib32_multi
  17     has_64_bit = vulkan_lib or vulkan_lib_multi
  18 
  19     if not (has_64_bit or has_32_bit):
  20         return vulkan_available.NONE
  21     if has_64_bit and not has_32_bit:
  22         return vulkan_available.SIXTY_FOUR
  23     if not has_64_bit and has_32_bit:
  24         return vulkan_available.THIRTY_TWO
  25     return vulkan_available.ALL
  26
  [end of lutris/util/vulkan.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/lutris/util/vulkan.py b/lutris/util/vulkan.py
  --- a/lutris/util/vulkan.py
  +++ b/lutris/util/vulkan.py
  @@ -1,5 +1,6 @@
   """Vulkan helper module"""
   import os
  +import re
   from enum import Enum
   
   class vulkan_available(Enum):
  @@ -8,11 +9,20 @@
       SIXTY_FOUR = 2
       ALL = 3
   
  +def search_for_file(directory):
  +    if os.path.isdir(directory):
  +        pattern = re.compile(r'^libvulkan\.so')
  +        files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))]
  +        files = [os.path.join(directory, f) for f in files if pattern.search(f)]
  +        if files:
  +            return True
  +    return False
  +
   def vulkan_check():
  -    vulkan_lib = os.path.isfile("/usr/lib/libvulkan.so")
  -    vulkan_lib32 = os.path.isfile("/usr/lib32/libvulkan.so")
  -    vulkan_lib_multi = os.path.isfile("/usr/lib/x86_64-linux-gnu/libvulkan.so")
  -    vulkan_lib32_multi = os.path.isfile("/usr/lib32/i386-linux-gnu/libvulkan.so")
  +    vulkan_lib = search_for_file("/usr/lib")
  +    vulkan_lib32 = search_for_file("/usr/lib32")
  +    vulkan_lib_multi = search_for_file("/usr/lib/x86_64-linux-gnu")
  +    vulkan_lib32_multi =  search_for_file("/usr/lib32/i386-linux-gnu")
       has_32_bit = vulkan_lib32 or vulkan_lib32_multi
       has_64_bit = vulkan_lib or vulkan_lib_multi
  
verification_info: {"golden_diff": "diff --git a/lutris/util/vulkan.py b/lutris/util/vulkan.py\n--- a/lutris/util/vulkan.py\n+++ b/lutris/util/vulkan.py\n@@ -1,5 +1,6 @@\n \"\"\"Vulkan helper module\"\"\"\n import os\n+import re\n from enum import Enum\n \n class vulkan_available(Enum):\n@@ -8,11 +9,20 @@\n     SIXTY_FOUR = 2\n     ALL = 3\n \n+def search_for_file(directory):\n+    if os.path.isdir(directory):\n+        pattern = re.compile(r'^libvulkan\\.so')\n+        files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))]\n+        files = [os.path.join(directory, f) for f in files if pattern.search(f)]\n+        if files:\n+            return True\n+    return False\n+\n def vulkan_check():\n-    vulkan_lib = os.path.isfile(\"/usr/lib/libvulkan.so\")\n-    vulkan_lib32 = os.path.isfile(\"/usr/lib32/libvulkan.so\")\n-    vulkan_lib_multi = os.path.isfile(\"/usr/lib/x86_64-linux-gnu/libvulkan.so\")\n-    vulkan_lib32_multi = os.path.isfile(\"/usr/lib32/i386-linux-gnu/libvulkan.so\")\n+    vulkan_lib = search_for_file(\"/usr/lib\")\n+    vulkan_lib32 = search_for_file(\"/usr/lib32\")\n+    vulkan_lib_multi = search_for_file(\"/usr/lib/x86_64-linux-gnu\")\n+    vulkan_lib32_multi =  search_for_file(\"/usr/lib32/i386-linux-gnu\")\n     has_32_bit = vulkan_lib32 or vulkan_lib32_multi\n     has_64_bit = vulkan_lib or vulkan_lib_multi\n", "issue": "Vulkan check will not work on certain distributions\nNote that this probably won't work on certain distributions, where this file, for instance, is actually called `/usr/lib/x86_64-linux-gnu/libvulkan.so.1` or similar. Confirmed not working on Linux Mint 19.\r\n\r\n_Originally posted by @Vexatos in https://github.com/lutris/lutris/pull/1186_\n", "before_files": [{"content": "\"\"\"Vulkan helper module\"\"\"\nimport os\nfrom enum import Enum\n\nclass vulkan_available(Enum):\n    NONE = 0\n    THIRTY_TWO = 1\n    SIXTY_FOUR = 2\n    ALL = 3\n\ndef vulkan_check():\n    vulkan_lib = os.path.isfile(\"/usr/lib/libvulkan.so\")\n    vulkan_lib32 = os.path.isfile(\"/usr/lib32/libvulkan.so\")\n    vulkan_lib_multi = os.path.isfile(\"/usr/lib/x86_64-linux-gnu/libvulkan.so\")\n    vulkan_lib32_multi = os.path.isfile(\"/usr/lib32/i386-linux-gnu/libvulkan.so\")\n    has_32_bit = vulkan_lib32 or vulkan_lib32_multi\n    has_64_bit = vulkan_lib or vulkan_lib_multi\n\n    if not (has_64_bit or has_32_bit):\n        return vulkan_available.NONE\n    if has_64_bit and not has_32_bit:\n        return vulkan_available.SIXTY_FOUR\n    if not has_64_bit and has_32_bit:\n        return vulkan_available.THIRTY_TWO\n    return vulkan_available.ALL\n", "path": "lutris/util/vulkan.py"}]}