diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/MAMEEmu.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/MAMEEmu.cs index 6e252a02..9e1daef0 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/MAMEEmu.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/MAMEEmu.cs @@ -68,22 +68,29 @@ namespace MAME.Core while(bNeedPreheat) UpdateFrame(); Mame.paused = true; - Thread.Sleep(20); + if(mameMainMotion.bIsNewThreadMode) + Thread.Sleep(20); Mame.soft_reset();//软重启一次,确保没有脏数据 State.loadstate_callback(sr); Mame.postload(); Video.popup_text_end = Wintime.osd_ticks() + Wintime.ticks_per_second * 2; mameMainMotion.ResetFreameIndex(); - Thread.Sleep(20); + if (mameMainMotion.bIsNewThreadMode) + Thread.Sleep(20); Mame.paused = false; } public void SaveState(System.IO.BinaryWriter sw) { Mame.paused = true; - Thread.Sleep(20); + + if (mameMainMotion.bIsNewThreadMode) + Thread.Sleep(20); State.savestate_callback(sw); - Thread.Sleep(20); + + if (mameMainMotion.bIsNewThreadMode) + Thread.Sleep(20); + Mame.paused = false; } diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/Motion/MameMainMotion.cs b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/Motion/MameMainMotion.cs index 0b02e767..6d684f4a 100644 --- a/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/Motion/MameMainMotion.cs +++ b/AxibugEmuOnline.Client/Assets/Plugins/Mame.Core/Motion/MameMainMotion.cs @@ -289,16 +289,19 @@ namespace MAME.Core if (Machine.bRom) { Mame.exit_pending = true; - Thread.Sleep(50); + if (bIsNewThreadMode) + Thread.Sleep(50); } } public void ResetFreameIndex() { Mame.paused = true; - Thread.Sleep(20); + if (bIsNewThreadMode) + Thread.Sleep(20); Video.screenstate.frame_number = 0; - Thread.Sleep(20); + if (bIsNewThreadMode) + Thread.Sleep(20); Mame.paused = false; } @@ -596,7 +599,7 @@ namespace MAME.Core int TempWidth = 0; int TempHeight = 0; - private bool bIsNewThreadMode; + public bool bIsNewThreadMode; private void ResizeMain() {