fix crashes removing lua callbacks on some cores
This commit is contained in:
parent
ba74cc5dda
commit
e6ea96771b
|
@ -40,7 +40,15 @@ namespace BizHawk.Client.Common
|
|||
|
||||
if (Global.Emulator.CanDebug())
|
||||
{
|
||||
Global.Emulator.AsDebuggable().MemoryCallbacks.RemoveAll(this.Select(x => x.Callback));
|
||||
try
|
||||
{
|
||||
var cbSys = Global.Emulator.AsDebuggable().MemoryCallbacks;
|
||||
cbSys.RemoveAll(this.Select(x => x.Callback));
|
||||
}
|
||||
catch
|
||||
{
|
||||
//swallow exceptions here. many cores havent implemented memorycallbacks, we ought to have more granular feature querying
|
||||
}
|
||||
}
|
||||
|
||||
Clear();
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
|
|||
isPorted: true,
|
||||
isReleased: true
|
||||
)]
|
||||
public unsafe class Octoshock : IEmulator, IVideoProvider, ISyncSoundProvider, ISaveRam, IStatable, IDriveLight, IInputPollable, ISettable<Octoshock.Settings, Octoshock.SyncSettings>, IDebuggable, IRegionable
|
||||
public unsafe class Octoshock : IEmulator, IVideoProvider, ISyncSoundProvider, ISaveRam, IStatable, IDriveLight, ISettable<Octoshock.Settings, Octoshock.SyncSettings>, IDebuggable, IRegionable
|
||||
{
|
||||
public string SystemId { get { return "PSX"; } }
|
||||
|
||||
|
@ -396,8 +396,6 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
|
|||
|
||||
public IEmulatorServiceProvider ServiceProvider { get; private set; }
|
||||
|
||||
public IInputCallbackSystem InputCallbacks { get { throw new NotImplementedException(); } }
|
||||
|
||||
public bool DriveLightEnabled { get; private set; }
|
||||
public bool DriveLightOn { get; private set; }
|
||||
|
||||
|
@ -1295,7 +1293,6 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
|
|||
return OctoshockDll.SHOCK_OK;
|
||||
}
|
||||
|
||||
[FeatureNotImplemented]
|
||||
public IMemoryCallbackSystem MemoryCallbacks { get { throw new NotImplementedException(); } }
|
||||
|
||||
public bool CanStep(StepType type) { return false; }
|
||||
|
|
Loading…
Reference in New Issue