diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs index 44841572..a47e7e20 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs @@ -23,6 +23,8 @@ namespace AxibugEmuOnline.Client void Resume(); /// 启动模拟器逻辑 MsgBool StartGame(RomFile romFile); + /// 释放模拟器核心 + void Dispose(); /// 重置核心,通常由模拟器核心提供的功能 void DoReset(); /// 获得模拟器核心的控制器设置器 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs index db5da709..9f47cf5a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs @@ -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; diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs index 8532f5b2..d7d40b9f 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/NesEmulator/NesEmulator.cs @@ -216,5 +216,7 @@ namespace AxibugEmuOnline.Client { return ControllerMapper; } + + public void Dispose() { } } } \ No newline at end of file