hedgewars/uKeys.pas
changeset 3663 8c28abf427f5
parent 3651 7058ca178f3b
child 3697 d5b30d6373fc
--- a/hedgewars/uKeys.pas	Thu Jul 22 03:08:17 2010 +0200
+++ b/hedgewars/uKeys.pas	Thu Jul 22 12:47:32 2010 +0200
@@ -354,7 +354,11 @@
 
 procedure SetBinds(var binds: TBinds);
 begin
+{$IFDEF IPHONEOS}
+    CurrentBinds:= DefaultBinds;
+{$ELSE}
     CurrentBinds:= binds;
+{$ENDIF}
 end;
 
 procedure SetDefaultBinds;
@@ -408,13 +412,13 @@
 procedure ControllerInit;
 var i, j: Integer;
 begin
-{$IFNDEF IPHONEOS}
-SDL_InitSubSystem(SDL_INIT_JOYSTICK);
+ControllerEnabled:= 0;
+{$IFDEF IPHONEOS}
+exit; // joystick subsystem disabled on iPhone
 {$ENDIF}
 
-ControllerEnabled:= 0;
+SDL_InitSubSystem(SDL_INIT_JOYSTICK);
 ControllerNumControllers:= SDL_NumJoysticks();
-
 if ControllerNumControllers > 6 then ControllerNumControllers:= 6;
 
 WriteLnToConsole('Number of game controllers: ' + inttostr(ControllerNumControllers));