Fix HexEditor rom path handling

`Config.RecentRoms.MostRecent` is not a path apparently
This commit is contained in:
Morilli 2025-04-21 14:23:06 +02:00
parent 092accbba0
commit 8a9f185f5d
1 changed files with 3 additions and 3 deletions

View File

@ -904,7 +904,7 @@ namespace BizHawk.Client.EmuHawk
{
get
{
string path = Config.RecentRoms.MostRecent;
string path = MainForm.CurrentlyOpenRomArgs.OpenAdvanced.SimplePath;
if (string.IsNullOrWhiteSpace(path))
{
@ -918,7 +918,7 @@ namespace BizHawk.Client.EmuHawk
{
get
{
string path = Config.RecentRoms.MostRecent;
string path = MainForm.CurrentlyOpenRomArgs.OpenAdvanced.SimplePath;
if (string.IsNullOrWhiteSpace(path))
{
@ -1312,7 +1312,7 @@ namespace BizHawk.Client.EmuHawk
discardCWDChange: false,
filter: TextTablesFSFilterSet,
initDir: Config!.PathEntries.ToolsAbsolutePath(),
initFileName: $"{Path.GetFileNameWithoutExtension(Config.RecentRoms.MostRecent.SubstringAfterLast('|'))}.tbl");
initFileName: $"{Path.GetFileNameWithoutExtension(MainForm.CurrentlyOpenRomArgs.OpenAdvanced.SimplePath.SubstringAfterLast('|'))}.tbl");
if (result is null) return;
LoadTable(result);
RecentTables.Add(result);