refactor core preferences to be a dictionary<string, string> to be stored in config, and consolidate subnes and subgb into just another core selection
This commit is contained in:
parent
b736d48911
commit
dfe7f8e3ab
|
@ -610,7 +610,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
var left = Database.GetGameInfo(leftBytes, "left.gb");
|
||||
var right = Database.GetGameInfo(rightBytes, "right.gb");
|
||||
if (Global.Config.GbUseGbHawk)
|
||||
if (Global.Config.PreferredCores["GB"] == CoreNames.GbHawk)
|
||||
{
|
||||
nextEmulator = new GBHawkLink(
|
||||
nextComm,
|
||||
|
@ -960,7 +960,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
break;
|
||||
case "SNES":
|
||||
bool useSnes9x = Global.Config.SnesInSnes9x;
|
||||
bool useSnes9x = Global.Config.PreferredCores["SNES"] == CoreNames.Snes9X;
|
||||
if (Global.Config.CoreForcingViaGameDb && !string.IsNullOrEmpty(game.ForcedCore))
|
||||
{
|
||||
if (game.ForcedCore.ToLower() == "snes9x")
|
||||
|
@ -991,80 +991,33 @@ namespace BizHawk.Client.Common
|
|||
case "NES":
|
||||
{
|
||||
// apply main spur-of-the-moment switcheroo as lowest priority
|
||||
string preference = "neshawk";
|
||||
if (Global.Config.NesInQuickNes)
|
||||
{
|
||||
preference = "quicknes";
|
||||
}
|
||||
string preference = Global.Config.PreferredCores["NES"];
|
||||
|
||||
// if user has saw fit to override in gamedb, apply that
|
||||
if (Global.Config.CoreForcingViaGameDb && !string.IsNullOrEmpty(game.ForcedCore))
|
||||
{
|
||||
preference = game.ForcedCore;
|
||||
preference = game.ForcedCore.ToLower() switch
|
||||
{
|
||||
"quicknes" => CoreNames.QuickNes,
|
||||
_ => CoreNames.NesHawk
|
||||
};
|
||||
}
|
||||
|
||||
// but only neshawk is accurate
|
||||
if (forceAccurateCore)
|
||||
{
|
||||
preference = "neshawk";
|
||||
preference = CoreNames.NesHawk;
|
||||
}
|
||||
|
||||
if (preference == "neshawk")
|
||||
{
|
||||
core = Global.Config.UseSubNESHawk
|
||||
? CoreInventory.Instance["NES", "SubNESHawk"]
|
||||
: CoreInventory.Instance["NES", "NesHawk"];
|
||||
}
|
||||
else
|
||||
{
|
||||
core = CoreInventory.Instance["NES", "QuickNes"];
|
||||
}
|
||||
core = CoreInventory.Instance["NES", preference];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "GB":
|
||||
if (!Global.Config.GbAsSgb)
|
||||
{
|
||||
if (Global.Config.UseSubGBHawk)
|
||||
{
|
||||
core = CoreInventory.Instance["GB", "SubGBHawk"];
|
||||
}
|
||||
else
|
||||
{
|
||||
core = Global.Config.GbUseGbHawk
|
||||
? CoreInventory.Instance["GB", "GBHawk"]
|
||||
: CoreInventory.Instance["GB", "Gambatte"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Global.Config.SgbUseBsnes)
|
||||
{
|
||||
game.System = "SNES";
|
||||
game.AddOption("SGB");
|
||||
var snes = new LibsnesCore(game, rom.FileData, null, null, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());
|
||||
nextEmulator = snes;
|
||||
}
|
||||
else
|
||||
{
|
||||
core = CoreInventory.Instance["SGB", "SameBoy"];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "GBC":
|
||||
if (!Global.Config.GbAsSgb)
|
||||
{
|
||||
if (Global.Config.UseSubGBHawk)
|
||||
{
|
||||
core = CoreInventory.Instance["GB", "SubGBHawk"];
|
||||
}
|
||||
else
|
||||
{
|
||||
core = Global.Config.GbUseGbHawk
|
||||
? CoreInventory.Instance["GBC", "GBHawk"]
|
||||
: CoreInventory.Instance["GBC", "Gambatte"];
|
||||
}
|
||||
core = CoreInventory.Instance["GB", Global.Config.PreferredCores["GB"]];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1106,9 +1059,7 @@ namespace BizHawk.Client.Common
|
|||
nextEmulator = cpc;
|
||||
break;
|
||||
case "GBA":
|
||||
core = Global.Config.GbaUsemGba
|
||||
? CoreInventory.Instance["GBA", "mGBA"]
|
||||
: CoreInventory.Instance["GBA", "VBA-Next"];
|
||||
core = CoreInventory.Instance["GBA", Global.Config.PreferredCores["GBA"]];
|
||||
break;
|
||||
case "PSX":
|
||||
nextEmulator = new Octoshock(nextComm, null, null, rom.FileData, GetCoreSettings<Octoshock>(), GetCoreSyncSettings<Octoshock>(), "PSX etc.");
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.PathExtensions;
|
||||
using BizHawk.Emulation.Cores;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
|
@ -311,16 +312,18 @@ namespace BizHawk.Client.Common
|
|||
// as this setting spans multiple cores and doesn't actually affect the behavior of any core,
|
||||
// it hasn't been absorbed into the new system
|
||||
public bool GbAsSgb { get; set; }
|
||||
public bool UseSubNESHawk { get; set; }
|
||||
public bool UseSubGBHawk { get; set; }
|
||||
public bool NesInQuickNes { get; set; } = true;
|
||||
public bool SnesInSnes9x { get; set; } = true;
|
||||
public bool GbaUsemGba { get; set; } = true;
|
||||
public bool SgbUseBsnes { get; set; }
|
||||
public bool GbUseGbHawk { get; set; }
|
||||
public bool CoreForcingViaGameDb { get; set; } = true;
|
||||
public string LibretroCore { get; set; }
|
||||
|
||||
public Dictionary<string, string> PreferredCores = new Dictionary<string, string>
|
||||
{
|
||||
["NES"] = CoreNames.QuickNes,
|
||||
["SNES"] = CoreNames.Snes9X,
|
||||
["GBA"] = CoreNames.Mgba,
|
||||
["GB"] = CoreNames.Gambatte
|
||||
};
|
||||
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public string LastWrittenFrom { get; set; } = VersionInfo.MainVersion;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
|
@ -74,12 +75,7 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
// The behavior here is to only temporarily override these settings when playing a movie and then restore the user's preferred settings
|
||||
// A more elegant approach would be appreciated
|
||||
public bool? PreviousNesInQuickNES { get; set; }
|
||||
public bool? PreviousSnesInSnes9x { get; set; }
|
||||
public bool? PreviousGbaUsemGba { get; set; }
|
||||
public bool? PreviousGbUseGbHawk { get; set; }
|
||||
public IDictionary<string, string> PreferredCores { get; } = new Dictionary<string, string>();
|
||||
|
||||
public void RecreateMovieController(ControllerDefinition definition)
|
||||
{
|
||||
|
@ -258,53 +254,21 @@ namespace BizHawk.Client.Common
|
|||
switch (emulator.SystemId)
|
||||
{
|
||||
case "NES":
|
||||
if (movie.Core == CoreNames.QuickNes)
|
||||
{
|
||||
PreviousNesInQuickNES = Global.Config.NesInQuickNes;
|
||||
Global.Config.NesInQuickNes = true;
|
||||
}
|
||||
else if (movie.Core == CoreNames.NesHawk)
|
||||
{
|
||||
PreviousNesInQuickNES = Global.Config.NesInQuickNes;
|
||||
Global.Config.NesInQuickNes = false;
|
||||
}
|
||||
PreferredCores["NES"] = Global.Config.PreferredCores["NES"];
|
||||
Global.Config.PreferredCores["NES"] = movie.Core;
|
||||
break;
|
||||
case "SNES":
|
||||
if (movie.Core == CoreNames.Snes9X)
|
||||
{
|
||||
PreviousSnesInSnes9x = Global.Config.SnesInSnes9x;
|
||||
Global.Config.SnesInSnes9x = true;
|
||||
}
|
||||
else if (movie.Core == CoreNames.Bsnes)
|
||||
{
|
||||
PreviousSnesInSnes9x = Global.Config.SnesInSnes9x;
|
||||
Global.Config.SnesInSnes9x = false;
|
||||
}
|
||||
PreferredCores["SNES"] = Global.Config.PreferredCores["SNES"];
|
||||
Global.Config.PreferredCores["SNES"] = movie.Core;
|
||||
break;
|
||||
case "GBA":
|
||||
if (movie.Core == CoreNames.Mgba)
|
||||
{
|
||||
PreviousGbaUsemGba = Global.Config.GbaUsemGba;
|
||||
Global.Config.GbaUsemGba = true;
|
||||
}
|
||||
else if (movie.Core == CoreNames.VbaNext)
|
||||
{
|
||||
PreviousGbaUsemGba = Global.Config.GbaUsemGba;
|
||||
Global.Config.GbaUsemGba = false;
|
||||
}
|
||||
PreferredCores["GBA"] = Global.Config.PreferredCores["GBA"];
|
||||
Global.Config.PreferredCores["GBA"] = movie.Core;
|
||||
break;
|
||||
case "GB":
|
||||
case "GBC":
|
||||
if (movie.Core == CoreNames.GbHawk)
|
||||
{
|
||||
PreviousGbUseGbHawk = Global.Config.GbUseGbHawk;
|
||||
Global.Config.GbUseGbHawk = true;
|
||||
}
|
||||
else if (movie.Core == CoreNames.Gambatte)
|
||||
{
|
||||
PreviousGbUseGbHawk = Global.Config.GbUseGbHawk;
|
||||
Global.Config.GbUseGbHawk = false;
|
||||
}
|
||||
PreferredCores["GB"] = Global.Config.PreferredCores["GB"];
|
||||
Global.Config.PreferredCores["GB"] = movie.Core;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
using BizHawk.Common;
|
||||
using BizHawk.Common.IOExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SNES;
|
||||
|
||||
namespace BizHawk.Client.Common.movie.import
|
||||
|
@ -283,7 +284,7 @@ namespace BizHawk.Client.Common.movie.import
|
|||
|
||||
Result.Movie.HeaderEntries[HeaderKeys.Platform] = platform;
|
||||
Result.Movie.SyncSettingsJson = ConfigService.SaveWithType(ss);
|
||||
Config.SnesInSnes9x = false; // TODO: convert to snes9x if user has set this to true
|
||||
Config.PreferredCores["SNES"] = CoreNames.Bsnes; // TODO: convert to snes9x if it is the user's preference
|
||||
}
|
||||
|
||||
private IController EmptyLmsvFrame()
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SNES;
|
||||
|
||||
namespace BizHawk.Client.Common.movie.import
|
||||
|
@ -313,7 +314,7 @@ namespace BizHawk.Client.Common.movie.import
|
|||
Result.Movie.AppendFrame(controllers);
|
||||
|
||||
Result.Movie.SyncSettingsJson = ConfigService.SaveWithType(ss);
|
||||
Config.SnesInSnes9x = false; // TODO: convert to snes9x if user has set this to true
|
||||
Config.PreferredCores["SNES"] = CoreNames.Bsnes; // TODO: convert to snes9x if it is the user's preference
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Nintendo.GBA;
|
||||
using BizHawk.Emulation.Cores.Nintendo.GBHawk;
|
||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
|
@ -274,13 +275,13 @@ namespace BizHawk.Client.Common.movie.import
|
|||
|
||||
if (isGBA)
|
||||
{
|
||||
Config.GbaUsemGba = true;
|
||||
Config.PreferredCores["GBA"] = CoreNames.Mgba;
|
||||
var ss = new MGBAHawk.SyncSettings { SkipBios = true };
|
||||
Result.Movie.SyncSettingsJson = ConfigService.SaveWithType(ss);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Config.GbUseGbHawk || Config.UseSubGBHawk)
|
||||
if (Config.PreferredCores["GB"] == CoreNames.GbHawk || Config.PreferredCores["GB"] == CoreNames.SubGbHawk)
|
||||
{
|
||||
var tempSync = new GBHawk.GBSyncSettings();
|
||||
if (is_GBC) { tempSync.ConsoleMode = GBHawk.GBSyncSettings.ConsoleModeType.GBC; }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
|
@ -28,11 +29,10 @@ namespace BizHawk.Client.Common
|
|||
|
||||
IController PreviousFrame { get; }
|
||||
|
||||
// TODO: this isn't sustainable
|
||||
bool? PreviousNesInQuickNES { get; set; }
|
||||
bool? PreviousSnesInSnes9x { get; set; }
|
||||
bool? PreviousGbaUsemGba { get; set; }
|
||||
bool? PreviousGbUseGbHawk { get; set; }
|
||||
/// <summary>
|
||||
/// Previous saved core preferences. Stored so that they can be stored after a movie overrides the value
|
||||
/// </summary>
|
||||
IDictionary<string, string> PreferredCores { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Recreates MovieController with the given controller definition
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
return emulator switch
|
||||
{
|
||||
Snes9x _ => PromptToSwitchCore("Snes9x", "bsnes", () => Global.Config.SnesInSnes9x = false),
|
||||
QuickNES _ => PromptToSwitchCore("QuickNes", "NesHawk", () => Global.Config.NesInQuickNes = false),
|
||||
Snes9x _ => PromptToSwitchCore("Snes9x", "bsnes", () => Global.Config.PreferredCores["SNES"] = Cores.CoreNames.Bsnes),
|
||||
QuickNES _ => PromptToSwitchCore("QuickNes", "NesHawk", () => Global.Config.PreferredCores["NES"] = Cores.CoreNames.QuickNes),
|
||||
_ => true
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1949,7 +1949,7 @@
|
|||
this.GBGambatteMenuItem.Name = "GBGambatteMenuItem";
|
||||
this.GBGambatteMenuItem.Size = new System.Drawing.Size(121, 22);
|
||||
this.GBGambatteMenuItem.Text = "Gambatte";
|
||||
this.GBGambatteMenuItem.Click += new System.EventHandler(this.GBCorePick_Click);
|
||||
this.GBGambatteMenuItem.Click += new System.EventHandler(this.GambatteCorePick_Click);
|
||||
//
|
||||
// GBGBHawkMenuItem
|
||||
//
|
||||
|
|
|
@ -19,6 +19,7 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
|
|||
using BizHawk.Emulation.Cores.Computers.AppleII;
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.PathExtensions;
|
||||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Atari.A7800Hawk;
|
||||
using BizHawk.Emulation.Cores.Computers.Commodore64;
|
||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
|
@ -936,8 +937,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CoreMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
quickNESMenuItem.Checked = Config.NesInQuickNes;
|
||||
nesHawkMenuItem.Checked = !Config.NesInQuickNes;
|
||||
quickNESMenuItem.Checked = Config.PreferredCores["NES"] == CoreNames.QuickNes;
|
||||
nesHawkMenuItem.Checked = Config.PreferredCores["NES"] == CoreNames.NesHawk;
|
||||
}
|
||||
|
||||
private void ControllersMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1199,15 +1200,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void NesCoreSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
QuicknesCoreMenuItem.Checked = Config.NesInQuickNes;
|
||||
NesCoreMenuItem.Checked = !Config.NesInQuickNes && !Config.UseSubNESHawk;
|
||||
SubNesHawkMenuItem.Checked = Config.UseSubNESHawk;
|
||||
QuicknesCoreMenuItem.Checked = Config.PreferredCores["NES"] == CoreNames.QuickNes;
|
||||
NesCoreMenuItem.Checked = Config.PreferredCores["NES"] == CoreNames.NesHawk;
|
||||
SubNesHawkMenuItem.Checked = Config.PreferredCores["NES"] == CoreNames.SubNesHawk;
|
||||
}
|
||||
|
||||
private void QuickNesCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.NesInQuickNes = true;
|
||||
Config.UseSubNESHawk = false;
|
||||
Config.PreferredCores["NES"] = CoreNames.QuickNes;
|
||||
|
||||
if (Emulator.SystemId == "NES")
|
||||
{
|
||||
|
@ -1217,8 +1217,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void NesCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.NesInQuickNes = false;
|
||||
Config.UseSubNESHawk = false;
|
||||
Config.PreferredCores["NES"] = CoreNames.NesHawk;
|
||||
|
||||
if (Emulator.SystemId == "NES")
|
||||
{
|
||||
|
@ -1228,20 +1227,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void SubNesCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.UseSubNESHawk = true;
|
||||
Config.NesInQuickNes = false;
|
||||
Config.PreferredCores["NES"] = CoreNames.SubNesHawk;
|
||||
|
||||
if (!Emulator.IsNull())
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
}
|
||||
|
||||
private void SubGBCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.UseSubGBHawk ^= true;
|
||||
|
||||
if (!Emulator.IsNull())
|
||||
if (Emulator.SystemId == "NES")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
@ -1249,13 +1237,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CoreSNESSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
Coresnes9xMenuItem.Checked = Config.SnesInSnes9x;
|
||||
CorebsnesMenuItem.Checked = !Config.SnesInSnes9x;
|
||||
Coresnes9xMenuItem.Checked = Config.PreferredCores["SNES"] == CoreNames.Snes9X;
|
||||
CorebsnesMenuItem.Checked = Config.PreferredCores["SNES"] == CoreNames.Bsnes;
|
||||
}
|
||||
|
||||
private void CoreSnesToggle_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.SnesInSnes9x ^= true;
|
||||
Config.PreferredCores["SNES"] = Config.PreferredCores["SNES"] == CoreNames.Snes9X
|
||||
? CoreNames.Bsnes
|
||||
: CoreNames.Snes9X;
|
||||
|
||||
if (Emulator.SystemId == "SNES")
|
||||
{
|
||||
|
@ -1265,13 +1255,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void GbaCoreSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
VbaNextCoreMenuItem.Checked = !Config.GbaUsemGba;
|
||||
MgbaCoreMenuItem.Checked = Config.GbaUsemGba;
|
||||
VbaNextCoreMenuItem.Checked = Config.PreferredCores["GBA"] == CoreNames.VbaNext;
|
||||
MgbaCoreMenuItem.Checked = Config.PreferredCores["GBA"] == CoreNames.Mgba;
|
||||
}
|
||||
|
||||
private void GbaCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.GbaUsemGba ^= true;
|
||||
Config.PreferredCores["GBA"] = Config.PreferredCores["GBA"] == CoreNames.VbaNext
|
||||
? CoreNames.Mgba
|
||||
: CoreNames.VbaNext;
|
||||
if (Emulator.SystemId == "GBA")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
|
@ -1286,16 +1278,34 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void GBCoreSubmenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
GBGambatteMenuItem.Checked = !Config.GbUseGbHawk;
|
||||
GBGBHawkMenuItem.Checked = Config.GbUseGbHawk;
|
||||
SubGBHawkMenuItem.Checked = Config.UseSubGBHawk;
|
||||
GBGambatteMenuItem.Checked = Config.PreferredCores["GB"] == CoreNames.Gambatte;
|
||||
GBGBHawkMenuItem.Checked = Config.PreferredCores["GB"] == CoreNames.GbHawk;
|
||||
SubGBHawkMenuItem.Checked = Config.PreferredCores["GB"] == CoreNames.SubGbHawk;
|
||||
}
|
||||
|
||||
private void SubGBCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.PreferredCores["GB"] = CoreNames.SubGbHawk;
|
||||
if (Emulator.SystemId == "GB" || Emulator.SystemId == "GBC")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
}
|
||||
|
||||
private void SgbCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.SgbUseBsnes ^= true;
|
||||
// TODO: only flag if one of these cores
|
||||
if (!Emulator.IsNull())
|
||||
if (Emulator.SystemId == "GB" || Emulator.SystemId == "GBC")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
}
|
||||
|
||||
private void GambatteCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.PreferredCores["GB"] = CoreNames.Gambatte;
|
||||
|
||||
if (Emulator.SystemId == "GB" || Emulator.SystemId == "GBC")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
@ -1303,10 +1313,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void GBCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.GbUseGbHawk ^= true;
|
||||
Config.UseSubGBHawk = false;
|
||||
// TODO: only flag if one of these cores
|
||||
if (!Emulator.IsNull())
|
||||
Config.PreferredCores["GB"] = CoreNames.GbHawk;
|
||||
|
||||
if (Emulator.SystemId == "GB" || Emulator.SystemId == "GBC")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
@ -1550,13 +1559,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void QuickNesMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.NesInQuickNes = true;
|
||||
Config.PreferredCores["NES"] = CoreNames.QuickNes;
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
||||
private void NesHawkMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.NesInQuickNes = false;
|
||||
Config.PreferredCores["NES"] = CoreNames.NesHawk;
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
||||
|
@ -2006,13 +2015,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void UsemGBAMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.GbaUsemGba = true;
|
||||
Config.PreferredCores["GBA"] = CoreNames.Mgba;
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
||||
private void UseVbaNextMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.GbaUsemGba = false;
|
||||
Config.PreferredCores["GBA"] = CoreNames.VbaNext;
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
||||
|
@ -2023,8 +2032,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void GBACoreSelectionSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
GBAmGBAMenuItem.Checked = Config.GbaUsemGba;
|
||||
GBAVBANextMenuItem.Checked = !Config.GbaUsemGba;
|
||||
GBAmGBAMenuItem.Checked = Config.PreferredCores["GBA"] == CoreNames.Mgba;
|
||||
GBAVBANextMenuItem.Checked = Config.PreferredCores["GBA"] == CoreNames.VbaNext;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -31,28 +31,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
RebootCore();
|
||||
|
||||
if (MovieSession.PreviousNesInQuickNES.HasValue)
|
||||
foreach (var previousPref in MovieSession.PreferredCores)
|
||||
{
|
||||
Config.NesInQuickNes = MovieSession.PreviousNesInQuickNES.Value;
|
||||
MovieSession.PreviousNesInQuickNES = null;
|
||||
}
|
||||
|
||||
if (MovieSession.PreviousSnesInSnes9x.HasValue)
|
||||
{
|
||||
Config.SnesInSnes9x = MovieSession.PreviousSnesInSnes9x.Value;
|
||||
MovieSession.PreviousSnesInSnes9x = null;
|
||||
}
|
||||
|
||||
if (MovieSession.PreviousGbaUsemGba.HasValue)
|
||||
{
|
||||
Config.GbaUsemGba = MovieSession.PreviousGbaUsemGba.Value;
|
||||
MovieSession.PreviousGbaUsemGba = null;
|
||||
}
|
||||
|
||||
if (MovieSession.PreviousGbUseGbHawk.HasValue)
|
||||
{
|
||||
Config.GbUseGbHawk = MovieSession.PreviousGbUseGbHawk.Value;
|
||||
MovieSession.PreviousGbUseGbHawk = null;
|
||||
Config.PreferredCores[previousPref.Key] = previousPref.Value;
|
||||
}
|
||||
|
||||
Config.RecentMovies.Add(movie.Filename);
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Windows.Forms;
|
|||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
using BizHawk.Emulation.Cores;
|
||||
using BizHawk.Emulation.Cores.Nintendo.N64;
|
||||
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
||||
using BizHawk.Emulation.Cores.Sega.MasterSystem;
|
||||
|
@ -113,7 +113,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
PutSyncSettings<N64>(n64Settings);
|
||||
|
||||
// SNES
|
||||
_config.SnesInSnes9x = true;
|
||||
_config.PreferredCores["SNES"] = CoreNames.Snes9X;
|
||||
|
||||
// Genesis
|
||||
var genesisSettings = GetSyncSettings<GPGX, GPGX.GPGXSyncSettings>();
|
||||
|
@ -138,7 +138,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
PutSyncSettings<Atari2600>(a2600Settings);
|
||||
|
||||
// NES
|
||||
_config.NesInQuickNes = true;
|
||||
_config.PreferredCores["NES"] = CoreNames.QuickNes;
|
||||
}
|
||||
|
||||
private void SetLongPlay()
|
||||
|
@ -146,7 +146,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
_config.SaveStateCompressionLevelNormal = 5;
|
||||
|
||||
// SNES
|
||||
_config.SnesInSnes9x = false;
|
||||
_config.PreferredCores["SNES"] = CoreNames.Bsnes;
|
||||
|
||||
// SMS
|
||||
var smsSettings = GetSyncSettings<SMS, SMS.SmsSyncSettings>();
|
||||
|
@ -161,7 +161,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
PutSyncSettings<Atari2600>(a2600Settings);
|
||||
|
||||
// NES
|
||||
_config.NesInQuickNes = false;
|
||||
_config.PreferredCores["NES"] = CoreNames.NesHawk;
|
||||
}
|
||||
|
||||
private void SetTas()
|
||||
|
@ -185,7 +185,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
PutSyncSettings<N64>(n64Settings);
|
||||
|
||||
// SNES
|
||||
_config.SnesInSnes9x = false;
|
||||
_config.PreferredCores["SNES"] = CoreNames.Snes9X;
|
||||
|
||||
// Genesis
|
||||
var genesisSettings = GetSyncSettings<GPGX, GPGX.GPGXSyncSettings>();
|
||||
|
@ -205,7 +205,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
PutSyncSettings<Atari2600>(a2600Settings);
|
||||
|
||||
// NES
|
||||
_config.NesInQuickNes = false;
|
||||
_config.PreferredCores["NES"] = CoreNames.NesHawk;
|
||||
}
|
||||
|
||||
private void SetN64Tas()
|
||||
|
|
|
@ -7,7 +7,7 @@ using BizHawk.Emulation.Cores.Components.ARM;
|
|||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||
{
|
||||
[Core("VBA-Next", "many authors", true, true, "cd508312a29ed8c29dacac1b11c2dce56c338a54", "https://github.com/libretro/vba-next", false)]
|
||||
[Core(CoreNames.VbaNext, "many authors", true, true, "cd508312a29ed8c29dacac1b11c2dce56c338a54", "https://github.com/libretro/vba-next", false)]
|
||||
[ServiceNotApplicable(new[] { typeof(IDriveLight), typeof(IRegionable) })]
|
||||
public partial class VBANext : IEmulator, IVideoProvider, ISoundProvider, IInputPollable,
|
||||
IGBAGPUViewable, ISaveRam, IStatable, IDebuggable, ISettable<object, VBANext.SyncSettings>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Nintendo.GBHawk;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.SubGBHawk
|
||||
{
|
||||
[Core(
|
||||
"SubGBHawk",
|
||||
CoreNames.SubGbHawk,
|
||||
"",
|
||||
isPorted: false,
|
||||
isReleased: true)]
|
||||
|
|
|
@ -18,5 +18,6 @@ namespace BizHawk.Emulation.Cores
|
|||
public const string VbaNext = "VBA-Next";
|
||||
public const string GbHawk = "GBHawk";
|
||||
public const string Gambatte = "Gambatte";
|
||||
public const string SubGbHawk = "SubGBHawk";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue