From 31f3182e35dd2780c8602b7da58c9bbff9601cca Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Thu, 18 Jul 2024 16:24:14 +0800 Subject: [PATCH] =?UTF-8?q?LoadGame=E6=8E=A5=E5=8F=A3=E6=8F=90=E5=88=B0App?= =?UTF-8?q?Emu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Client/Assets/Script/Manager/AppEmu.cs | 8 +++++++- AxibugEmuOnline.Client/Assets/Script/NesCoreProxy.cs | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/Manager/AppEmu.cs b/AxibugEmuOnline.Client/Assets/Script/Manager/AppEmu.cs index 4eb62ed..aee4b3c 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Manager/AppEmu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Manager/AppEmu.cs @@ -19,7 +19,13 @@ namespace AxibugEmuOnline.Client.Manager new NesJoyController(EnumJoyIndex.P2), new NesJoyController(EnumJoyIndex.P3), new NesJoyController(EnumJoyIndex.P4)); - NesEmu.LoadGame("kirby.nes", out var successed, true); + + } + + public bool LoadGame(string romName) + { + NesEmu.LoadGame(romName, out var successed, true); + return successed; } public void Dispose() diff --git a/AxibugEmuOnline.Client/Assets/Script/NesCoreProxy.cs b/AxibugEmuOnline.Client/Assets/Script/NesCoreProxy.cs index de328eb..122b411 100644 --- a/AxibugEmuOnline.Client/Assets/Script/NesCoreProxy.cs +++ b/AxibugEmuOnline.Client/Assets/Script/NesCoreProxy.cs @@ -18,6 +18,8 @@ namespace AxibugEmuOnline.Client private void Start() { m_appEnum.Init(VideoCom, AudioCom, InputManager); + + m_appEnum.LoadGame("kirby.nes"); } private void OnDestroy()