Qt: Fix emulation stopped signal
Same old bug as in WX. The core is not shut down until the on stopped callback is invoked.
This commit is contained in:
parent
c6417e0e78
commit
fb135c99e3
|
@ -52,6 +52,7 @@ MainWindow::MainWindow() : QMainWindow(nullptr)
|
||||||
ConnectMenuBar();
|
ConnectMenuBar();
|
||||||
|
|
||||||
InitControllers();
|
InitControllers();
|
||||||
|
InitCoreCallbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
@ -88,6 +89,11 @@ void MainWindow::ShutdownControllers()
|
||||||
m_hotkey_scheduler->deleteLater();
|
m_hotkey_scheduler->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::InitCoreCallbacks()
|
||||||
|
{
|
||||||
|
Core::SetOnStoppedCallback([this] { emit EmulationStopped(); });
|
||||||
|
}
|
||||||
|
|
||||||
static void InstallHotkeyFilter(QWidget* dialog)
|
static void InstallHotkeyFilter(QWidget* dialog)
|
||||||
{
|
{
|
||||||
auto* filter = new WindowActivationEventFilter();
|
auto* filter = new WindowActivationEventFilter();
|
||||||
|
@ -291,7 +297,6 @@ void MainWindow::ForceStop()
|
||||||
{
|
{
|
||||||
BootManager::Stop();
|
BootManager::Stop();
|
||||||
HideRenderWidget();
|
HideRenderWidget();
|
||||||
emit EmulationStopped();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::Reset()
|
void MainWindow::Reset()
|
||||||
|
|
|
@ -69,6 +69,8 @@ private:
|
||||||
void InitControllers();
|
void InitControllers();
|
||||||
void ShutdownControllers();
|
void ShutdownControllers();
|
||||||
|
|
||||||
|
void InitCoreCallbacks();
|
||||||
|
|
||||||
void StartGame(const QString& path);
|
void StartGame(const QString& path);
|
||||||
void ShowRenderWidget();
|
void ShowRenderWidget();
|
||||||
void HideRenderWidget();
|
void HideRenderWidget();
|
||||||
|
|
Loading…
Reference in New Issue