mirror of
https://github.com/mitch030504/AstroQuest-Frame.git
synced 2026-10-28 20:01:42 +01:00
Launcher: a folder that holds the game's update is not taken for the game
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
970b8cc5f4
commit
70b7daec41
2 files changed
+12
-1
No files matched your search
+4
-1
@@ -186,10 +186,13 @@ function Get-GameInfo([string]$eboot) {
|
||||
return Read-Sfo ([System.IO.Path]::Combine($folder, "sce_sys", "param.sfo"))
|
||||
}
|
||||
|
||||
# The unpacked game under a folder: the one this is made for, if there are several.
|
||||
# The unpacked game under a folder: the one this is made for, if there are several. (A folder
|
||||
# named after a game with -UPDATE, -patch or -mods at the end is not a game: the emulator lays
|
||||
# what is in it over the game's own files.)
|
||||
function Find-Game([string]$top) {
|
||||
$first = $null
|
||||
foreach ($folder in (Get-Folders $top)) {
|
||||
if ($folder -match '-(UPDATE|patch|mods)$') { continue }
|
||||
$eboot = [System.IO.Path]::Combine($folder, "eboot.bin")
|
||||
if (-not [System.IO.File]::Exists($eboot)) { continue }
|
||||
if ((Get-GameInfo $eboot)["TITLE_ID"] -eq $madeFor) { return $eboot }
|
||||
|
||||
@@ -59,6 +59,14 @@ if ($haveSfo) {
|
||||
Check "c prefers CUSA12392 among two" (Find-Game $g) "$g\Zzz\eboot.bin"
|
||||
}
|
||||
|
||||
# c2: the game's update in a folder of its own beside it, found first by its name
|
||||
if ($haveSfo) {
|
||||
$g = "$base\c2\games"; Make-Game "$g\CUSA12392-UPDATE" $true; Make-Game "$g\Game\CUSA12392" $true
|
||||
Check "c2 an update's folder is not the game" (Find-Game $g) "$g\Game\CUSA12392\eboot.bin"
|
||||
}
|
||||
$g = "$base\c3\games"; Make-Game "$g\CUSA12392-UPDATE" $true
|
||||
Check "c3 an update's folder alone is no game" (Find-Game $g) ""
|
||||
|
||||
# d: only the leftovers of an unpacking
|
||||
$g = "$base\d\games"; Make-Game "$g\CUSA12392\.unpacking\files\uroot" $true
|
||||
Check "d half-unpacked game is not taken" (Find-Game $g) ""
|
||||
|
||||
Reference in new issue
Block a user