diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs
index 96d3eb29..edfd0051 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomFile.cs
@@ -15,6 +15,7 @@ namespace AxibugEmuOnline.Client
private HttpAPI.Resp_RomInfo webData;
/// 依赖的Rom文件
private List dependencies = new List();
+ RomPlatformType m_defaultPlatform;
/// 指示该Rom是否是多文件Rom
public bool MultiFileRom
@@ -111,7 +112,7 @@ namespace AxibugEmuOnline.Client
}
}
- public RomPlatformType Platform => webData != null ? (RomPlatformType)webData.ptype : RomPlatformType.Invalid;
+ public RomPlatformType Platform => webData != null ? (RomPlatformType)webData.ptype : m_defaultPlatform;
/// 指示该Rom信息是否已填充
public bool InfoReady
{
@@ -143,7 +144,8 @@ namespace AxibugEmuOnline.Client
/// 在查询结果中的索引
public int Index { get; private set; }
/// 在查询结果中的所在页
- public int Page { get; private set; }
+ public int Page { get; private set; }
+
public string Hash => webData != null ? webData.hash : string.Empty;
/// 标记是否收藏
public bool Star
@@ -159,10 +161,11 @@ namespace AxibugEmuOnline.Client
public event Action OnDownloadOver;
public event Action OnInfoFilled;
- public RomFile(int index, int insidePage)
+ public RomFile(int index, int insidePage, RomPlatformType defaultPlatform)
{
Index = index;
Page = insidePage;
+ m_defaultPlatform = defaultPlatform;
}
public void CheckLocalFileState()
@@ -305,7 +308,7 @@ namespace AxibugEmuOnline.Client
dependencies.Clear();
foreach (var romID in webData.parentRomIdsList)
{
- var romFile = new RomFile(Index, Page);
+ var romFile = new RomFile(Index, Page, m_defaultPlatform);
dependencies.Add(romFile);
App.StartCoroutine(App.httpAPI.GetRomInfo(romID, (romInfo) =>
{
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs
index 8b6eae53..f18d1c1d 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/RomLib.cs
@@ -94,7 +94,7 @@ namespace AxibugEmuOnline.Client
for (int i = 0; i < RomFetchList.Length; i++)
{
//以后考虑用对象池实例化RomFile
- RomFetchList[i] = new RomFile(i, i / PAGE_SIZE);
+ RomFetchList[i] = new RomFile(i, i / PAGE_SIZE, m_platform);
}
SaveRomInfoFromWeb(romList);
@@ -117,7 +117,7 @@ namespace AxibugEmuOnline.Client
for (int i = 0; i < RomFetchList.Length; i++)
{
//以后考虑用对象池实例化RomFile
- RomFetchList[i] = new RomFile(i, i / PAGE_SIZE);
+ RomFetchList[i] = new RomFile(i, i / PAGE_SIZE, m_platform);
}
SaveRomInfoFromWeb(romList);
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs
index f693ca3e..99a76630 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Utility.cs
@@ -46,7 +46,7 @@ namespace AxibugEmuOnline.Client
App.StartCoroutine(App.httpAPI.GetRomInfo(roomInfo.GameRomID, (romWebData) =>
{
- RomFile _romFile = new RomFile(0, 0);
+ RomFile _romFile = new RomFile(0, 0, (RomPlatformType)romWebData.ptype);
_romFile.SetWebData(romWebData);
s_RomFileCahcesInRoomInfo[roomInfo.GameRomID] = _romFile;