diff options
| author | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-05-31 21:11:54 -0700 |
|---|---|---|
| committer | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-05-31 21:14:55 -0700 |
| commit | 040bddafa6e97ab18b9f96436b05d5df885bbae6 (patch) | |
| tree | cb9ac7a92e5ef5b14847ebae90deaf85c96bbaec /Source/Core/DolphinQt2/MainWindow.cpp | |
| parent | 6dc3b2e8bcdb3073cf6d45af50186def432c75e8 (diff) | |
MainWindow: shutdown different input interfaces
`MainWindow` initializes a number of input interfaces but never shuts
them down. This was causing a crash-after-exit on macOS where the
ControllerInterface backend stores a `std::thread` object in a static
variable and only stops it when ControllerInterface::Shutdown is called.
Diffstat (limited to 'Source/Core/DolphinQt2/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index d60c0ac415..c003f5be04 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -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); |
