Qt: Deprecate processEvents() part 2

This commit is contained in:
Elad 2024-11-26 11:01:31 +02:00
parent 191e132c6c
commit 378a69ea85
7 changed files with 202 additions and 72 deletions

View file

@ -54,6 +54,8 @@ namespace rsx::overlays
extern void reset_debug_overlay();
}
extern void qt_events_aware_op(int repeat_duration_ms, std::function<bool()> wrapped_op);
/** Emu.Init() wrapper for user management */
void main_application::InitializeEmulator(const std::string& user, bool show_gui)
{
@ -182,8 +184,8 @@ EmuCallbacks main_application::CreateCallbacks()
callbacks.init_pad_handler = [this](std::string_view title_id)
{
ensure(g_fxo->init<named_thread<pad_thread>>(get_thread(), m_game_window, title_id));
extern void process_qt_events();
while (!pad::g_started) process_qt_events();
qt_events_aware_op(0, [](){ return !!pad::g_started; });
};
callbacks.get_audio = []() -> std::shared_ptr<AudioBackend>