summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/InputConfig.cpp
AgeCommit message (Collapse)Author
2024-02-04InputCommon: Use distinct values for profile keyJosJuice
Because the last commit made us use separate folders for GCPad and GCKey profiles, we should also use separate game INI keys for them. Otherwise setting e.g. PadProfile1 in a game INI will make both GCPad and GCKey try to load it, typically with one of them succeeding and the other one showing a panic alert due to the profile not existing in its folder. Better do this breaking change for GCKeys in the same PR as the other breaking change rather than later.
2024-02-04InputCommon: Unify GetProfileName and GetProfileDirectoryNameJosJuice
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-04InputCommon: Refactor away InputConfig::LoadConfig's switch caseJosJuice
By having getters for this information, other code that needs access to the same information can call the getters instead of duplicating the information.
2023-08-01InputConfig: Update IsControllerControlledByGamepadDevice for Android input ↵JosJuice
overhaul This only matters for analytics, but still.
2023-04-13Common/IniFile: Move interface into Common namespaceLioncash
Gets this out of the global namespace and into the Common namespace
2023-03-07Android: Remove the in-emulation IR sensitivity optionsJosJuice
This too can be set in the normal controller settings now.
2021-12-10Treewide: Adjust order of includesPokechu22
2021-12-05InputCommon: fix InputConfig::LoadConfig() not always replacing emu ↵Filoppi
controllers values If InputConfig::LoadConfig() was called once with a non empty/customized config, then called again after manually deleting the config (dolphin calls LoadConfig() every time it opens the mapping widget), the second load would fail to clear the values on any non first EmulatedController and would instead keep the previous config values despite it being deleted (while it would instead correctly default the first EmulatedController). This is not a big bug though the code is better now.
2021-07-13Pad: GBA configBonta
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
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-06-07InputCommon: fix 2nd+ controller not defaulting to the default deviceFiloppi
2021-05-12Add mixed comments to input code, make some tooltip clearerFiloppi
2021-05-10InputCommon: add a ton of missing constsFiloppi
fix some related grammar errors only the ButtonManager required code changes
2021-03-07FreeLookController: Fix signed/unsigned warningDentomologist
Loop index int i was being compared against GetControllerCount() which returned a size_t. This was the only place GetControllerCount() was called from so the change of return type doesn't disturb anything else. Changing the loop index to size_t wouldn't work as well since it's passed into GetController(), which takes an int and is called from many places, so it would need a cast anyway on an already busy line.
2021-02-27InputCommon: reduce number of image loads and texture cache invalidations by ↵iwubcode
only running dynamic input textures once for all controllers
2020-11-16Use positional arguments in all translatable fmt stringsJosJuice
We want to use positional arguments in translatable strings that have more than one argument so that translators can change the order of them, but the question is: Should we also use positional arguments in translatable strings with only one argument? I think it makes most sense that way, partially so that translators don't even have to be aware of the non-positional syntax and partially because "translatable strings use positional arguments" is an easier rule for us to remember than "transitional strings which have more than one argument use positional arguments". But let me know if you have a different opinion.
2020-11-12InputCommon: Migrate over to fmt-capable panic alertsLioncash
Continues the migration over to fmt.
2020-10-03InputCommon: Introducing the "Dynamic Input Texture". Configuration links ↵iwubcode
an emulated input action to an image based on what host key is defined for that emulated input. Specific regions are called out in configuration that mark where to replace an input button with a host key image.
2020-09-29Fix controller defaults being empty on fresh runJosJuice
A very early call to Config::Save is now creating empty controller INI files. https://bugs.dolphin-emu.org/issues/12283
2019-12-29InputConfig::LoadConfig(): Convert num[] to an array of std::string_view.David Korth
NOTE: The explicit std::string() conversions later are needed. Otherwise, gcc-9.2.0 throws all sorts of errors because it can't find a matching operator+() function.
2019-04-07InputCommon: Clean up how numeric settings are handled. Add units of measure ↵Jordan Woyak
to UI. Eliminate hidden magic values of the IR cursor.
2019-01-23Load custom game IR values if they are not setzackhow
This is mostly for android so that a user can use the touchscreen to accurately emulate pointer movements
2019-01-10ControllerInterface: Allow hotplug callbacks to be unregistered and don't ↵Jordan Woyak
reload the entire config from the ini file on hotplug, just update the control references. This should fix a crash on shutdown on Android.
2018-09-08Fix a string not getting translatedJosJuice
2018-07-07Input: Allow per-game configuration to specify directories for ↵iwubcode
input-profiles. If specified, the directories are searched recursively for inis
2018-07-07Fix lint bugsiwubcode
2018-07-07InputConfig: Show display message when game specific input profile is ↵iwubcode
loaded; matching how cycling works
2018-07-07Input: Allow cycling to occur for each individual controlleriwubcode
2018-07-07Input: Add hotkey to cycle the wiimote profile forward or backwardiwubcode
Co-authored-by: Barath Kannan <barathsotd@gmail.com>
2017-11-04EmulatedController: encapsulate default device behind getters/settersMichael M
2017-08-22keyboard fixes v2Nick
2017-08-21Depreciate old OSX Keyboard and MouseNick
2017-02-09ControllerEmu: Separate ControlGroup from ControllerEmuLioncash
ControllerEmu, the class, is essentially acting like a namespace for ControlGroup. This makes it impossible to forward declare any of the internals. It also globs a bunch of classes together which is kind of a pain to manage. This splits ControlGroup and the classes it contains into their own source files and situates them all within a namespace, which gets them out of global scope. Since this allows forward declarations for the once-internal classes, it now requires significantly less files to be rebuilt if anything is changed in the ControllerEmu portion of code. It does not split out the settings classes yet, however, as it would be preferable to make a settings base class that all settings derive from, but this would be a functional change -- this commit only intends to move around existing code. Extracting the settings class will be done in another commit.
2017-02-07ControllerEmu: Move into its own directoryLioncash
ControllerEmu is a massive class with a lot of nested public classes. The only reason these are nested is because the outer class acts as a namespace. There's no reason to keep these classes nested just for that. Keeping these classes nested makes it impossible to forward declare them, which leads to quite a few includes in other headers, making compilation take longer. This moves the source files to their own directory so classes can be separated as necessary to their own source files, and be namespaced under the ControllerEmu namespace.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
2016-10-07Fix missing includesLéo Lam
Aren't indirect includes great?
2016-08-08Add Quartz/CoreGraphics controller interface for default k&m eventsMichael Maltese
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-06-22analytics: Collect less data about controllers.Scott Mansell
The name field can contain personal information, particularly in the case of bluetooth devices on OSX which get configured with the user's full name.
2015-11-19InputConfig: Clean up controller managementLioncash
2015-06-12Options: merge SCoreStartupParameter into SConfigdegasus
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-03-08Fixed the crash that would occur when the Refresh button was pressed in the ↵skidau
controllers config. - Simplified the locking mechanism when controllers were updated - Reloaded the config of the controls instead of re-initialising the control plugins - Fixed controls being unresponsive after the Refresh button was pressed - Disables the hotkeys while the controller config is open
2015-02-11Use CoreParameter's game INI functions in more placesJosJuice
2014-08-31InputCommon: Rename class InputPlugin to InputConfigLioncash
2014-06-16Use only section-based ini reading.Lioncash
2014-02-18Fix Linux buildPierre Bourdon
2014-02-18Convert all includes to relative paths.Lioncash
2014-02-13Fix IniFile to use string& instead of char*Matthew Parlane
Also removes .c_str() usages where found.