Cheats dialog - default to System Bus domain
This commit is contained in:
parent
de09aadc0e
commit
1693a2a1ed
|
@ -37,7 +37,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
DomainDropDown.Items.AddRange(Core.MemoryDomains
|
DomainDropDown.Items.AddRange(Core.MemoryDomains
|
||||||
.Select(d => d.ToString())
|
.Select(d => d.ToString())
|
||||||
.ToArray());
|
.ToArray());
|
||||||
DomainDropDown.SelectedItem = Core.MemoryDomains.MainMemory.ToString();
|
|
||||||
|
if (Core.MemoryDomains.HasSystemBus)
|
||||||
|
{
|
||||||
|
DomainDropDown.SelectedItem = Core.MemoryDomains.SystemBus.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DomainDropDown.SelectedItem = Core.MemoryDomains.MainMemory.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFormToDefault();
|
SetFormToDefault();
|
||||||
|
|
|
@ -214,5 +214,21 @@ namespace BizHawk.Emulation.Common
|
||||||
return this[_mainMemoryIndex];
|
return this[_mainMemoryIndex];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasSystemBus
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.Any(x => x.Name == "System Bus" || x.Name == "BUS"); // Have to account for "BUS" because some developers don't like consistency!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public MemoryDomain SystemBus
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.FirstOrDefault(x => x.Name == "System Bus" || x.Name == "BUS");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue