Merge pull request 'IEmuCore增加一个Dispose接口' (#83) from Alienjack/AxibugEmuOnline:master into master

Reviewed-on: sin365/AxibugEmuOnline#83
This commit is contained in:
sin365 2025-01-07 14:19:41 +08:00
commit f489b79e9a
3 changed files with 5 additions and 0 deletions

View File

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

View File

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

View File

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