aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/org
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/android/org')
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVM.java1
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java9
2 files changed, 10 insertions, 0 deletions
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
index f263b89015..0bc5f3ce4c 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
@@ -52,6 +52,7 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
final public native void pushEvent(Event e);
// Callbacks from C++ peer instance
+ abstract protected void getDPI(float[] values);
abstract protected void displayMessageOnOSD(String msg);
abstract protected void setWindowCaption(String caption);
abstract protected String[] getPluginDirectories();
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
index 8cb3d80063..2cf6f58941 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
@@ -59,6 +59,15 @@ public class ScummVMActivity extends Activity {
}
@Override
+ protected void getDPI(float[] values) {
+ DisplayMetrics metrics = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics(metrics);
+
+ values[0] = metrics.xdpi;
+ values[1] = metrics.ydpi;
+ }
+
+ @Override
protected void displayMessageOnOSD(String msg) {
Log.i(LOG_TAG, "OSD: " + msg);
Toast.makeText(ScummVMActivity.this, msg, Toast.LENGTH_LONG).show();