Prefer window title for game name rather than class, fix game names with slash not saving to correct dir

This commit is contained in:
dec05eba
2024-11-04 22:48:05 +01:00
parent 3d51801a90
commit 623297b18a
4 changed files with 21 additions and 30 deletions

View File

@@ -7,6 +7,7 @@ file_name="$(basename "$filepath")"
file_dir="$(dirname "$filepath")"
game_name=$(gsr-window-name focused || echo "Game")
game_name="$(echo "$game_name" | tr '/\\' '_')"
target_dir="$file_dir/$game_name"
new_filepath="$target_dir/$file_name"