hedgewars/uKeys.pas
changeset 2163 12730f5e79b9
parent 2162 2bce91404d49
child 2171 8208946331ba
equal deleted inserted replaced
2162:2bce91404d49 2163:12730f5e79b9
    65 {$IFDEF SDL13}
    65 {$IFDEF SDL13}
    66 pkbd:= SDL_GetKeyboardState(nil);
    66 pkbd:= SDL_GetKeyboardState(nil);
    67 {$ELSE}
    67 {$ELSE}
    68 pkbd:= SDL_GetKeyState(nil);
    68 pkbd:= SDL_GetKeyState(nil);
    69 {$ENDIF}
    69 {$ENDIF}
    70 i:= SDL_GetMouseState(nil, nil);
    70 {$IFDEF IPHONEOS}
       
    71 //SDL_GetMouseState currently broken in sdl13
       
    72 i:=1;
       
    73 {$ELSE}
       
    74 i:=SDL_GetMouseState(nil, nil);
       
    75 {$ENDIF}
    71 pkbd^[1]:= (i and 1);
    76 pkbd^[1]:= (i and 1);
    72 pkbd^[2]:= ((i shr 1) and 1);
    77 pkbd^[2]:= ((i shr 1) and 1);
    73 {$IFDEF DARWIN}
    78 {$IFDEF DARWIN}
    74 //    normal right click     ||      ctrl (left/right) + left click	  
    79 //    normal right click     ||      ctrl (left/right) + left click	  
    75 pkbd^[3]:= ((i shr 2) and 1) or ((i and 1) and (pkbd^[306] or pkbd^[305]));
    80 pkbd^[3]:= ((i shr 2) and 1) or ((i and 1) and (pkbd^[306] or pkbd^[305]));