working on game controller

This commit is contained in:
2021-08-25 12:02:18 +02:00
parent c3d560a9b6
commit 36eaf1de4f
3 changed files with 76 additions and 27 deletions

View File

@@ -133,20 +133,6 @@ bool Director::initSDL()
}
else
{
if (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 1)
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
int nJoysticks = SDL_NumJoysticks();
int numGamepads = 0;
// Count how many controllers there are
for (int i = 0; i < nJoysticks; i++)
if (SDL_IsGameController(i))
numGamepads++;
printf("%i nJoysticks, %i numGamepads\n", nJoysticks, numGamepads);
//SDL_JoystickEventState(SDL_ENABLE);
// Establece el filtro de la textura a nearest
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"))
{