hedgewars/uMobile.pas
changeset 6601 5965e2927b3d
parent 6580 6155187bf599
child 6624 e049b5bb0ad1
equal deleted inserted replaced
6600:5810e42d8375 6601:5965e2927b3d
    39 procedure AmmoUpdate; // do not inline
    39 procedure AmmoUpdate; // do not inline
    40 procedure NewTurnBeginning; inline;
    40 procedure NewTurnBeginning; inline;
    41 procedure SaveLoadingEnded; inline;
    41 procedure SaveLoadingEnded; inline;
    42 
    42 
    43 implementation
    43 implementation
    44 uses uVariables;
    44 uses uVariables, uConsole;
    45 
    45 
    46 // this function is just to determine whether we are running on a limited screen device
    46 // this function is just to determine whether we are running on a limited screen device
    47 function isPhone: Boolean; inline;
    47 function isPhone: Boolean; inline;
    48 begin
    48 begin
    49 {$IFDEF IPHONEOS}
    49 {$IFDEF IPHONEOS}
    50     exit(isApplePhone());
    50     exit(isApplePhone());
    51 {$ENDIF}
    51 {$ENDIF}
       
    52 {$IFDEF ANDROID}
       
    53     //nasty nasty hack. TODO: implement callback to java to have a unified way of determining if it is a tablet
       
    54     if (cScreenWidth < 1000) and (cScreenHeight < 500) then
       
    55     begin
       
    56         exit(true);
       
    57     end
       
    58     else exit(false);
       
    59 {$ELSE}
    52     exit(false);
    60     exit(false);
       
    61 {$ENDIF}
    53 end;
    62 end;
    54 
    63 
    55 // this function should make the device vibrate in some way
    64 // this function should make the device vibrate in some way
    56 procedure performRumble; inline;
    65 procedure performRumble; inline;
    57 const kSystemSoundID_Vibrate = $00000FFF;
    66 const kSystemSoundID_Vibrate = $00000FFF;