Merge pull request #5648 from leoetlino/qt-shutdown
Qt: Fix emulation stopped signal
This commit is contained in:
commit
3fe8e102fc
|
@ -52,6 +52,7 @@ MainWindow::MainWindow() : QMainWindow(nullptr)
|
|||
ConnectMenuBar();
|
||||
|
||||
InitControllers();
|
||||
InitCoreCallbacks();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -88,6 +89,11 @@ void MainWindow::ShutdownControllers()
|
|||
m_hotkey_scheduler->deleteLater();
|
||||
}
|
||||
|
||||
void MainWindow::InitCoreCallbacks()
|
||||
{
|
||||
Core::SetOnStoppedCallback([this] { emit EmulationStopped(); });
|
||||
}
|
||||
|
||||
static void InstallHotkeyFilter(QWidget* dialog)
|
||||
{
|
||||
auto* filter = new WindowActivationEventFilter();
|
||||
|
@ -291,7 +297,6 @@ void MainWindow::ForceStop()
|
|||
{
|
||||
BootManager::Stop();
|
||||
HideRenderWidget();
|
||||
emit EmulationStopped();
|
||||
}
|
||||
|
||||
void MainWindow::Reset()
|
||||
|
|
|
@ -69,6 +69,8 @@ private:
|
|||
void InitControllers();
|
||||
void ShutdownControllers();
|
||||
|
||||
void InitCoreCallbacks();
|
||||
|
||||
void StartGame(const QString& path);
|
||||
void ShowRenderWidget();
|
||||
void HideRenderWidget();
|
||||
|
|
Loading…
Reference in New Issue