fix the touchUI on android, ignore device dpi for now
authorXeli
Sat, 18 Aug 2012 18:48:34 +0200
changeset 7557 5a28d3cfbf62
parent 7555 acadabfb2dd1
child 7559 020c93746b0d
fix the touchUI on android, ignore device dpi for now
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}