Changed es_input.cfg to es_input.xml

This commit is contained in:
Leon Styhre 2021-06-16 19:20:53 +02:00
parent dc29b97e91
commit 57280c5da9
2 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@
// //
// Low-level input handling. // Low-level input handling.
// Initiates and maps the keyboard and controllers. // Initiates and maps the keyboard and controllers.
// Reads and writes the es_input.cfg configuration file. // Reads and writes the es_input.xml configuration file.
// //
#include "InputManager.h" #include "InputManager.h"
@ -261,14 +261,14 @@ void InputManager::doOnFinish()
std::string InputManager::getConfigPath() std::string InputManager::getConfigPath()
{ {
std::string path = Utils::FileSystem::getHomePath(); std::string path = Utils::FileSystem::getHomePath();
path += "/.emulationstation/es_input.cfg"; path += "/.emulationstation/es_input.xml";
return path; return path;
} }
std::string InputManager::getTemporaryConfigPath() std::string InputManager::getTemporaryConfigPath()
{ {
std::string path = Utils::FileSystem::getHomePath(); std::string path = Utils::FileSystem::getHomePath();
path += "/.emulationstation/es_temporaryinput.cfg"; path += "/.emulationstation/es_temporaryinput.xml";
return path; return path;
} }
@ -502,7 +502,7 @@ bool InputManager::loadInputConfig(InputConfig* config)
pugi::xml_node configNode = root.find_child_by_attribute("inputConfig", pugi::xml_node configNode = root.find_child_by_attribute("inputConfig",
"deviceGUID", config->getDeviceGUIDString().c_str()); "deviceGUID", config->getDeviceGUIDString().c_str());
// Enabling this will match an entry in es_input.cfg based on the device name if there // Enabling this will match an entry in es_input.xml based on the device name if there
// was no GUID match. This is probably not a good idea as many controllers share the same // was no GUID match. This is probably not a good idea as many controllers share the same
// name even though the GUID differ and potentially the button configuration could be // name even though the GUID differ and potentially the button configuration could be
// different between them. Keeping the code for now though. // different between them. Keeping the code for now though.
@ -511,10 +511,10 @@ bool InputManager::loadInputConfig(InputConfig* config)
// "deviceName", config->getDeviceName().c_str()); // "deviceName", config->getDeviceName().c_str());
// With the move to the SDL GameController API the button layout changed quite a lot, so // With the move to the SDL GameController API the button layout changed quite a lot, so
// es_input.cfg files generated using the old API will end up with a completely unusable // es_input.xml files generated using the old API will end up with a completely unusable
// controller configuration. These older files had the configuration entry type set to // controller configuration. These older files had the configuration entry type set to
// "joystick", so it's easy to ignore such entries by only accepting entries with the // "joystick", so it's easy to ignore such entries by only accepting entries with the
// type set to "controller" (which is now applied when saving the es_input.cfg file). // type set to "controller" (which is now applied when saving the es_input.xml file).
if (configNode && config->getDeviceName() != "Keyboard") if (configNode && config->getDeviceName() != "Keyboard")
if (!root.find_child_by_attribute("inputConfig", "type", "controller")) if (!root.find_child_by_attribute("inputConfig", "type", "controller"))
return false; return false;

View file

@ -5,7 +5,7 @@
// //
// Low-level input handling. // Low-level input handling.
// Initiates and maps the keyboard and controllers. // Initiates and maps the keyboard and controllers.
// Reads and writes the es_input.cfg configuration file. // Reads and writes the es_input.xml configuration file.
// //
#ifndef ES_CORE_INPUT_MANAGER_H #ifndef ES_CORE_INPUT_MANAGER_H