Commit Graph

14 Commits

Author SHA1 Message Date
JosJuice 6cf55ab1ee InputCommon: Unify GetProfileName and GetProfileDirectoryName
After reading the previous commit, you might think "hold on, what's the
difference between GetProfileName and GetProfileDirectoryName"? These
two are being used for the exact same thing - figuring out where
profiles are stored - yet they return different values for certain
controllers like GC keyboards! As far as I can tell, the existing code
has been broken for GC keyboards since they were introduced a decade
ago. The GUI (and more recently, also InputCycler) would write and read
profiles in one location, and our code for loading profiles specified in
a game INI file would read profiles in another location.

This commit gets rid of the set of values used by the game INI code in
favor of the other set. This does breaking existing setups where a
GCKey profile has been configured in a game INI, but I think the number
of working such setups is vanishingly small. The alternative would make
existing GCKey profiles go missing from the profile dropdown in the GUI,
which I think would be more disruptive. The alternative would also force
new GCKey profiles into the same directory as GCPad profiles.

This commit also fixes a regression from d6c0f8e749. The Android GUI was
using GetProfileName to figure out what key to use in the game INI,
which made it use incorrect game INI entries for GameCube controller
profiles but not Wii Remote profiles. Now the Android GUI uses
GetProfileKey for this, fixing the problem.
2024-02-04 17:55:08 +01:00
JosJuice d811c12196 Android: Add more GameCube controller types
For all your PSO needs.
2023-10-01 18:47:49 +02:00
JosJuice d6c0f8e749 Android: Get profile name from core
To avoid duplicating information between Kotlin and C++.
2023-10-01 18:47:49 +02:00
Lioncash e4caace6bb Common/IniFile: Move interface into Common namespace
Gets this out of the global namespace and into the Common namespace
2023-04-13 10:19:28 -04:00
JosJuice 1b55d7c594 Android: Change how the overlay controller setting works
Up until now, there have been two settings on Android that stored the
selected Wii Remote extension: the normal one that's also used on PC,
and a SharedPreferences one that's used by the overlay controls to
determine what controls to show. It is possible for these two to end up
out of sync, and my input changes have made that more likely to happen.

To fix this, let's rework how the overlay controller setting works.
We don't want it to encode the currently selected Wii Remote extension.
However, we can't simply get rid of the setting, because for some Wii
games we need the ability to switch between a GameCube controller and a
Wii Remote. What this commit does is give the user the option to select
any of the 4 GameCube controllers and any of the 4 Wii Remotes. (Before,
controllers 2-4 weren't available in the overlay.) Could be useful for
things like the Psycho Mantis fight in Metal Gear Solid. I'm also
switching from SharedPreferences to Dolphin.ini while I'm at it.
2023-03-07 17:39:34 +01:00
JosJuice c2779aef06 Android: Add the advanced input mapping dialog
It's missing a lot of features from the PC version for now, like
buttons for inserting functions and the ability to see what the
expression evaluates to. I mostly just wanted to get something in
place so you can set up rumble.

Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-07 17:39:30 +01:00
JosJuice 1eeded23df Android: Add input profile management
Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-03 22:28:25 +01:00
JosJuice 8b78f73e80 Android: Add Default and Clear actions for controllers 2023-03-03 22:28:25 +01:00
JosJuice 2b1dd52750 Android: Add input device selection 2023-03-03 22:28:24 +01:00
JosJuice 2113bf5e3a Android: Implement enabling/disabling control groups
All this code for just a single checkbox... Ah well, it has to be done
2023-03-03 22:28:24 +01:00
JosJuice 0dd8bbbbbb Android: Add extension selection 2023-03-03 22:28:24 +01:00
JosJuice 1c26a85e35 Android: Add NumericSetting support 2023-03-03 22:28:24 +01:00
JosJuice 2c529b9db1 Android: Add new input mapping implementation 2023-03-03 22:28:24 +01:00
JosJuice 51ee05cb35 Android: Use input override system for touch controls
This is the first step of getting rid of the controller indirection
on Android. (Needing a way for touch controls to provide input
to the emulator core is the reason why the controller indirection
exists to begin with as far as I understand it.)
2022-10-03 22:04:09 +02:00