Add core name and system readout to Emulation menu

This commit is contained in:
YoshiRulz 2021-01-19 02:27:03 +10:00
parent a0ebb2f551
commit 6cffc9a7cd
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 15 additions and 2 deletions

View File

@ -117,6 +117,8 @@ namespace BizHawk.Client.EmuHawk
this.toolStripSeparator1 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
this.SoftResetMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.HardResetMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.EmulatorMenuSeparator2 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
this.LoadedCoreNameMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.ViewSubMenu = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.WindowSizeSubMenu = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
this.x1MenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
@ -919,7 +921,9 @@ namespace BizHawk.Client.EmuHawk
this.RebootCoreMenuItem,
this.toolStripSeparator1,
this.SoftResetMenuItem,
this.HardResetMenuItem});
this.HardResetMenuItem,
this.EmulatorMenuSeparator2,
this.LoadedCoreNameMenuItem});
this.EmulationSubMenu.Text = "&Emulation";
this.EmulationSubMenu.DropDownOpened += new System.EventHandler(this.EmulationMenuItem_DropDownOpened);
//
@ -943,6 +947,11 @@ namespace BizHawk.Client.EmuHawk
this.HardResetMenuItem.Text = "&Hard Reset";
this.HardResetMenuItem.Click += new System.EventHandler(this.HardResetMenuItem_Click);
//
// LoadedCoreNameMenuItem
//
this.LoadedCoreNameMenuItem.Enabled = false;
this.LoadedCoreNameMenuItem.Text = "Loaded core: NullHawk (NULL)";
//
// ViewSubMenu
//
this.ViewSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -2620,6 +2629,8 @@ namespace BizHawk.Client.EmuHawk
private BizHawk.WinForms.Controls.ToolStripMenuItemEx SnesGfxDebuggerMenuItem;
private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator18;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx HardResetMenuItem;
private BizHawk.WinForms.Controls.ToolStripSeparatorEx EmulatorMenuSeparator2;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx LoadedCoreNameMenuItem;
private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator19;
private BizHawk.WinForms.Controls.ToolStripMenuItemEx CaptureOSDMenuItem;
private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator20;

View File

@ -2756,6 +2756,8 @@ namespace BizHawk.Client.EmuHawk
private void UpdateCoreStatusBarButton()
{
var coreDispName = CoreExtensions.CoreExtensions.DisplayName(Emulator);
LoadedCoreNameMenuItem.Text = $"Loaded core: {coreDispName} ({Emulator.SystemId})";
if (Emulator.IsNull())
{
CoreNameStatusBarButton.Visible = false;
@ -2765,7 +2767,7 @@ namespace BizHawk.Client.EmuHawk
CoreNameStatusBarButton.Visible = true;
var attributes = Emulator.Attributes();
CoreNameStatusBarButton.Text = CoreExtensions.CoreExtensions.DisplayName(Emulator);
CoreNameStatusBarButton.Text = coreDispName;
CoreNameStatusBarButton.Image = Emulator.Icon();
CoreNameStatusBarButton.ToolTipText = attributes.Ported ? "(ported) " : "";