• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Android v
« Previous 1 ... 4 5 6 7 8 ... 127 Next »

Switch controller profiles via bash script
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Switch controller profiles via bash script
05-03-2022, 09:37 AM
#1
NickHatBoecker Offline
Junior Member
**
Posts: 2
Threads: 1
Joined: May 2022
Hey guys,

I know that you can't have multiple controller profiles on Android atm.
But I asked myself if it would be possible to switch between configurations via a bash script.

I tried the following script for Zelda Wind Waker:

Code:
#!/bin/bash

echo "Switching to GZLP01_BT_CONTROLLER profile..."
cd /storage/emulated/0/Android/data/org.dolphinemu.dolphinemu/files/GameSettings
rm GZLP01.ini
cp GZLP01_BT_CONTROLLER.ini GZLP01.ini
echo "DONE"

The ini file contains all the input settings. For example:

Code:
[Android]
InputA_0 = Device 'DEVICE_ID'-Button 97

I call the script in Termux via 

Code:
bash ./my_script.sh


Unfortunately this isn't working. Even if I completely delete GZLP01.ini, the old controller configuration is loaded.
Maybe this is the wrong directory? Or we have to trigger dolphin to reload the settings?

I have an AYN Odin console and there are a lot of people, who will need different profiles when using the AYN Super Dock in the future.
So we desperately need this feature or a work around, like this bash script.

Any input/help/ideas on this?
Thanks in advance!

Best regards
Nick
Find
Reply
05-04-2022, 02:04 AM
#2
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,944
Threads: 7
Joined: Oct 2014
(05-03-2022, 09:37 AM)NickHatBoecker Wrote: Unfortunately this isn't working. Even if I completely delete GZLP01.ini, the old controller configuration is loaded.

In what way are you checking this? When you set the controls in the Android version of Dolphin, they actually get stored in two different locations, one which is loaded for display in the UI and one which is used when actually emulating. (Yes, this is messed up. I'm trying to replace the whole system, but it's taking a while.) IIRC the copy in GameSettings (or Dolphin.ini for the global settings) is the one that gets used when emulating.

(05-03-2022, 09:37 AM)NickHatBoecker Wrote: Maybe this is the wrong directory?

If Config > User Data shows the path /storage/emulated/0/Android/data/org.dolphinemu.dolphinemu/files/, then it's correct.

(05-03-2022, 09:37 AM)NickHatBoecker Wrote: Or we have to trigger dolphin to reload the settings?

Unless you're trying to edit the settings while the game is running, you shouldn't need to do anything like that.
Find
Reply
05-04-2022, 03:12 AM
#3
NickHatBoecker Offline
Junior Member
**
Posts: 2
Threads: 1
Joined: May 2022
Thanks for your reply.
I didn't know that Dolphin uses two different files for emulator use and GUI. But that explains it, I guess.
I only changed one of them and I guess that wasn't the one for the GUI, because I only checked the values there, without confirming while playing.

I finally found a workaround now using Dolphin MMJR for the moment.
I guess the weird two-config-files-issue was already solved there.
I wrote a little Android helper app which takes an ini file with only Controls, and these are merged with the file Dolphin.ini. So only the controls will be overwritten. If have to manually clear the cache in the Dolphin app afterwards, but I can live with this.

It was however a pain to implement this app, because I'm a web developer. Never had anything to do with java...but at least it's working. Big Grin
Can't wait for your fix in the official release. As soon as this is fixed, I will come back to it, because MMJR is officially abandoned now.
So thank you for your efforts on this!
Find
Reply
05-04-2022, 04:11 AM
#4
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,944
Threads: 7
Joined: Oct 2014
(05-04-2022, 03:12 AM)NickHatBoecker Wrote: I guess the weird two-config-files-issue was already solved there.

It isn't. To the best of my knowledge, MMJR behaves the same as official Dolphin regarding this.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode