From 7242387a425b959c659cc32b0d560a32697902a3 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 2 Jun 2018 00:46:13 +0300 Subject: [PATCH] Block GUI after stopping emulation This is necessary to prevent restarting the emulation until it's finished Remove "process_events" callback completely --- rpcs3/Emu/System.cpp | 4 ---- rpcs3/Emu/System.h | 1 - rpcs3/rpcs3_app.cpp | 6 ------ 3 files changed, 11 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index d6a8a7ecd0..d609fc3b50 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -471,8 +471,6 @@ bool Emulator::InstallPkg(const std::string& path) int_progress = static_cast(pval); LOG_SUCCESS(GENERAL, "... %u%%", int_progress); } - - m_cb.process_events(); } } @@ -1276,8 +1274,6 @@ void Emulator::Stop(bool restart) while (g_thread_count) { - m_cb.process_events(); - std::this_thread::sleep_for(10ms); } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 90cefa3bff..dfaf5e05a1 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -161,7 +161,6 @@ enum CellSysutilLang : s32; struct EmuCallbacks { std::function)> call_after; - std::function process_events; std::function on_run; std::function on_pause; std::function on_resume; diff --git a/rpcs3/rpcs3_app.cpp b/rpcs3/rpcs3_app.cpp index 30a1102557..6d83d3a3b1 100644 --- a/rpcs3/rpcs3_app.cpp +++ b/rpcs3/rpcs3_app.cpp @@ -130,12 +130,6 @@ void rpcs3_app::InitializeCallbacks() RequestCallAfter(std::move(func)); }; - callbacks.process_events = [this]() - { - RPCS3MainWin->update(); - processEvents(); - }; - callbacks.get_kb_handler = [=]() -> std::shared_ptr { switch (keyboard_handler type = g_cfg.io.keyboard)