From 5665617d9b7481b9fee92792ef5654d2fa8fae62 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sat, 9 Feb 2019 12:41:23 -0600 Subject: [PATCH] GGHawkLink: menues and API stuff --- ...izHawkSystemIdToCoreSystemEnumConverter.cs | 3 +++ BizHawk.Client.Common/Api/CoreSystem.cs | 3 ++- BizHawk.Client.Common/SystemInfo.cs | 19 +++++++++++------- BizHawk.Client.EmuHawk/MainForm.Designer.cs | 20 +++++++++++++++++++ BizHawk.Client.EmuHawk/MainForm.Events.cs | 9 +++++++++ BizHawk.Client.EmuHawk/MainForm.cs | 5 +++++ .../Sega/GGHawkLink/GGHawkLink.IEmulator.cs | 2 +- 7 files changed, 52 insertions(+), 9 deletions(-) diff --git a/BizHawk.Client.ApiHawk/Classes/BizHawkSystemIdToCoreSystemEnumConverter.cs b/BizHawk.Client.ApiHawk/Classes/BizHawkSystemIdToCoreSystemEnumConverter.cs index 935df8122f..4c22cc8825 100644 --- a/BizHawk.Client.ApiHawk/Classes/BizHawkSystemIdToCoreSystemEnumConverter.cs +++ b/BizHawk.Client.ApiHawk/Classes/BizHawkSystemIdToCoreSystemEnumConverter.cs @@ -102,6 +102,9 @@ namespace BizHawk.Client.ApiHawk case "AmstradCPC": return CoreSystem.AmstradCPC; + case "GGL": + return CoreSystem.GGL; + case "VB": case "NGP": case "DNGP": diff --git a/BizHawk.Client.Common/Api/CoreSystem.cs b/BizHawk.Client.Common/Api/CoreSystem.cs index d76625b963..48a10efbfc 100644 --- a/BizHawk.Client.Common/Api/CoreSystem.cs +++ b/BizHawk.Client.Common/Api/CoreSystem.cs @@ -31,6 +31,7 @@ VirtualBoy, NeoGeoPocket, ZXSpectrum, - AmstradCPC + AmstradCPC, + GGL } } diff --git a/BizHawk.Client.Common/SystemInfo.cs b/BizHawk.Client.Common/SystemInfo.cs index dc9e7be92b..258b5b1c4d 100644 --- a/BizHawk.Client.Common/SystemInfo.cs +++ b/BizHawk.Client.Common/SystemInfo.cs @@ -198,14 +198,19 @@ namespace BizHawk.Client.Common /// public static SystemInfo AmstradCPC { get; } = new SystemInfo("Amstrad CPC", CoreSystem.AmstradCPC, 2); - #endregion Get SystemInfo + /// + /// Gets the instance for AmstradCPC + /// + public static SystemInfo GGL { get; } = new SystemInfo("Game Gear Linked", CoreSystem.GGL, 2); - /// - /// Get a by its - /// - /// you're looking for - /// - public static SystemInfo FindByCoreSystem(CoreSystem system) + #endregion Get SystemInfo + + /// + /// Get a by its + /// + /// you're looking for + /// + public static SystemInfo FindByCoreSystem(CoreSystem system) { return _allSystemInfos.Find(s => s.System == system); } diff --git a/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/BizHawk.Client.EmuHawk/MainForm.Designer.cs index b7df5e2f76..753dc7f1d2 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Designer.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Designer.cs @@ -354,6 +354,8 @@ this.DGBsettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.DGBHawkSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.DGBHawksettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.GGLSubMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.GGLsettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.GenesisSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.vDPViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.GenesisGameGenieECDC = new System.Windows.Forms.ToolStripMenuItem(); @@ -507,6 +509,7 @@ this.SaturnSubMenu, this.DGBSubMenu, this.DGBHawkSubMenu, + this.GGLSubMenu, this.GenesisSubMenu, this.wonderSwanToolStripMenuItem, this.AppleSubMenu, @@ -3205,6 +3208,21 @@ this.DGBHawksettingsToolStripMenuItem.Text = "Settings..."; this.DGBHawksettingsToolStripMenuItem.Click += new System.EventHandler(this.DgbHawkSettingsMenuItem_Click); // + // GGLSubMenu + // + this.GGLSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.GGLsettingsToolStripMenuItem}); + this.GGLSubMenu.Name = "GGLSubMenu"; + this.GGLSubMenu.Size = new System.Drawing.Size(59, 19); + this.GGLSubMenu.Text = "&GG Link"; + // + // GGLsettingsToolStripMenuItem + // + this.GGLsettingsToolStripMenuItem.Name = "GGLsettingsToolStripMenuItem"; + this.GGLsettingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.GGLsettingsToolStripMenuItem.Text = "Settings..."; + this.GGLsettingsToolStripMenuItem.Click += new System.EventHandler(this.GGLSettingsMenuItem_Click); + // // GenesisSubMenu // this.GenesisSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -4533,6 +4551,8 @@ private System.Windows.Forms.ToolStripMenuItem DGBsettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem DGBHawkSubMenu; private System.Windows.Forms.ToolStripMenuItem DGBHawksettingsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem GGLSubMenu; + private System.Windows.Forms.ToolStripMenuItem GGLsettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem GenesisSubMenu; private System.Windows.Forms.ToolStripMenuItem GenesisSettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem AtariSettingsToolStripMenuItem; diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index 1475a7e2dd..1bf17ff65e 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -2377,6 +2377,15 @@ namespace BizHawk.Client.EmuHawk #endregion + #region GGL + + private void GGLSettingsMenuItem_Click(object sender, EventArgs e) + { + GenericCoreConfig.DoDialog(this, "Game Gear Settings"); + } + + #endregion + #region GEN private void GenVdpViewerMenuItem_Click(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index ff80757b3d..977132d67b 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -25,6 +25,7 @@ using BizHawk.Emulation.Cores.Nintendo.NES; using BizHawk.Emulation.Cores.Nintendo.SNES; using BizHawk.Emulation.Cores.Nintendo.N64; using BizHawk.Emulation.Cores.Nintendo.GBHawkLink; +using BizHawk.Emulation.Cores.Sega.GGHawkLink; using BizHawk.Client.EmuHawk.WinFormExtensions; using BizHawk.Client.EmuHawk.ToolExtensions; @@ -1722,6 +1723,7 @@ namespace BizHawk.Client.EmuHawk SaturnSubMenu.Visible = false; DGBSubMenu.Visible = false; DGBHawkSubMenu.Visible = false; + GGLSubMenu.Visible = false; GenesisSubMenu.Visible = false; wonderSwanToolStripMenuItem.Visible = false; AppleSubMenu.Visible = false; @@ -1845,6 +1847,9 @@ namespace BizHawk.Client.EmuHawk case "AmstradCPC": amstradCPCToolStripMenuItem.Visible = true; break; + case "GGL": + GGLSubMenu.Visible = true; + break; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs index 0e0b2fd3bb..104ca4fea4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs @@ -131,7 +131,7 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink public int Frame => _frame; - public string SystemId => "DGB"; + public string SystemId => "GGL"; public bool DeterministicEmulation { get; set; }