equal
deleted
inserted
replaced
352 SetDefaultBinds(); |
352 SetDefaultBinds(); |
353 end; |
353 end; |
354 |
354 |
355 procedure SetBinds(var binds: TBinds); |
355 procedure SetBinds(var binds: TBinds); |
356 begin |
356 begin |
|
357 {$IFDEF IPHONEOS} |
|
358 CurrentBinds:= DefaultBinds; |
|
359 {$ELSE} |
357 CurrentBinds:= binds; |
360 CurrentBinds:= binds; |
|
361 {$ENDIF} |
358 end; |
362 end; |
359 |
363 |
360 procedure SetDefaultBinds; |
364 procedure SetDefaultBinds; |
361 begin |
365 begin |
362 CurrentBinds:= DefaultBinds; |
366 CurrentBinds:= DefaultBinds; |
406 var Controller: array [0..5] of PSDL_Joystick; |
410 var Controller: array [0..5] of PSDL_Joystick; |
407 |
411 |
408 procedure ControllerInit; |
412 procedure ControllerInit; |
409 var i, j: Integer; |
413 var i, j: Integer; |
410 begin |
414 begin |
411 {$IFNDEF IPHONEOS} |
415 ControllerEnabled:= 0; |
|
416 {$IFDEF IPHONEOS} |
|
417 exit; // joystick subsystem disabled on iPhone |
|
418 {$ENDIF} |
|
419 |
412 SDL_InitSubSystem(SDL_INIT_JOYSTICK); |
420 SDL_InitSubSystem(SDL_INIT_JOYSTICK); |
413 {$ENDIF} |
|
414 |
|
415 ControllerEnabled:= 0; |
|
416 ControllerNumControllers:= SDL_NumJoysticks(); |
421 ControllerNumControllers:= SDL_NumJoysticks(); |
417 |
|
418 if ControllerNumControllers > 6 then ControllerNumControllers:= 6; |
422 if ControllerNumControllers > 6 then ControllerNumControllers:= 6; |
419 |
423 |
420 WriteLnToConsole('Number of game controllers: ' + inttostr(ControllerNumControllers)); |
424 WriteLnToConsole('Number of game controllers: ' + inttostr(ControllerNumControllers)); |
421 |
425 |
422 if ControllerNumControllers > 0 then |
426 if ControllerNumControllers > 0 then |