parent
407c26e9d5
commit
d9da3cfa60
|
@ -302,9 +302,14 @@ namespace BizHawk.Client.Common
|
||||||
return game;
|
return game;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Disc/*?*/ InstantiateDiscFor(string path)
|
||||||
|
=> DiscExtensions.CreateAnyType(
|
||||||
|
path,
|
||||||
|
str => DoLoadErrorCallback(message: str, systemId: "???"/*TODO we should NOT be doing this, even if it's just for error display*/, LoadErrorType.DiscError));
|
||||||
|
|
||||||
private bool LoadDisc(string path, CoreComm nextComm, HawkFile file, string ext, string forcedCoreName, out IEmulator nextEmulator, out GameInfo game)
|
private bool LoadDisc(string path, CoreComm nextComm, HawkFile file, string ext, string forcedCoreName, out IEmulator nextEmulator, out GameInfo game)
|
||||||
{
|
{
|
||||||
var disc = DiscExtensions.CreateAnyType(path, str => DoLoadErrorCallback(str, "???", LoadErrorType.DiscError));
|
var disc = InstantiateDiscFor(path);
|
||||||
if (disc == null)
|
if (disc == null)
|
||||||
{
|
{
|
||||||
game = null;
|
game = null;
|
||||||
|
@ -826,6 +831,12 @@ namespace BizHawk.Client.Common
|
||||||
retro.Dispose();
|
retro.Dispose();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// else success; update game name
|
||||||
|
var ext = file.Extension;
|
||||||
|
var gi = Disc.IsValidExtension(ext)
|
||||||
|
? MakeGameFromDisc(InstantiateDiscFor(path), ext: ext, name: Path.GetFileNameWithoutExtension(file.Name))
|
||||||
|
: new RomGame(file).GameInfo;
|
||||||
|
Game.Name = $"{gi.Name} [{Game.Name/* core name */}]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue