Set PGC cable default based on compatibility
This commit is contained in:
parent
2c38ac9f26
commit
3b31877c25
|
@ -108,7 +108,7 @@ public class Emulator extends Application {
|
|||
}
|
||||
|
||||
public int isVGACompatible(String gameId) {
|
||||
int vgaMode; // -1 = None / Unknown, 0 = VGA, 1 = Patchable, 2 = TV
|
||||
int vgaMode; // -1 = None / Unknown, 0 = Patchable, 1 = VGA, 3 = TV
|
||||
switch (gameId) {
|
||||
case "T36803N": //102 Dalmatians puppies to the Rescue
|
||||
case "T36813D05": //102 Dalmatians puppies to the Rescue
|
||||
|
@ -586,7 +586,7 @@ public class Emulator extends Application {
|
|||
case "T36808N": // Sydney 2000
|
||||
case "T8103N": // WWF Attitude
|
||||
case "T8103D50": // WWF Attitude
|
||||
vgaMode = 2;
|
||||
vgaMode = 3;
|
||||
|
||||
default:
|
||||
vgaMode = -1;
|
||||
|
|
|
@ -51,6 +51,7 @@ import java.util.Map;
|
|||
|
||||
public class PGConfigFragment extends Fragment {
|
||||
|
||||
private Emulator app;
|
||||
private Spinner mSpnrConfigs;
|
||||
|
||||
private CompoundButton switchJoystickDpadEnabled;
|
||||
|
@ -88,7 +89,7 @@ public class PGConfigFragment extends Fragment {
|
|||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
|
||||
Emulator app = (Emulator) getActivity().getApplicationContext();
|
||||
app = (Emulator) getActivity().getApplicationContext();
|
||||
app.getConfigurationPrefs(PreferenceManager.getDefaultSharedPreferences(getActivity()));
|
||||
|
||||
mSpnrConfigs = (Spinner) getView().findViewById(R.id.config_spinner);
|
||||
|
@ -210,7 +211,8 @@ public class PGConfigFragment extends Fragment {
|
|||
ArrayAdapter<String> cableAdapter = new ArrayAdapter<>(getActivity(), R.layout.spinner_selected, cables);
|
||||
cableAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
cable_spnr.setAdapter(cableAdapter);
|
||||
cable_spnr.setSelection(mPrefs.getInt(Emulator.pref_cable, Emulator.cable), true);
|
||||
int compat = mPrefs.getInt(Emulator.pref_cable, app.isVGACompatible(gameId));
|
||||
cable_spnr.setSelection(compat == -1 ? 0 : compat, true);
|
||||
|
||||
String[] regions = getResources().getStringArray(R.array.region);
|
||||
ArrayAdapter<String> regionAdapter = new ArrayAdapter<>(getActivity(), R.layout.spinner_selected, regions);
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
</string-array>
|
||||
|
||||
<string-array name="cable">
|
||||
<item>None</item>
|
||||
<item>HDMI</item>
|
||||
<item>Component</item>
|
||||
<item>Generic</item>
|
||||
<item>VGA</item>
|
||||
<item>Component</item>
|
||||
<item>TV</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="themes_app">
|
||||
|
|
Loading…
Reference in New Issue