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
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
Shawn Hoffman
f92541fbd9 StripSpaces: only strip spaces
StripWhitespace maintains old behavior
2022-07-25 18:40:12 -07:00
Pierre Bourdon
e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
iwubcode
32d584a0f5 InputCommon: reduce number of image loads and texture cache invalidations by only running dynamic input textures once for all controllers 2021-02-27 17:29:48 -06:00
Lioncash
e8edc49bbe InputCommon: Make use of fmt where applicable
Continues the migration over to fmt
2019-11-22 14:38:26 -05:00
JosJuice
a2a1e04fc9 StringUtil: Use std::string_view more 2019-07-23 14:49:12 +02:00
Techjar
ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
iwubcode
bce8041cce Input: Allow per-game configuration to specify directories for input-profiles. If specified, the directories are searched recursively for inis 2018-07-07 13:02:39 -05:00
iwubcode
3b11066e61 Fix lint bugs 2018-07-07 13:02:38 -05:00
iwubcode
83c94feb3d Input: Trim profile names to allow spaces between ','s 2018-07-07 12:55:52 -05:00
iwubcode
14482a72af Input: Allow cycling to occur for each individual controller 2018-07-07 12:55:49 -05:00
iwubcode
485285eadc Input: Add cycling between game specific profiles 2018-07-07 12:39:08 -05:00
iwubcode
3969bf6d1c Input: Add hotkey to cycle the wiimote profile forward or backward
Co-authored-by:  Barath Kannan <barathsotd@gmail.com>
2018-07-07 12:39:08 -05:00