Renamed LinuxInputJoysticks to InputDeviceOrder
This commit is contained in:
committed by
teejusb
parent
5753ecdc1c
commit
ec33a08ca5
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
RageInput* INPUTMAN = nullptr; // global and accessible from anywhere in our program
|
RageInput* INPUTMAN = nullptr; // global and accessible from anywhere in our program
|
||||||
|
|
||||||
Preference<RString> g_sInputDrivers( "InputDrivers", "" ); // "" == DEFAULT_INPUT_DRIVER_LIST
|
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
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern Preference<RString> g_sInputDrivers;
|
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
|
extern RageInput* INPUTMAN; // global and accessible from anywhere in our program
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "InputHandler_Linux_Event.h"
|
#include "InputHandler_Linux_Event.h"
|
||||||
#include "InputHandler_Linux_Joystick.h"
|
#include "InputHandler_Linux_Joystick.h"
|
||||||
|
|
||||||
#include "RageInput.h" // g_sInputDrivers g_sInputLinuxJoysticks
|
#include "RageInput.h" // g_sInputDrivers g_sInputDeviceOrder
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
|
|
||||||
#include <string> // std::string::npos
|
#include <string> // std::string::npos
|
||||||
@@ -106,8 +106,8 @@ void LinuxInputManager::InitDriver(InputHandler_Linux_Joystick* driver)
|
|||||||
{
|
{
|
||||||
m_JoystickDriver = driver;
|
m_JoystickDriver = driver;
|
||||||
// Discard all the joystick devices if they were assigned manually via
|
// Discard all the joystick devices if they were assigned manually via
|
||||||
// LinuxInputJoysticks
|
// InputDeviceOrder
|
||||||
if( g_sInputLinuxJoysticks.Get() != "" ) {
|
if( g_sInputDeviceOrder.Get() != "" ) {
|
||||||
m_vsPendingJoystickDevices.clear();
|
m_vsPendingJoystickDevices.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,9 +119,9 @@ void LinuxInputManager::InitDriver(InputHandler_Linux_Joystick* driver)
|
|||||||
driver->TryDevice(devFile);
|
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;
|
std::vector<RString> fixedDevices;
|
||||||
split( g_sInputLinuxJoysticks, ",", fixedDevices, true );
|
split( g_sInputDeviceOrder, ",", fixedDevices, true );
|
||||||
|
|
||||||
for (RString dev : fixedDevices) {
|
for (RString dev : fixedDevices) {
|
||||||
RString devFile = dev;
|
RString devFile = dev;
|
||||||
|
|||||||
Reference in New Issue
Block a user