mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Core/Movie: Add ability to run code in Host context
EndPlayInput runs on the CPU thread so it can't directly call UpdateWantDeterminism. PlayController also tries to ChangeDisc from the CPU Thread which is also invalid. It now just pauses execution and posts a request to the Host to fix it instead. The Core itself also did dodgy things like PauseAndLock-ing from the CPU Thread and SetState from EmuThread which have been removed.
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <QApplication>
|
||||
|
||||
#include "Core/BootManager.h"
|
||||
@ -20,6 +21,12 @@ int main(int argc, char* argv[])
|
||||
UICommon::Init();
|
||||
Resources::Init();
|
||||
|
||||
// Whenever the event loop is about to go to sleep, dispatch the jobs
|
||||
// queued in the Core first.
|
||||
QObject::connect(QAbstractEventDispatcher::instance(),
|
||||
&QAbstractEventDispatcher::aboutToBlock,
|
||||
&app, &Core::HostDispatchJobs);
|
||||
|
||||
MainWindow win;
|
||||
win.show();
|
||||
int retval = app.exec();
|
||||
|
Reference in New Issue
Block a user