Hex Editor - on restart don't reset the domain to domain 0 (unless the selected domain doesn't exist, such as in a core change)
This commit is contained in:
parent
4a1c1be9ac
commit
dd64c9d1c9
|
@ -247,12 +247,46 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int? GetDomainInt(string name)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||||
|
{
|
||||||
|
if (Global.Emulator.MemoryDomains[i].Name == name)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public void Restart()
|
public void Restart()
|
||||||
{
|
{
|
||||||
if (!this.IsHandleCreated || this.IsDisposed) return;
|
if (!this.IsHandleCreated || this.IsDisposed) return;
|
||||||
|
|
||||||
|
int? theDomain = null;
|
||||||
|
if (Domain.Name.ToLower() == "rom file")
|
||||||
|
{
|
||||||
|
theDomain = 999;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theDomain = GetDomainInt(Domain.Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SetMemoryDomainMenu(); //Calls update routines
|
SetMemoryDomainMenu(); //Calls update routines
|
||||||
|
|
||||||
|
if (theDomain != null)
|
||||||
|
{
|
||||||
|
SetMemoryDomain(theDomain ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ResetScrollBar();
|
ResetScrollBar();
|
||||||
|
|
||||||
|
|
||||||
SetDataSize(DataSize);
|
SetDataSize(DataSize);
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
AddressLabel.Text = GenerateAddressString();
|
AddressLabel.Text = GenerateAddressString();
|
||||||
|
|
Loading…
Reference in New Issue