Skip to content
Snippets Groups Projects
Commit a1c4f53c authored by t895's avatar t895
Browse files

android: Only do first startup automapping if nothing has been mapped

parent bdf8aca7
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment