Misc fixes for Android portrait/landscape mode settings

This commit is contained in:
Aaron Culliney 2016-02-15 14:10:29 -08:00
parent fccd2629d4
commit 89d12ce29d
2 changed files with 8 additions and 0 deletions

View File

@ -119,6 +119,8 @@ public class Apple2Activity extends Activity {
setContentView(new View(this));
}
Apple2Preferences.LANDSCAPE_MODE.load(this);
Apple2CrashHandler.getInstance().initializeAndSetCustomExceptionHandler(this);
if (sNativeBarfed) {
Log.e(TAG, "NATIVE BARFED...", sNativeBarfedThrowable);
@ -265,6 +267,7 @@ public class Apple2Activity extends Activity {
// Dismiss these popups to avoid android.view.WindowLeaked issues
synchronized (this) {
dismissAllMenus();
dismissAllMenus(); // 2nd time should full exit calibration mode (if present)
nativeEmulationPause();
}

View File

@ -48,6 +48,11 @@ public class Apple2VideoSettingsMenu extends Apple2AbstractMenu {
if (position < 0 || position >= SETTINGS.size) {
throw new ArrayIndexOutOfBoundsException();
}
if (position == SETTINGS.PORTRAIT_CALIBRATE.ordinal()) {
if (Apple2Preferences.LANDSCAPE_MODE.booleanValue(mActivity)) {
return false;
}
}
return true;
}