Skip to content

Commit

Permalink
pull in latest protonfixes and gamedrive changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Oct 16, 2024
1 parent 50055b9 commit 7f57f83
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
1 change: 0 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 15 additions & 0 deletions patches/protonprep-valve-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ###
Expand Down
25 changes: 24 additions & 1 deletion proton
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 7f57f83

Please sign in to comment.