From 37806472e16b931cbcc9fe3fac630333cd403863 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Tue, 8 Mar 2022 13:16:54 -0800 Subject: GCAdapter: Defer initialization until MainWindow::InitControllers If libusb fails to initialize, an assertion fails, but if that happens before the main window is created, then Dolphin just dies. Now, the panic alert is properly shown and the user can ignore it. --- Source/Core/DolphinNoGUI/MainNoGUI.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp') diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index 185bc447d9..cec4788f1c 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -30,6 +30,8 @@ #endif #include "UICommon/UICommon.h" +#include "InputCommon/GCAdapter.h" + #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoBackendBase.h" @@ -226,6 +228,7 @@ int main(int argc, char* argv[]) UICommon::SetUserDirectory(user_directory); UICommon::Init(); + GCAdapter::Init(); s_platform = GetPlatform(options); if (!s_platform || !s_platform->Init()) -- cgit v1.2.3