Add Resolution Mode w/ forced 640x480 emu view
This commit is contained in:
parent
8d52045265
commit
46299825ae
|
@ -19,7 +19,7 @@ public class Emulator extends Application {
|
|||
public static final String pref_limitfps = "limit_fps";
|
||||
public static final String pref_nosound = "sound_disabled";
|
||||
public static final String pref_mipmaps = "use_mipmaps";
|
||||
public static final String pref_widescreen = "stretch_view";
|
||||
public static final String pref_resolution = "resolution";
|
||||
public static final String pref_frameskip = "frame_skip";
|
||||
public static final String pref_pvrrender = "pvr_render";
|
||||
public static final String pref_syncedrender = "synced_render";
|
||||
|
@ -39,6 +39,7 @@ public class Emulator extends Application {
|
|||
public static boolean nosound = false;
|
||||
public static boolean mipmaps = true;
|
||||
public static boolean widescreen = false;
|
||||
public static boolean crtview = false;
|
||||
public static boolean subdivide = false;
|
||||
public static int frameskip = 0;
|
||||
public static boolean pvrrender = false;
|
||||
|
@ -60,7 +61,8 @@ public class Emulator extends Application {
|
|||
Emulator.limitfps = mPrefs.getBoolean(pref_limitfps, limitfps);
|
||||
Emulator.nosound = mPrefs.getBoolean(pref_nosound, nosound);
|
||||
Emulator.mipmaps = mPrefs.getBoolean(pref_mipmaps, mipmaps);
|
||||
Emulator.widescreen = mPrefs.getBoolean(pref_widescreen, widescreen);
|
||||
Emulator.widescreen = mPrefs.getInt(pref_resolution, 0) == 2;
|
||||
Emulator.crtview = mPrefs.getInt(pref_resolution, 0) == 1;
|
||||
Emulator.frameskip = mPrefs.getInt(pref_frameskip, frameskip);
|
||||
Emulator.pvrrender = mPrefs.getBoolean(pref_pvrrender, pvrrender);
|
||||
Emulator.syncedrender = mPrefs.getBoolean(pref_syncedrender, syncedrender);
|
||||
|
|
|
@ -365,15 +365,8 @@ public class OptionsFragment extends Fragment {
|
|||
mipmap_opt.setChecked(mPrefs.getBoolean(Emulator.pref_mipmaps, Emulator.mipmaps));
|
||||
mipmap_opt.setOnCheckedChangeListener(mipmaps_option);
|
||||
|
||||
OnCheckedChangeListener full_screen = new OnCheckedChangeListener() {
|
||||
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
mPrefs.edit().putBoolean(Emulator.pref_widescreen, isChecked).apply();
|
||||
}
|
||||
};
|
||||
CompoundButton stretch_view = (CompoundButton) getView().findViewById(R.id.stretch_option);
|
||||
stretch_view.setChecked(mPrefs.getBoolean(Emulator.pref_widescreen, Emulator.widescreen));
|
||||
stretch_view.setOnCheckedChangeListener(full_screen);
|
||||
setSpinner(R.array.resolution, R.id.resolution_spinner,
|
||||
Emulator.pref_resolution, 0, false);
|
||||
|
||||
int frameskip = mPrefs.getInt(Emulator.pref_frameskip, Emulator.frameskip);
|
||||
|
||||
|
@ -695,7 +688,7 @@ public class OptionsFragment extends Fragment {
|
|||
mPrefs.edit().remove(Emulator.pref_broadcast).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_limitfps).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_mipmaps).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_widescreen).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_resolution).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_frameskip).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_pvrrender).apply();
|
||||
mPrefs.edit().remove(Emulator.pref_syncedrender).apply();
|
||||
|
@ -715,6 +708,7 @@ public class OptionsFragment extends Fragment {
|
|||
Emulator.limitfps = true;
|
||||
Emulator.mipmaps = true;
|
||||
Emulator.widescreen = false;
|
||||
Emulator.crtview = false;
|
||||
Emulator.frameskip = 0;
|
||||
Emulator.pvrrender = false;
|
||||
Emulator.syncedrender = false;
|
||||
|
|
|
@ -524,6 +524,8 @@ public class GL2JNIView extends GLSurfaceView
|
|||
gl.glViewport(0, 0, width, height);
|
||||
if (Emulator.widescreen) {
|
||||
JNIdc.rendinit(width, height);
|
||||
} else if (Emulator.crtview) {
|
||||
JNIdc.rendinit(640, 480);
|
||||
} else {
|
||||
JNIdc.rendinit(height * (4 / 3), height);
|
||||
}
|
||||
|
|
|
@ -307,13 +307,13 @@
|
|||
android:gravity="center_vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stretch_text"
|
||||
android:id="@+id/resolution_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|left"
|
||||
android:text="@string/select_stretch" />
|
||||
android:text="@string/select_resolution" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -322,11 +322,12 @@
|
|||
android:gravity="right"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<Switch
|
||||
android:id="@+id/stretch_option"
|
||||
<Spinner
|
||||
android:id="@+id/resolution_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10" />
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
|
|
|
@ -307,13 +307,13 @@
|
|||
android:gravity="center_vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stretch_text"
|
||||
android:id="@+id/resolution_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:ems="10"
|
||||
android:gravity="center_vertical|left"
|
||||
android:text="@string/select_stretch" />
|
||||
android:text="@string/select_resolution" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -322,11 +322,12 @@
|
|||
android:gravity="right"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<Checkbox
|
||||
android:id="@+id/stretch_option"
|
||||
<Spinner
|
||||
android:id="@+id/resolution_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:ems="10" />
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
|
||||
|
|
|
@ -77,6 +77,12 @@
|
|||
<item>Purupuru</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="resolution">
|
||||
<item>Standard</item>
|
||||
<item>CRT (640x480)</item>
|
||||
<item>Widescreen</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="right_stick">
|
||||
<item>None</item>
|
||||
<item>L / R</item>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<string name="select_broadcast">Broadcast</string>
|
||||
<string name="select_limitfps">Limit FPS</string>
|
||||
<string name="select_mipmaps">Use Mipmaps (fixes SGX540)</string>
|
||||
<string name="select_stretch">Widescreen Mode</string>
|
||||
<string name="select_resolution">Resolution Mode</string>
|
||||
<string name="set_frameskip">Frameskip Value</string>
|
||||
<string name="select_render">PVR Rendering (does nothing for now)</string>
|
||||
<string name="select_syncrender">Synchronous Rendering</string>
|
||||
|
|
Loading…
Reference in New Issue