diff --git a/AxibugEmuOnline.Client/Assets/Script/App.cs b/AxibugEmuOnline.Client/Assets/Script/App.cs
index 8232c2fe..aaeb8c66 100644
--- a/AxibugEmuOnline.Client/Assets/Script/App.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/App.cs
@@ -101,7 +101,7 @@ namespace AxibugEmuOnline.Client.ClientCore
yield break;
int platform = 0;
- bool bTest = false;
+ bool bTest = true;
if (bTest)
{
yield return null;
diff --git a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs
index a0960d86..29f527f1 100644
--- a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs
@@ -100,7 +100,7 @@ namespace AxibugEmuOnline.Client
public void SampleInput()
{
- if (InGameUI.Instance.IsOnline)
+ if (InGameUI.Instance.IsNetPlay)
{
if (App.roomMgr.netReplay.NextFrame(out var replayData, out int _))
{
diff --git a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI.cs b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI.cs
index 22f3f50c..13e514ad 100644
--- a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI.cs
@@ -11,8 +11,18 @@ namespace AxibugEmuOnline.Client
public RomFile RomFile => m_rom;
public override bool Enable => gameObject.activeInHierarchy;
- /// 指示该游戏实例是否处于联网模式
- public bool IsOnline => App.user.IsLoggedIn ? App.roomMgr.RoomState > AxibugProtobuf.RoomGameState.OnlyHost : false;
+ /// 指示该游戏实例是否处于联机模式
+ public bool IsNetPlay
+ {
+ get
+ {
+ if (!App.user.IsLoggedIn) return false;
+ if (App.roomMgr.mineRoomMiniInfo == null) return false;
+ if (App.roomMgr.RoomState <= AxibugProtobuf.RoomGameState.OnlyHost) return false;
+
+ return true;
+ }
+ }
private RomFile m_rom;
public IEmuCore Core { get; private set; }
@@ -92,7 +102,7 @@ namespace AxibugEmuOnline.Client
{
OptionUI.Instance.Pop(menus);
- if (!IsOnline)//单人模式暂停模拟器
+ if (!IsNetPlay)//单人模式暂停模拟器
{
Core.Pause();
}
@@ -101,7 +111,7 @@ namespace AxibugEmuOnline.Client
//菜单关闭时候
private void PopMenu_OnHide()
{
- if (!IsOnline)//单人模式恢复模拟器的暂停
+ if (!IsNetPlay)//单人模式恢复模拟器的暂停
Core.Resume();
}
diff --git a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_LoadState.cs b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_LoadState.cs
index 8ef1eea8..2132ad6e 100644
--- a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_LoadState.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_LoadState.cs
@@ -6,7 +6,7 @@ namespace AxibugEmuOnline.Client
public class InGameUI_LoadState : ExecuteMenu
{
private InGameUI m_gameUI;
- public override bool Visible => !m_gameUI.IsOnline;
+ public override bool Visible => !m_gameUI.IsNetPlay;
public InGameUI_LoadState(InGameUI gameUI) : base("读取快照", null)
{
@@ -15,7 +15,7 @@ namespace AxibugEmuOnline.Client
public override void OnExcute()
{
- if (m_gameUI.IsOnline) return;
+ if (m_gameUI.IsNetPlay) return;
object state = m_gameUI.GetQuickState();
Stopwatch sw = Stopwatch.StartNew();
diff --git a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_SaveState.cs b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_SaveState.cs
index e5ffb517..d3d347bb 100644
--- a/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_SaveState.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_SaveState.cs
@@ -10,7 +10,7 @@ namespace AxibugEmuOnline.Client
{
private InGameUI m_gameUI;
- public override bool Visible => !m_gameUI.IsOnline;
+ public override bool Visible => !m_gameUI.IsNetPlay;
public InGameUI_SaveState(InGameUI gameUI) : base("保存快照", null)
{
@@ -19,7 +19,7 @@ namespace AxibugEmuOnline.Client
public override void OnExcute()
{
- if (m_gameUI.IsOnline) return;
+ if (m_gameUI.IsNetPlay) return;
Stopwatch sw = Stopwatch.StartNew();
object state = m_gameUI.Core.GetState();