Browse Source
Merge pull request #13064 from t895/auto-map-fail
android: Only do first startup automapping if nothing has been mapped
pull/15/merge
liamwhite
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
2 deletions
-
src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt
|
|
|
@ -80,8 +80,14 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { |
|
|
|
super.onCreate(savedInstanceState) |
|
|
|
|
|
|
|
InputHandler.updateControllerData() |
|
|
|
val playerOne = NativeConfig.getInputSettings(true)[0] |
|
|
|
if (!playerOne.hasMapping() && InputHandler.androidControllers.isNotEmpty()) { |
|
|
|
val players = NativeConfig.getInputSettings(true) |
|
|
|
var hasConfiguredControllers = false |
|
|
|
players.forEach { |
|
|
|
if (it.hasMapping()) { |
|
|
|
hasConfiguredControllers = true |
|
|
|
} |
|
|
|
} |
|
|
|
if (!hasConfiguredControllers && InputHandler.androidControllers.isNotEmpty()) { |
|
|
|
var params: ParamPackage? = null |
|
|
|
for (controller in InputHandler.registeredControllers) { |
|
|
|
if (controller.get("port", -1) == 0) { |
|
|
|
|