diff --git a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs index 31c63cbd..f7786e52 100644 --- a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs +++ b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs @@ -8,17 +8,6 @@ namespace AxibugEmuOnline.Client { public class CoreSupporter : ISupporterImpl { - private static string RomDirectoryPath - { - get - { -#if UNITY_EDITOR - return "Assets/StreamingAssets/NES/Roms"; -#else - return $"{Application.streamingAssetsPath}/NES/Roms"; -#endif - } - } public Stream OpenRom(string fname) { @@ -38,8 +27,11 @@ namespace AxibugEmuOnline.Client public void GetRomPathInfo(string fname, out string fullPath, out string directPath) { - directPath = RomDirectoryPath; - fullPath = $"{directPath}/{fname}"; + var romFile = AppAxibugEmuOnline.romLib.GetNesRomFile(fname); + UnityEngine.Debug.Assert(romFile != null); + + fullPath = romFile.LocalFilePath; + directPath = Path.GetDirectoryName(fullPath); } public Stream OpenFile_DISKSYS() diff --git a/AxibugEmuOnline.Client/Assets/VirtualNes.Core/CoreLibs/MemoryUtility.cs b/AxibugEmuOnline.Client/Assets/VirtualNes.Core/CoreLibs/MemoryUtility.cs index 4f376fd8..eea81c1e 100644 --- a/AxibugEmuOnline.Client/Assets/VirtualNes.Core/CoreLibs/MemoryUtility.cs +++ b/AxibugEmuOnline.Client/Assets/VirtualNes.Core/CoreLibs/MemoryUtility.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.CompilerServices; namespace VirtualNes.Core {