When loading GBA movies, load the correct core too
This commit is contained in:
parent
7e2cfa0dd5
commit
c23e69a810
|
@ -6,6 +6,7 @@ using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
|
|||
using BizHawk.Emulation.Cores.Nintendo.NES;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SNES9X;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SNES;
|
||||
using BizHawk.Emulation.Cores.Nintendo.GBA;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
|
||||
|
@ -456,6 +457,7 @@ namespace BizHawk.Client.Common
|
|||
// A more elegant approach would be appreciated
|
||||
public bool? PreviousNES_InQuickNES { get; set; }
|
||||
public bool? PreviousSNES_InSnes9x { get; set; }
|
||||
public bool? PreviousGBA_UsemGBA { get; set; }
|
||||
|
||||
public void QueueNewMovie(IMovie movie, bool record, IEmulator emulator)
|
||||
{
|
||||
|
@ -516,6 +518,22 @@ namespace BizHawk.Client.Common
|
|||
Global.Config.SNES_InSnes9x = false;
|
||||
}
|
||||
}
|
||||
else if (!record && emulator.SystemId == "GBA") // ditto with GBA, we should probably architect this at some point, this isn't sustainable
|
||||
{
|
||||
var mGBAName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(MGBAHawk), typeof(CoreAttributes))).CoreName;
|
||||
var vbaNextName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(VBANext), typeof(CoreAttributes))).CoreName;
|
||||
|
||||
if (movie.Core == mGBAName)
|
||||
{
|
||||
PreviousGBA_UsemGBA = Global.Config.GBA_UsemGBA;
|
||||
Global.Config.GBA_UsemGBA = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PreviousSNES_InSnes9x = Global.Config.GBA_UsemGBA;
|
||||
Global.Config.GBA_UsemGBA = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (record) // This is a hack really, we need to set the movie to its propert state so that it will be considered active later
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
bool? PreviousNES_InQuickNES { get; set; }
|
||||
bool? PreviousSNES_InSnes9x { get; set; }
|
||||
bool? PreviousGBA_UsemGBA { get; set; }
|
||||
|
||||
void HandleMovieOnFrameLoop();
|
||||
void HandleMovieAfterFrameLoop();
|
||||
|
|
|
@ -52,6 +52,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.MovieSession.PreviousSNES_InSnes9x = null;
|
||||
}
|
||||
|
||||
if (Global.MovieSession.PreviousGBA_UsemGBA.HasValue)
|
||||
{
|
||||
Global.Config.GBA_UsemGBA = Global.MovieSession.PreviousGBA_UsemGBA.Value;
|
||||
Global.MovieSession.PreviousGBA_UsemGBA = null;
|
||||
}
|
||||
|
||||
Global.Config.RecentMovies.Add(movie.Filename);
|
||||
|
||||
if (Global.Emulator.HasSavestates() && movie.StartsFromSavestate)
|
||||
|
|
|
@ -1210,6 +1210,12 @@ namespace BizHawk.Client.MultiHawk
|
|||
Global.MovieSession.PreviousSNES_InSnes9x = null;
|
||||
}
|
||||
|
||||
if (Global.MovieSession.PreviousGBA_UsemGBA.HasValue)
|
||||
{
|
||||
Global.Config.GBA_UsemGBA = Global.MovieSession.PreviousGBA_UsemGBA.Value;
|
||||
Global.MovieSession.PreviousGBA_UsemGBA = null;
|
||||
}
|
||||
|
||||
Global.Config.RecentMovies.Add(movie.Filename);
|
||||
|
||||
if (EmulatorWindows.Master.Emulator.HasSavestates() && movie.StartsFromSavestate)
|
||||
|
|
Loading…
Reference in New Issue