Skip to content

Commit

Permalink
Add support for Forza Horizon 5
Browse files Browse the repository at this point in the history
Closes #81
  • Loading branch information
Z1ni committed Jan 23, 2024
1 parent 29ab122 commit bd0535c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Legend: ✅ Confirmed working, ❔ Unconfirmed, - Not available in the store
| Chorus |||
| Control |||
| Final Fantasy XV || - |
| Forza Horizon 5 |||
| Hades |||
| High on Life |||
| Hi-Fi RUSH |||
Expand Down
6 changes: 6 additions & 0 deletions games.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
"name": "Palworld",
"package": "PocketpairInc.Palworld_ad4psfrxyesvt",
"handler": "palworld"
},
// Forza Horizon 5
{
"name": "Forza Horizon 5",
"package": "Microsoft.624F8B84B80_8wekyb3d8bbwe",
"handler": "forza"
}
]
}
13 changes: 12 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,22 @@ def get_save_paths(
continue
save_meta.append(
(
str(fpath.with_name(f"{fpath.parent.name}_icon.{icon_format}")),
str(
fpath.with_name(
f"{fpath.parent.name}_icon.{icon_format}"
)
),
file["path"],
)
)

elif handler_name == "forza":
# Container name is the filename prefix, file names inside container are appended to that after "."
for container in containers:
for file in container["files"]:
fname = f"{container['name']}.{file['name']}"
save_meta.append((fname, file["path"]))

else:
raise Exception('Unsupported XGP app "%s"' % store_pkg_name)

Expand Down

0 comments on commit bd0535c

Please sign in to comment.