IEmuCore增加一个Dispose接口

This commit is contained in:
ALIENJACK\alien 2025-01-07 14:19:12 +08:00
parent 16765291fa
commit fecb7be1a4
3 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,8 @@ namespace AxibugEmuOnline.Client
void Resume();
/// <summary> 启动模拟器逻辑 </summary>
MsgBool StartGame(RomFile romFile);
/// <summary> 释放模拟器核心 </summary>
void Dispose();
/// <summary> 重置核心,通常由模拟器核心提供的功能 </summary>
void DoReset();
/// <summary> 获得模拟器核心的控制器设置器 </summary>

View File

@ -101,6 +101,7 @@ namespace AxibugEmuOnline.Client.Manager
public void StopGame()
{
if (m_emuCore.IsNull()) return;
m_emuCore.Dispose();
GameObject.Destroy(m_emuCore.gameObject);
m_emuCore = null;

View File

@ -216,5 +216,7 @@ namespace AxibugEmuOnline.Client
{
return ControllerMapper;
}
public void Dispose() { }
}
}