diff --git a/bugs.txt b/bugs.txt index f9f41651e..b3e5e2c64 100644 --- a/bugs.txt +++ b/bugs.txt @@ -1,10 +1,6 @@ Known bugs (see also todo.txt) ============================== -- With 4:3 screen aspect ratio the on-screen buttons are not shown on the inactive part of screen. - -- Put video at the center of the screen with 4:3 aspect ratio option - - Calling SDL_SetVideoMode() with SDL 1.3 several times makes it crash. - Calling SDL_Init()/SDL_Quit() several times will make SDL 1.2 crash. diff --git a/project/java/Globals.java b/project/java/Globals.java index 76de3d88f..5e2959a3c 100644 --- a/project/java/Globals.java +++ b/project/java/Globals.java @@ -121,4 +121,5 @@ class Globals public static boolean BrokenLibCMessageShown = false; // Gyroscope calibration public static float gyro_x1, gyro_x2, gyro_xc, gyro_y1, gyro_y2, gyro_yc, gyro_z1, gyro_z2, gyro_zc; + public static boolean OuyaEmulation = false; // For debugging } diff --git a/project/java/MainActivity.java b/project/java/MainActivity.java index 26b953bb4..8059804a5 100644 --- a/project/java/MainActivity.java +++ b/project/java/MainActivity.java @@ -1072,7 +1072,7 @@ public class MainActivity extends Activity return true; } catch (PackageManager.NameNotFoundException e) { } - return false; + return Globals.OuyaEmulation; } public boolean isCurrentOrientationHorizontal() diff --git a/project/java/Settings.java b/project/java/Settings.java index b379c8a1c..26ab1c89a 100644 --- a/project/java/Settings.java +++ b/project/java/Settings.java @@ -170,6 +170,8 @@ class Settings out.writeFloat(Globals.gyro_z2); out.writeFloat(Globals.gyro_zc); + out.writeBoolean(Globals.OuyaEmulation); + out.close(); settingsLoaded = true; @@ -349,6 +351,8 @@ class Settings Globals.gyro_z2 = settingsFile.readFloat(); Globals.gyro_zc = settingsFile.readFloat(); + Globals.OuyaEmulation = settingsFile.readBoolean(); + settingsLoaded = true; Log.i("SDL", "libSDL: Settings.Load(): loaded settings successfully"); diff --git a/project/java/SettingsMenuMisc.java b/project/java/SettingsMenuMisc.java index 1cfae7263..552a0a910 100644 --- a/project/java/SettingsMenuMisc.java +++ b/project/java/SettingsMenuMisc.java @@ -332,6 +332,7 @@ class SettingsMenuMisc extends SettingsMenu static class VideoSettingsConfig extends Menu { + static int debugMenuShowCount = 0; String title(final MainActivity p) { return p.getResources().getString(R.string.video); @@ -339,6 +340,7 @@ class SettingsMenuMisc extends SettingsMenu //boolean enabled() { return true; }; void run (final MainActivity p) { + debugMenuShowCount++; CharSequence[] items = { p.getResources().getString(R.string.pointandclick_keepaspectratio), p.getResources().getString(R.string.video_smooth) @@ -391,6 +393,48 @@ class SettingsMenuMisc extends SettingsMenu } }); builder.setPositiveButton(p.getResources().getString(R.string.ok), new DialogInterface.OnClickListener() + { + public void onClick(DialogInterface dialog, int item) + { + dialog.dismiss(); + if( debugMenuShowCount > 5 || Globals.OuyaEmulation ) + showDebugMenu(p); + else + goBack(p); + } + }); + builder.setOnCancelListener(new DialogInterface.OnCancelListener() + { + public void onCancel(DialogInterface dialog) + { + goBack(p); + } + }); + AlertDialog alert = builder.create(); + alert.setOwnerActivity(p); + alert.show(); + } + + void showDebugMenu (final MainActivity p) + { + CharSequence[] items = { + "OUYA emulation" + }; + boolean defaults[] = { + false, + }; + + AlertDialog.Builder builder = new AlertDialog.Builder(p); + builder.setTitle("Debug settings"); + builder.setMultiChoiceItems(items, defaults, new DialogInterface.OnMultiChoiceClickListener() + { + public void onClick(DialogInterface dialog, int item, boolean isChecked) + { + if( item == 0 ) + Globals.OuyaEmulation = isChecked; + } + }); + builder.setPositiveButton(p.getResources().getString(R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { diff --git a/project/jni/application/commandergenius/commandergenius b/project/jni/application/commandergenius/commandergenius index 1bcbadd1e..6f28771d5 160000 --- a/project/jni/application/commandergenius/commandergenius +++ b/project/jni/application/commandergenius/commandergenius @@ -1 +1 @@ -Subproject commit 1bcbadd1eadd735235288463239c348f5b58f845 +Subproject commit 6f28771d57ca7d878e3cfee08014651b854b9c7f diff --git a/todo.txt b/todo.txt index 341a3209d..6e884f6c3 100644 --- a/todo.txt +++ b/todo.txt @@ -1,14 +1,10 @@ Requested features (see also bugs.txt) ====================================== -- Redesign on-screen keyboard layout dialog, to show all keys, and to use dragon droppings. - - Option for default on-screen key theme in AndroidAppSettings.cfg. - Select between normal mouse input and magnifying glass/relative input automatically, based on screen size. -- Split Settings.java into several files. - - Show/hide screen controls with longpress on Text Edit button. - Floating on-screen joystick - initially invisible, it appears when you touch the screen,