Debug option to emulate Ouya
This commit is contained in:
4
bugs.txt
4
bugs.txt
@@ -1,10 +1,6 @@
|
|||||||
Known bugs (see also todo.txt)
|
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_SetVideoMode() with SDL 1.3 several times makes it crash.
|
||||||
|
|
||||||
- Calling SDL_Init()/SDL_Quit() several times will make SDL 1.2 crash.
|
- Calling SDL_Init()/SDL_Quit() several times will make SDL 1.2 crash.
|
||||||
|
|||||||
@@ -121,4 +121,5 @@ class Globals
|
|||||||
public static boolean BrokenLibCMessageShown = false;
|
public static boolean BrokenLibCMessageShown = false;
|
||||||
// Gyroscope calibration
|
// 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 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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1072,7 +1072,7 @@ public class MainActivity extends Activity
|
|||||||
return true;
|
return true;
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
}
|
}
|
||||||
return false;
|
return Globals.OuyaEmulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCurrentOrientationHorizontal()
|
public boolean isCurrentOrientationHorizontal()
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ class Settings
|
|||||||
out.writeFloat(Globals.gyro_z2);
|
out.writeFloat(Globals.gyro_z2);
|
||||||
out.writeFloat(Globals.gyro_zc);
|
out.writeFloat(Globals.gyro_zc);
|
||||||
|
|
||||||
|
out.writeBoolean(Globals.OuyaEmulation);
|
||||||
|
|
||||||
out.close();
|
out.close();
|
||||||
settingsLoaded = true;
|
settingsLoaded = true;
|
||||||
|
|
||||||
@@ -349,6 +351,8 @@ class Settings
|
|||||||
Globals.gyro_z2 = settingsFile.readFloat();
|
Globals.gyro_z2 = settingsFile.readFloat();
|
||||||
Globals.gyro_zc = settingsFile.readFloat();
|
Globals.gyro_zc = settingsFile.readFloat();
|
||||||
|
|
||||||
|
Globals.OuyaEmulation = settingsFile.readBoolean();
|
||||||
|
|
||||||
settingsLoaded = true;
|
settingsLoaded = true;
|
||||||
|
|
||||||
Log.i("SDL", "libSDL: Settings.Load(): loaded settings successfully");
|
Log.i("SDL", "libSDL: Settings.Load(): loaded settings successfully");
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ class SettingsMenuMisc extends SettingsMenu
|
|||||||
|
|
||||||
static class VideoSettingsConfig extends Menu
|
static class VideoSettingsConfig extends Menu
|
||||||
{
|
{
|
||||||
|
static int debugMenuShowCount = 0;
|
||||||
String title(final MainActivity p)
|
String title(final MainActivity p)
|
||||||
{
|
{
|
||||||
return p.getResources().getString(R.string.video);
|
return p.getResources().getString(R.string.video);
|
||||||
@@ -339,6 +340,7 @@ class SettingsMenuMisc extends SettingsMenu
|
|||||||
//boolean enabled() { return true; };
|
//boolean enabled() { return true; };
|
||||||
void run (final MainActivity p)
|
void run (final MainActivity p)
|
||||||
{
|
{
|
||||||
|
debugMenuShowCount++;
|
||||||
CharSequence[] items = {
|
CharSequence[] items = {
|
||||||
p.getResources().getString(R.string.pointandclick_keepaspectratio),
|
p.getResources().getString(R.string.pointandclick_keepaspectratio),
|
||||||
p.getResources().getString(R.string.video_smooth)
|
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()
|
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)
|
public void onClick(DialogInterface dialog, int item)
|
||||||
{
|
{
|
||||||
|
|||||||
Submodule project/jni/application/commandergenius/commandergenius updated: 1bcbadd1ea...6f28771d57
4
todo.txt
4
todo.txt
@@ -1,14 +1,10 @@
|
|||||||
Requested features (see also bugs.txt)
|
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.
|
- 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.
|
- 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.
|
- Show/hide screen controls with longpress on Text Edit button.
|
||||||
|
|
||||||
- Floating on-screen joystick - initially invisible, it appears when you touch the screen,
|
- Floating on-screen joystick - initially invisible, it appears when you touch the screen,
|
||||||
|
|||||||
Reference in New Issue
Block a user