project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java
changeset 7167 0b3b306f129a
parent 7083 5339aba29571
child 7169 b66eef8c8092
child 7185 92a045156255
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java	Sat Jun 02 16:25:13 2012 -0400
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java	Sat Jun 02 22:31:41 2012 +0200
@@ -24,6 +24,7 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -401,6 +402,11 @@
 			mAudioTrack = null;
 		}
 	}
+	
+	public static float getDensity(){
+		DisplayMetrics dm = SDLActivity.getContext().getResources().getDisplayMetrics();
+		return dm.density;
+	}
 }
 
 /**