From dabad822193f23bd01c13c4d0798f0a507e910eb Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 25 Jun 2022 17:31:31 +0200 Subject: Require frontend to initialize controllers We currently have two different code paths for initializing controllers: Either the frontend (DolphinQt) can do it, or if the frontend doesn't do it, the core will do it automatically when booting. Having these two paths has caused problems in the past due to only one frontend being tested (see de7ef47548). I would like to get rid of the latter path to avoid further problems like this. --- Source/Android/jni/MainAndroid.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Source/Android/jni/MainAndroid.cpp') diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 77c373a481..d41ebe4cc9 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include -#include #include #include #include @@ -56,13 +55,13 @@ #include "InputCommon/ControllerInterface/Touch/ButtonManager.h" #include "InputCommon/GCAdapter.h" +#include "UICommon/GameFile.h" #include "UICommon/UICommon.h" #include "VideoCommon/OnScreenDisplay.h" #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoBackendBase.h" -#include "../../Core/Common/WindowSystemInfo.h" #include "jni/AndroidCommon/AndroidCommon.h" #include "jni/AndroidCommon/IDCache.h" @@ -521,7 +520,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(J Common::AndroidSetReportHandler(&ReportSend); DolphinAnalytics::AndroidSetGetValFunc(&GetAnalyticValue); UICommon::Init(); - GCAdapter::Init(); + UICommon::InitControllers(WindowSystemInfo(WindowSystemType::Android, nullptr, nullptr, nullptr)); } JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartToAnalytics(JNIEnv*, -- cgit v1.2.3