added gamecontrollerdb.txt

This commit is contained in:
2021-08-30 22:24:16 +02:00
parent 22ca349171
commit cda4d3a566
4 changed files with 12 additions and 4 deletions

View File

@@ -3,8 +3,11 @@
#include <iostream>
// Constructor
Input::Input()
Input::Input(std::string file)
{
// Fichero gamecontrollerdb.txt
mDBpath = file;
// Inicializa las variables
for (int i = 0; i < 17; i++)
{
@@ -167,6 +170,7 @@ bool Input::discoverGameController()
mGameController = mConnectedControllers[0];
SDL_GameControllerEventState(SDL_ENABLE);
SDL_GameControllerAddMappingsFromFile(mDBpath.c_str());
}
return found;