Fix `ObjectDisposedException` when loading non-disc rom into Libretro

fixes d9da3cfa6
This commit is contained in:
YoshiRulz 2025-01-11 07:35:55 +10:00
parent 6adab25fac
commit 4aa334244e
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 1 deletions

View File

@ -835,7 +835,7 @@ namespace BizHawk.Client.Common
var ext = file.Extension;
var gi = Disc.IsValidExtension(ext)
? MakeGameFromDisc(InstantiateDiscFor(path), ext: ext, name: Path.GetFileNameWithoutExtension(file.Name))
: new RomGame(file).GameInfo;
: new RomGame(new(file.CanonicalFullPath)).GameInfo; // need to re-open???
Game.Name = $"{gi.Name} [{Game.Name/* core name */}]";
}
}