Updated ScummVM, fixed UQM, new option: keep screen ratio aspect

This commit is contained in:
pelya
2010-11-17 23:05:40 +02:00
parent c88985782b
commit 79af9388f8
16 changed files with 114 additions and 41 deletions

View File

@@ -63,10 +63,11 @@ class Globals {
public static final int RIGHT_CLICK_WITH_MENU_BUTTON = 1;
public static final int RIGHT_CLICK_WITH_MULTITOUCH = 2;
public static final int RIGHT_CLICK_WITH_PRESSURE = 3;
public static int RightClickMethod = RIGHT_CLICK_WITH_MENU_BUTTON;
public static int RightClickMethod = RIGHT_CLICK_NONE;
public static boolean LeftClickUsesPressure = false;
public static boolean LeftClickUsesMultitouch = false;
public static boolean ShowScreenUnderFinger = false;
public static boolean KeepAspectRatio = false;
public static int ClickScreenPressure = 0;
public static int ClickScreenTouchspotSize = 0;
}

View File

@@ -55,6 +55,7 @@ class Settings
out.writeBoolean(Globals.LeftClickUsesMultitouch);
out.writeInt(Globals.ClickScreenPressure);
out.writeInt(Globals.ClickScreenTouchspotSize);
out.writeBoolean(Globals.KeepAspectRatio);
out.close();
settingsLoaded = true;
@@ -93,6 +94,7 @@ class Settings
Globals.LeftClickUsesMultitouch = settingsFile.readBoolean();
Globals.ClickScreenPressure = settingsFile.readInt();
Globals.ClickScreenTouchspotSize = settingsFile.readInt();
Globals.KeepAspectRatio = settingsFile.readBoolean();
settingsLoaded = true;
@@ -497,26 +499,36 @@ class Settings
Globals.LeftClickUsesPressure = false;
Globals.LeftClickUsesMultitouch = false;
/*
if( ! Globals.AppNeedsTwoButtonMouse )
{
showTouchPressureMeasurementTool(p);
return;
}
CharSequence[] items = { p.getResources().getString(R.string.pointandclick_showcreenunderfinger),
*/
CharSequence[] items = { p.getResources().getString(R.string.pointandclick_keepaspectratio),
p.getResources().getString(R.string.pointandclick_showcreenunderfinger),
p.getResources().getString(R.string.pointandclick_usepressure),
p.getResources().getString(R.string.pointandclick_multitouch) };
if( Globals.RightClickMethod == Globals.RIGHT_CLICK_WITH_PRESSURE )
{
CharSequence[] items2 = { p.getResources().getString(R.string.pointandclick_showcreenunderfinger),
CharSequence[] items2 = { p.getResources().getString(R.string.pointandclick_keepaspectratio),
p.getResources().getString(R.string.pointandclick_showcreenunderfinger),
p.getResources().getString(R.string.pointandclick_multitouch) };
items = items2;
}
if( Globals.RightClickMethod == Globals.RIGHT_CLICK_WITH_MULTITOUCH )
{
CharSequence[] items2 = { p.getResources().getString(R.string.pointandclick_showcreenunderfinger),
CharSequence[] items2 = { p.getResources().getString(R.string.pointandclick_keepaspectratio),
p.getResources().getString(R.string.pointandclick_showcreenunderfinger),
p.getResources().getString(R.string.pointandclick_usepressure) };
items = items2;
}
if( ! Globals.AppNeedsTwoButtonMouse )
{
CharSequence[] items2 = { p.getResources().getString(R.string.pointandclick_keepaspectratio) };
items = items2;
}
AlertDialog.Builder builder = new AlertDialog.Builder(p);
builder.setTitle(p.getResources().getString(R.string.pointandclick_question));
@@ -525,15 +537,17 @@ class Settings
public void onClick(DialogInterface dialog, int item, boolean isChecked)
{
if( item == 0 )
Globals.ShowScreenUnderFinger = isChecked;
Globals.KeepAspectRatio = isChecked;
if( item == 1 )
Globals.ShowScreenUnderFinger = isChecked;
if( item == 2 )
{
if( Globals.RightClickMethod == Globals.RIGHT_CLICK_WITH_PRESSURE )
Globals.LeftClickUsesMultitouch = isChecked;
else
Globals.LeftClickUsesPressure = isChecked;
}
if( item == 2 )
if( item == 3 )
Globals.LeftClickUsesMultitouch = isChecked;
}
});

View File

@@ -186,7 +186,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer {
}
public void onSurfaceChanged(GL10 gl, int w, int h) {
nativeResize(w, h);
nativeResize(w, h, Globals.KeepAspectRatio ? 1 : 0);
}
public void onSurfaceDestroyed() {
@@ -250,7 +250,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer {
private native void nativeInitJavaCallbacks();
private native void nativeInit(String CommandLine);
private native void nativeResize(int w, int h);
private native void nativeResize(int w, int h, int keepAspectRatio);
private native void nativeDone();
private native void nativeGlContextLost();
public native void nativeGlContextRecreated();

View File

@@ -64,7 +64,8 @@
<string name="rightclick_multitouch">Touch screen with second finger</string>
<string name="rightclick_pressure">Touch screen with force</string>
<string name="pointandclick_question">Advanced point-and-click features</string>
<string name="pointandclick_question">Advanced features</string>
<string name="pointandclick_keepaspectratio">Keep 4:3 acreen aspect ratio</string>
<string name="pointandclick_showcreenunderfinger">Show screen under finger in separate window</string>
<string name="pointandclick_usepressure">Left click triggered by touch force</string>
<string name="pointandclick_multitouch">Left click triggered by touch with second finger</string>