fix loading of keyboard mapping for controllers > 1
This commit is contained in:
parent
93e1dca8bc
commit
71724460f5
|
@ -31,6 +31,7 @@
|
||||||
//#include <unistd.h>
|
//#include <unistd.h>
|
||||||
//#include <fcntl.h>
|
//#include <fcntl.h>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
//#define MAX_JOYSTICKS 32
|
//#define MAX_JOYSTICKS 32
|
||||||
|
|
||||||
|
@ -414,7 +415,7 @@ int GamePad_t::init(int port, const char *guid, const char *profile)
|
||||||
|
|
||||||
// If we get to this point and still have not found a
|
// If we get to this point and still have not found a
|
||||||
// game controller, then load default keyboard.
|
// game controller, then load default keyboard.
|
||||||
if ((portNum == 0) && (devIdx < 0))
|
if ((portNum == 0 || strnlen(profile, 1) > 0) && (devIdx < 0))
|
||||||
{
|
{
|
||||||
if (loadProfile(profile))
|
if (loadProfile(profile))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue