Make IMemoryDomains inherit IEmulator and simplify some code slightly as a result
This commit is contained in:
parent
be00dae474
commit
e6e2972e3d
|
@ -384,7 +384,7 @@ namespace BizHawk.Client.Common
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb
|
sb
|
||||||
.Append("Domain ").AppendLine(_domain.Name)
|
.Append("Domain ").AppendLine(_domain.Name)
|
||||||
.Append("SystemID ").AppendLine(Global.Emulator.SystemId);
|
.Append("SystemID ").AppendLine(_core.SystemId);
|
||||||
|
|
||||||
foreach (var watch in _watchList)
|
foreach (var watch in _watchList)
|
||||||
{
|
{
|
||||||
|
|
|
@ -355,7 +355,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
//can't do this unless we are autoloading a rom too...
|
//can't do this unless we are autoloading a rom too...
|
||||||
if (Global.Config.RecentWatches.AutoLoad
|
if (Global.Config.RecentWatches.AutoLoad
|
||||||
&& Global.Emulator is IMemoryDomains)
|
&& Global.Emulator.HasMemoryDomains())
|
||||||
{
|
{
|
||||||
GlobalWin.Tools.LoadRamWatch(!Global.Config.DisplayRamWatch);
|
GlobalWin.Tools.LoadRamWatch(!Global.Config.DisplayRamWatch);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
ValueHexIndLabel.Text =
|
ValueHexIndLabel.Text =
|
||||||
CompareHexIndLabel.Text =
|
CompareHexIndLabel.Text =
|
||||||
_cheat.Type == Watch.DisplayType.Hex ? HexInd : String.Empty;
|
_cheat.Type == Watch.DisplayType.Hex ? HexInd : string.Empty;
|
||||||
|
|
||||||
BigEndianCheckBox.Checked = _cheat.BigEndian.Value;
|
BigEndianCheckBox.Checked = _cheat.BigEndian.Value;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
SetSizeSelected(Watch.WatchSize.Byte);
|
SetSizeSelected(Watch.WatchSize.Byte);
|
||||||
PopulateTypeDropdown();
|
PopulateTypeDropdown();
|
||||||
|
|
||||||
NameBox.Text = String.Empty;
|
NameBox.Text = string.Empty;
|
||||||
|
|
||||||
if (Global.Emulator != null)
|
if (Global.Emulator != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -199,11 +199,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
GameGenieToolbarSeparator.Visible =
|
GameGenieToolbarSeparator.Visible =
|
||||||
LoadGameGenieToolbarItem.Visible =
|
LoadGameGenieToolbarItem.Visible =
|
||||||
(Global.Emulator.SystemId == "NES")
|
(Core.SystemId == "NES")
|
||||||
|| (Global.Emulator.SystemId == "GEN" && VersionInfo.DeveloperBuild)
|
|| (Core.SystemId == "GEN" && VersionInfo.DeveloperBuild)
|
||||||
|| (Global.Emulator.SystemId == "GB")
|
|| (Core.SystemId == "GB")
|
||||||
|| (Global.Game.System == "GG")
|
|| (Global.Game.System == "GG")
|
||||||
|| (Global.Emulator is LibsnesCore);
|
|| (Core is LibsnesCore);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddCheat()
|
private void AddCheat()
|
||||||
|
@ -540,11 +540,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
GameGenieSeparator.Visible =
|
GameGenieSeparator.Visible =
|
||||||
OpenGameGenieEncoderDecoderMenuItem.Visible =
|
OpenGameGenieEncoderDecoderMenuItem.Visible =
|
||||||
(Global.Emulator.SystemId == "NES")
|
(Core.SystemId == "NES")
|
||||||
|| (Global.Emulator is Genesis)
|
|| (Core is Genesis)
|
||||||
|| (Global.Emulator.SystemId == "GB")
|
|| (Core.SystemId == "GB")
|
||||||
|| (Global.Game.System == "GG")
|
|| (Global.Game.System == "GG")
|
||||||
|| (Global.Emulator is LibsnesCore);
|
|| (Core is LibsnesCore);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveCheatMenuItem_Click(object sender, EventArgs e)
|
private void RemoveCheatMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
|
@ -580,7 +580,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void SetPlatformAndMemoryDomainLabel()
|
private void SetPlatformAndMemoryDomainLabel()
|
||||||
{
|
{
|
||||||
MemDomainLabel.Text = Global.Emulator.SystemId + " " + _watches.Domain.Name;
|
MemDomainLabel.Text = _core.SystemId + " " + _watches.Domain.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateStatusBar(bool saved = false)
|
private void UpdateStatusBar(bool saved = false)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace BizHawk.Emulation.Common
|
namespace BizHawk.Emulation.Common
|
||||||
{
|
{
|
||||||
public interface IMemoryDomains
|
public interface IMemoryDomains : IEmulator
|
||||||
{
|
{
|
||||||
///The list of all avaialble memory domains
|
///The list of all avaialble memory domains
|
||||||
/// A memory domain is a byte array that respresents a distinct part of the emulated system.
|
/// A memory domain is a byte array that respresents a distinct part of the emulated system.
|
||||||
|
|
Loading…
Reference in New Issue