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/Android/jni/MainAndroid.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Android/jni/MainAndroid.cpp') diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index f150c2c9e9..77c373a481 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -521,6 +521,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(J Common::AndroidSetReportHandler(&ReportSend); DolphinAnalytics::AndroidSetGetValFunc(&GetAnalyticValue); UICommon::Init(); + GCAdapter::Init(); } JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartToAnalytics(JNIEnv*, -- cgit v1.2.3