added gamecontrollersDB.txt
This commit is contained in:
@@ -137,6 +137,9 @@ bool Input::discoverGameController()
|
||||
if (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 1)
|
||||
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
|
||||
|
||||
if (SDL_GameControllerAddMappingsFromFile(mDBpath.c_str())<0)
|
||||
printf("Error, could not load %s file: %s\n", mDBpath.c_str(), SDL_GetError());
|
||||
|
||||
int nJoysticks = SDL_NumJoysticks();
|
||||
mNumGamepads = 0;
|
||||
|
||||
@@ -170,7 +173,6 @@ bool Input::discoverGameController()
|
||||
|
||||
mGameController = mConnectedControllers[0];
|
||||
SDL_GameControllerEventState(SDL_ENABLE);
|
||||
SDL_GameControllerAddMappingsFromFile(mDBpath.c_str());
|
||||
}
|
||||
|
||||
return found;
|
||||
@@ -191,5 +193,5 @@ std::string Input::getControllerName(int index)
|
||||
if (mNumGamepads > 0)
|
||||
return mControllerNames[index];
|
||||
else
|
||||
return "";
|
||||
return "";
|
||||
}
|
||||
Reference in New Issue
Block a user