hedgewars/uInputHandler.pas
branch0.9.24
changeset 13547 214dde864805
parent 13546 46ee00a7526a
child 13568 470982c05f7e
equal deleted inserted replaced
13546:46ee00a7526a 13547:214dde864805
   540 
   540 
   541 if ControllerNumControllers > 0 then
   541 if ControllerNumControllers > 0 then
   542     begin
   542     begin
   543     for j:= 0 to pred(ControllerNumControllers) do
   543     for j:= 0 to pred(ControllerNumControllers) do
   544         begin
   544         begin
   545         WriteLnToConsole('Using game controller: ' + shortstring(SDL_JoystickName(j)));
   545         WriteLnToConsole('Game controller no. ' + IntToStr(j) + ', name "' + shortstring(SDL_JoystickNameForIndex(j)) + '":');
   546         Controller[j]:= SDL_JoystickOpen(j);
   546         Controller[j]:= SDL_JoystickOpen(j);
   547         if Controller[j] = nil then
   547         if Controller[j] = nil then
   548             WriteLnToConsole('* Failed to open game controller!')
   548             WriteLnToConsole('* Failed to open game controller no. ' + IntToStr(j) + '!')
   549         else
   549         else
   550             begin
   550             begin
   551             ControllerNumAxes[j]:= SDL_JoystickNumAxes(Controller[j]);
   551             ControllerNumAxes[j]:= SDL_JoystickNumAxes(Controller[j]);
   552             //ControllerNumBalls[j]:= SDL_JoystickNumBalls(Controller[j]);
   552             //ControllerNumBalls[j]:= SDL_JoystickNumBalls(Controller[j]);
   553             ControllerNumHats[j]:= SDL_JoystickNumHats(Controller[j]);
   553             ControllerNumHats[j]:= SDL_JoystickNumHats(Controller[j]);