diff options
author | dhewg | 2011-03-13 22:31:28 +0100 |
---|---|---|
committer | dhewg | 2011-03-13 23:30:16 +0100 |
commit | 79d991081dbeaddd0294c6bbf01675d1ec1fbb72 (patch) | |
tree | e7c712df278ba9b984f460842fb0f9d0234e83ba /backends/platform/android/org | |
parent | 4267011e3a42b3f633f86e3df6af12c456aa0f60 (diff) | |
download | scummvm-rg350-79d991081dbeaddd0294c6bbf01675d1ec1fbb72.tar.gz scummvm-rg350-79d991081dbeaddd0294c6bbf01675d1ec1fbb72.tar.bz2 scummvm-rg350-79d991081dbeaddd0294c6bbf01675d1ec1fbb72.zip |
ANDROID: Add support for video feature flags
kFeatureFullscreenMode and kFeatureAspectRatioCorrection are supported
now. The former prevents scaling to the full display - it scales one
axis and keeps the game AR.
Diffstat (limited to 'backends/platform/android/org')
-rw-r--r-- | backends/platform/android/org/inodes/gus/scummvm/ScummVM.java | 1 | ||||
-rw-r--r-- | backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java | 9 |
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(); |