From fecb7be1a4d9ab068e64d495067044d810636102 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 7 Jan 2025 14:19:12 +0800 Subject: [PATCH] =?UTF-8?q?IEmuCore=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AADis?= =?UTF-8?q?pose=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Client/Assets/Script/AppMain/IEmuCore.cs | 2 ++ AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppEmu.cs | 1 + .../Assets/Script/AppMain/NesEmulator/NesEmulator.cs | 2 ++ 3 files changed, 5 insertions(+) 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