# HG changeset patch # User Xeli # Date 1345308514 -7200 # Node ID 5a28d3cfbf628f2cce9513e1779fb657764d892f # Parent acadabfb2dd1580c01ac88377b637b8d4571c20b fix the touchUI on android, ignore device dpi for now diff -r acadabfb2dd1 -r 5a28d3cfbf62 hedgewars/uMobile.pas --- a/hedgewars/uMobile.pas Sat Aug 18 09:29:40 2012 -0400 +++ b/hedgewars/uMobile.pas Sat Aug 18 18:48:34 2012 +0200 @@ -28,7 +28,7 @@ interface function isPhone: Boolean; inline; -function getScreenDPI: Single; inline; +function getScreenDPI: Double; inline; procedure performRumble; inline; procedure GameLoading; inline; @@ -36,7 +36,7 @@ procedure SaveLoadingEnded; inline; implementation -uses uVariables, uConsole; +uses uVariables, uConsole, SDLh; // add here any external call that you need {$IFDEF IPHONEOS} @@ -48,10 +48,6 @@ procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external; {$ENDIF} -{$IFDEF ANDROID} -function Android_JNI_getDensity(): Single; cdecl; external; -{$ENDIF} - // this function is just to determine whether we are running on a limited screen device function isPhone: Boolean; inline; begin @@ -66,10 +62,11 @@ {$ENDIF} end; -function getScreenDPI: Single; inline; +function getScreenDPI: Double; inline; begin {$IFDEF ANDROID} - getScreenDPI:= Android_JNI_getDensity(); +// getScreenDPI:= Android_JNI_getDensity(); + getScreenDPI:= 1; {$ELSE} getScreenDPI:= 1; {$ENDIF}