From b710d532d309bc03868b98fa9b7fae145729e8ab Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 18 Feb 2023 11:07:18 +0530 Subject: optimization: speed up the game launching if uptodate vulkan translation is already installed --- soibox | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/soibox b/soibox index 4614890..20b9989 100755 --- a/soibox +++ b/soibox @@ -340,9 +340,10 @@ setup_dxvk() : "${1:?}" dl_path= dxvk_exe= + d3d11_dxvk= + d3d11_prefix="${WINEPREFIX}/dosdevices/c:/windows/system32/d3d11.dll" dxvk_sh="https://gist.githubusercontent.com/doitsujin/1652e0e3382f0e0ff611e70142684d01/raw/setup_dxvk.sh" export WINE_LARGE_ADDRESS_AWARE=1 - dep_check "wine" [ "$loglevel" = 3 ] && @@ -356,6 +357,10 @@ setup_dxvk() fi dxvk_exe="$(find "$dl_path" -type f -name setup_dxvk.sh)" + d3d11_dxvk="$(find "$dl_path" -type f -name d3d11.dll | grep -m1 x64)" + + diff "$d3d11_dxvk" "$d3d11_prefix" > /dev/null 2>&1 && + return # author removed setup_dxvk.sh in v2.1 if [ -z "$dxvk_exe" ] @@ -375,6 +380,8 @@ setup_dxvk() fi unset dxvk_exe + unset d3d11_dxvk + unset d3d11_prefix unset dxvk_sh unset dl_path } @@ -385,7 +392,8 @@ setup_vkd3d() : "${1:?}" dl_path= vkd3d_exe= - + d3d12_vkd3d= + d3d12_prefix="${WINEPREFIX}/dosdevices/c:/windows/system32/d3d12.dll" dep_check "wine" [ "$loglevel" = 3 ] && @@ -399,6 +407,10 @@ setup_vkd3d() fi vkd3d_exe="$(find "$dl_path" -type f -name setup_vkd3d_proton.sh)" + d3d12_vkd3d="$(find "$dl_path" -type f -name d3d12.dll | grep -m1 x64)" + + diff "$d3d12_vkd3d" "$d3d12_prefix" > /dev/null 2>&1 && + return if [ "$loglevel" != 3 ] then @@ -408,6 +420,8 @@ setup_vkd3d() fi unset vkd3d_exe + unset d3d12_prefix + unset d3d12_vkd3d unset dl_path } -- cgit v1.2.3