Renamed LinuxInputJoysticks to InputDeviceOrder

This commit is contained in:
Sergio Pérez Fernández
2024-02-21 12:29:26 -08:00
committed by teejusb
parent 5753ecdc1c
commit ec33a08ca5
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
RageInput* INPUTMAN = nullptr; // global and accessible from anywhere in our program
Preference<RString> g_sInputDrivers( "InputDrivers", "" ); // "" == DEFAULT_INPUT_DRIVER_LIST
Preference<RString> g_sInputLinuxJoysticks( "InputLinuxJoysticks", "" ); // "" == DEFAULT_LINUX_INPUT_JOYSTICK_LIST
Preference<RString> g_sInputDeviceOrder( "InputDeviceOrder", "" ); // "" == DEFAULT_LINUX_INPUT_DEVICE_ORDER_LIST
namespace
{
+1 -1
View File
@@ -36,7 +36,7 @@ public:
};
extern Preference<RString> g_sInputDrivers;
extern Preference<RString> g_sInputLinuxJoysticks;
extern Preference<RString> g_sInputDeviceOrder;
extern RageInput* INPUTMAN; // global and accessible from anywhere in our program
+5 -5
View File
@@ -3,7 +3,7 @@
#include "InputHandler_Linux_Event.h"
#include "InputHandler_Linux_Joystick.h"
#include "RageInput.h" // g_sInputDrivers g_sInputLinuxJoysticks
#include "RageInput.h" // g_sInputDrivers g_sInputDeviceOrder
#include "RageLog.h"
#include <string> // std::string::npos
@@ -106,8 +106,8 @@ void LinuxInputManager::InitDriver(InputHandler_Linux_Joystick* driver)
{
m_JoystickDriver = driver;
// Discard all the joystick devices if they were assigned manually via
// LinuxInputJoysticks
if( g_sInputLinuxJoysticks.Get() != "" ) {
// InputDeviceOrder
if( g_sInputDeviceOrder.Get() != "" ) {
m_vsPendingJoystickDevices.clear();
}
@@ -119,9 +119,9 @@ void LinuxInputManager::InitDriver(InputHandler_Linux_Joystick* driver)
driver->TryDevice(devFile);
}
// If any, add the manually specified devices via LinuxInputJoysticks
// If any, add the manually specified devices via InputDeviceOrder
std::vector<RString> fixedDevices;
split( g_sInputLinuxJoysticks, ",", fixedDevices, true );
split( g_sInputDeviceOrder, ",", fixedDevices, true );
for (RString dev : fixedDevices) {
RString devFile = dev;