1. Marcus von Appen
  2. py-sdl2

Commits

Marcus von Appen  committed f900bd7

- fixed issue #55: sdl2.SDL_GameControllerAddMappingsFromFile() does not
raise a TypeError for Python 3.x anymore

  • Participants
  • Parent commits 322de75
  • Branches default

Comments (0)

Files changed (1)

File sdl2/gamecontroller.py

View file
 SDL_GameControllerGetButton = _bind("SDL_GameControllerGetButton", [POINTER(SDL_GameController), SDL_GameControllerButton], Uint8)
 SDL_GameControllerClose = _bind("SDL_GameControllerClose", [POINTER(SDL_GameController)])
 SDL_GameControllerAddMappingsFromRW = _bind("SDL_GameControllerAddMappingsFromRW", [POINTER(SDL_RWops), c_int], c_int, nullfunc)
-SDL_GameControllerAddMappingsFromFile = lambda fname: SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(fname, "rb"), 1)
+SDL_GameControllerAddMappingsFromFile = lambda fname: SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(fname, b"rb"), 1)