33 lines
973 B
C#
33 lines
973 B
C#
|
using AxibugEmuOnline.Client.ClientCore;
|
|||
|
using System.Diagnostics;
|
|||
|
using VirtualNes.Core;
|
|||
|
|
|||
|
namespace AxibugEmuOnline.Client
|
|||
|
{
|
|||
|
public class InGameUI_LoadState : ExecuteMenu
|
|||
|
{
|
|||
|
private InGameUI m_gameUI;
|
|||
|
|
|||
|
public InGameUI_LoadState(InGameUI gameUI) : base("<22><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>", null)
|
|||
|
{
|
|||
|
m_gameUI = gameUI;
|
|||
|
}
|
|||
|
|
|||
|
public override void OnExcute()
|
|||
|
{
|
|||
|
Stopwatch sw = Stopwatch.StartNew();
|
|||
|
switch (m_gameUI.RomFile.Platform)
|
|||
|
{
|
|||
|
case EnumPlatform.NES:
|
|||
|
if (m_gameUI.GetQuickState<State>(out var quickState))
|
|||
|
{
|
|||
|
m_gameUI.GetCore<NesEmulator>().NesCore.LoadState(quickState);
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
sw.Stop();
|
|||
|
App.log.Info($"{m_gameUI.RomFile.Platform}====><3E><><EFBFBD>ռ<EFBFBD><D5BC>غ<EFBFBD>ʱ:{sw.Elapsed.TotalMilliseconds}ms");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|