去掉dynamic换成il2cpp可用的方式
This commit is contained in:
parent
2303b0c5f6
commit
ee40681744
@ -204,7 +204,7 @@ namespace Essgee.Emulation
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
return emulator.GetDebugInformation();
|
||||
}
|
||||
|
@ -236,9 +236,9 @@ namespace Essgee.Emulation.Machines
|
||||
ReconfigureSystem();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
return new Dictionary<string, dynamic>
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
[nameof(cartridge)] = SaveStateHandler.PerformGetState(cartridge),
|
||||
[nameof(wram)] = wram,
|
||||
@ -254,9 +254,9 @@ namespace Essgee.Emulation.Machines
|
||||
};
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -306,19 +306,19 @@ namespace Essgee.Emulation.Machines
|
||||
audio?.Shutdown();
|
||||
}
|
||||
|
||||
public void SetState(Dictionary<string, dynamic> state)
|
||||
public void SetState(Dictionary<string, object> state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -363,19 +363,19 @@ namespace Essgee.Emulation.Machines
|
||||
audio?.Shutdown();
|
||||
}
|
||||
|
||||
public void SetState(Dictionary<string, dynamic> state)
|
||||
public void SetState(Dictionary<string, object> state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -268,9 +268,9 @@ namespace Essgee.Emulation.Machines
|
||||
ReconfigureSystem();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
return new Dictionary<string, dynamic>
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
[nameof(configuration.Region)] = configuration.Region,
|
||||
|
||||
@ -296,9 +296,9 @@ namespace Essgee.Emulation.Machines
|
||||
};
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ namespace Essgee.Emulation.Machines
|
||||
double PixelAspectRatio { get; }
|
||||
(string Name, string Description)[] RuntimeOptions { get; }
|
||||
|
||||
Dictionary<string, dynamic> GetDebugInformation();
|
||||
Dictionary<string, object> GetDebugInformation();
|
||||
|
||||
void SetConfiguration(IConfiguration config);
|
||||
|
||||
@ -38,8 +38,8 @@ namespace Essgee.Emulation.Machines
|
||||
void Reset();
|
||||
void Shutdown();
|
||||
|
||||
void SetState(Dictionary<string, dynamic> state);
|
||||
Dictionary<string, dynamic> GetState();
|
||||
void SetState(Dictionary<string, object> state);
|
||||
Dictionary<string, object> GetState();
|
||||
|
||||
void Load(byte[] romData, byte[] ramData, Type mapperType);
|
||||
byte[] GetCartridgeRam();
|
||||
|
@ -290,9 +290,9 @@ namespace Essgee.Emulation.Machines
|
||||
ReconfigureSystem();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
return new Dictionary<string, dynamic>
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
[nameof(configuration.TVStandard)] = configuration.TVStandard,
|
||||
[nameof(configuration.Region)] = configuration.Region,
|
||||
@ -313,9 +313,9 @@ namespace Essgee.Emulation.Machines
|
||||
};
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -260,9 +260,9 @@ namespace Essgee.Emulation.Machines
|
||||
ReconfigureSystem();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
return new Dictionary<string, dynamic>
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
[nameof(configuration.TVStandard)] = configuration.TVStandard,
|
||||
|
||||
@ -276,9 +276,9 @@ namespace Essgee.Emulation.Machines
|
||||
};
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -235,9 +235,9 @@ namespace Essgee.Emulation.Machines
|
||||
ReconfigureSystem();
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetState()
|
||||
public Dictionary<string, object> GetState()
|
||||
{
|
||||
return new Dictionary<string, dynamic>
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
[nameof(configuration.TVStandard)] = configuration.TVStandard,
|
||||
|
||||
@ -249,9 +249,9 @@ namespace Essgee.Emulation.Machines
|
||||
};
|
||||
}
|
||||
|
||||
public Dictionary<string, dynamic> GetDebugInformation()
|
||||
public Dictionary<string, object> GetDebugInformation()
|
||||
{
|
||||
var dict = new Dictionary<string, dynamic>
|
||||
var dict = new Dictionary<string, object>
|
||||
{
|
||||
{ "CyclesInFrame", currentMasterClockCyclesInFrame },
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ namespace Essgee.Emulation
|
||||
{
|
||||
public static string ExpectedVersion = $"ESGST{new Version(EmuStandInfo.ProductVersion).Major:D3}";
|
||||
|
||||
public static Dictionary<string, dynamic> Load(Stream stream, string machineName)
|
||||
public static Dictionary<string, object> Load(Stream stream, string machineName)
|
||||
{
|
||||
stream.Position = 0;
|
||||
|
||||
@ -45,12 +45,12 @@ namespace Essgee.Emulation
|
||||
|
||||
/* Read state data */
|
||||
var binaryFormatter = new BinaryFormatter();
|
||||
return (binaryFormatter.Deserialize(stateStream) as Dictionary<string, dynamic>);
|
||||
return (binaryFormatter.Deserialize(stateStream) as Dictionary<string, object>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Save(Stream stream, string machineName, Dictionary<string, dynamic> state)
|
||||
public static void Save(Stream stream, string machineName, Dictionary<string, object> state)
|
||||
{
|
||||
using (var writer = new BinaryWriter(new MemoryStream()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user