From 70b7daec4157bf4e9b73395dbd33df200634a8d1 Mon Sep 17 00:00:00 2001 From: bigmak94 <196841780+bigmak94@users.noreply.github.com> Date: Tue, 6 Oct 2026 09:57:53 +0200 Subject: [PATCH] Launcher: a folder that holds the game's update is not taken for the game Co-Authored-By: Claude Opus 5.5 --- pc-vr/launch.ps1 | 5 ++++- tools/tests/launcher-test.ps1 | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pc-vr/launch.ps1 b/pc-vr/launch.ps1 index 29be2e4..6607e0f 100644 --- a/pc-vr/launch.ps1 +++ b/pc-vr/launch.ps1 @@ -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 } diff --git a/tools/tests/launcher-test.ps1 b/tools/tests/launcher-test.ps1 index 3994371..c083f34 100644 --- a/tools/tests/launcher-test.ps1 +++ b/tools/tests/launcher-test.ps1 @@ -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) ""