From 7f57f83e1f0877e1466a526510abf6825080dd55 Mon Sep 17 00:00:00 2001 From: GloriousEggroll Date: Tue, 15 Oct 2024 19:24:38 -0600 Subject: [PATCH] pull in latest protonfixes and gamedrive changes --- Makefile.in | 1 - patches/protonprep-valve-staging.sh | 15 +++++++++++++++ proton | 25 ++++++++++++++++++++++++- protonfixes | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 849a06ae7c..9a638c748e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -432,7 +432,6 @@ $(eval $(call rules-wine-requests,wine)) $(OBJ)/.wine-post-source: cd $(WINE_SRC) && dlls/winevulkan/make_vulkan -x vk.xml -cd $(WINE_SRC) && tools/make_specfiles - -cd $(WINE_SRC) && tools/make_requests touch $@ $(OBJ)/.wine-post-build64: diff --git a/patches/protonprep-valve-staging.sh b/patches/protonprep-valve-staging.sh index f1aead496b..e81ceac7d4 100755 --- a/patches/protonprep-valve-staging.sh +++ b/patches/protonprep-valve-staging.sh @@ -11,6 +11,21 @@ patch -Np1 < ../patches/gstreamer/5511.patch popd + pushd protonfixes + git reset --hard HEAD + git clean -xdf + pushd subprojects + pushd x11-xserver-utils + git reset --hard HEAD + git clean -xdf + popd + pushd xutils-dev + git reset --hard HEAD + git clean -xdf + popd + popd + popd + ### END PREP SECTION ### ### (2) WINE PATCHING ### diff --git a/proton b/proton index d5f7a060a4..8c56ad4014 100755 --- a/proton +++ b/proton @@ -401,8 +401,27 @@ def setup_dir_drive(compat_option, drive_name, dest_dir): elif file_exists(drive_path, follow_symlinks=False): os.remove(drive_path) +def is_directory_empty(dir_path): + # Check if the directory is empty + return not any(os.scandir(dir_path)) + def setup_game_dir_drive(): - setup_dir_drive("gamedrive", "s:", try_get_game_library_dir()) + if os.environ.get('UMU_ID', ''): + directories_to_check = [ + '/media', + '/run/media', + '/mnt', + os.path.expanduser("~") # Current user's home directory + ] + + drive_letter = ord('u') # Start from 'u' + + for directory in directories_to_check: + if os.path.exists(directory) and not is_directory_empty(directory): + setup_dir_drive("gamedrive", f"{chr(drive_letter)}:", directory) + drive_letter += 1 # Increment to the next drive letter + else: + setup_dir_drive("gamedrive", "s:", try_get_game_library_dir()) def setup_steam_dir_drive(): setup_dir_drive("steamdrive", "t:", try_get_steam_dir()) @@ -1300,6 +1319,10 @@ def default_compat_config(): ]: ret.add("gamedrive") + # hack to force gamedrive compat_config always for umu + if os.environ.get('UMU_ID', ''): + ret.add("gamedrive") + return ret default_cpu_limit = { diff --git a/protonfixes b/protonfixes index 7ed8c8b4d9..6aef6c5264 160000 --- a/protonfixes +++ b/protonfixes @@ -1 +1 @@ -Subproject commit 7ed8c8b4d9e677422a6488806f9974d8cd5adf51 +Subproject commit 6aef6c5264f025a421074b8acc06aeeaf364d42b