Merge pull request #5509 from ligfx/qtshutdowncontrollers

MainWindow: shutdown different input interfaces
This commit is contained in:
Leo Lam 2017-06-02 22:08:53 +02:00 committed by GitHub
commit 93020f6c1b
2 changed files with 11 additions and 0 deletions

View File

@ -52,6 +52,7 @@ MainWindow::MainWindow() : QMainWindow(nullptr)
MainWindow::~MainWindow()
{
m_render_widget->deleteLater();
ShutdownControllers();
}
void MainWindow::InitControllers()
@ -66,6 +67,15 @@ void MainWindow::InitControllers()
HotkeyManagerEmu::Initialize();
}
void MainWindow::ShutdownControllers()
{
g_controller_interface.Shutdown();
Pad::Shutdown();
Keyboard::Shutdown();
Wiimote::Shutdown();
HotkeyManagerEmu::Shutdown();
}
void MainWindow::CreateComponents()
{
m_menu_bar = new MenuBar(this);

View File

@ -66,6 +66,7 @@ private:
void ConnectPathsDialog();
void InitControllers();
void ShutdownControllers();
void StartGame(const QString& path);
void ShowRenderWidget();