diff options
| author | JosJuice <josjuice@gmail.com> | 2021-04-27 23:43:04 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-07-17 14:02:03 +0200 |
| commit | 2f3c0cdbc594cdcb76644e1e77aa185a1e50a244 (patch) | |
| tree | af6034eefbb48b2b93915bba25c13d14580dfcc9 /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | be551b15290519551ea6ec4b9627348b16bf075f (diff) | |
Split out controller initialization to UICommon
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index dab8f45c24..281bbc78a8 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -321,24 +321,12 @@ void MainWindow::InitControllers() if (g_controller_interface.IsInit()) return; - g_controller_interface.Initialize(GetWindowSystemInfo(windowHandle())); - if (!g_controller_interface.HasDefaultDevice()) - { - // Note that the CI default device could be still temporarily removed at any time - WARN_LOG_FMT(CONTROLLERINTERFACE, - "No default device has been added in time. EmulatedController(s) defaulting adds" - " input mappings made for a specific default device depending on the platform"); - } - GCAdapter::Init(); - Pad::Initialize(); - Pad::InitializeGBA(); - Keyboard::Initialize(); - Wiimote::Initialize(Wiimote::InitializeMode::DO_NOT_WAIT_FOR_WIIMOTES); - FreeLook::Initialize(); + UICommon::InitControllers(GetWindowSystemInfo(windowHandle())); + m_hotkey_scheduler = new HotkeyScheduler(); m_hotkey_scheduler->Start(); - // Defaults won't work reliabily without loading and saving the config first + // Defaults won't work reliably without loading and saving the config first Wiimote::LoadConfig(); Wiimote::GetConfig()->SaveConfig(); @@ -362,13 +350,7 @@ void MainWindow::ShutdownControllers() Settings::Instance().UnregisterDevicesChangedCallback(); - Pad::Shutdown(); - Pad::ShutdownGBA(); - Keyboard::Shutdown(); - Wiimote::Shutdown(); - HotkeyManagerEmu::Shutdown(); - FreeLook::Shutdown(); - g_controller_interface.Shutdown(); + UICommon::ShutdownControllers(); m_hotkey_scheduler->deleteLater(); } |
