Android: Add Set as Default ISO to UI
This commit is contained in:
parent
bb7623e3ba
commit
38fa38d424
|
@ -10,9 +10,12 @@ import androidx.fragment.app.FragmentActivity;
|
|||
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.dolphinemu.dolphinemu.NativeLibrary;
|
||||
import org.dolphinemu.dolphinemu.R;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Settings;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity;
|
||||
import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile;
|
||||
import org.dolphinemu.dolphinemu.ui.platform.Platform;
|
||||
import org.dolphinemu.dolphinemu.utils.DirectoryInitialization;
|
||||
|
||||
|
@ -61,22 +64,28 @@ public class GamePropertiesDialog extends DialogFragment
|
|||
.getSupportFragmentManager(), "game_details");
|
||||
break;
|
||||
case 1:
|
||||
SettingsActivity.launch(getContext(), MenuTag.CONFIG, gameId);
|
||||
NativeLibrary.SetConfig(SettingsFile.FILE_NAME_DOLPHIN + ".ini",
|
||||
Settings.SECTION_INI_CORE, SettingsFile.KEY_DEFAULT_ISO, path);
|
||||
NativeLibrary.ReloadConfig();
|
||||
Toast.makeText(getContext(), "Default ISO set", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case 2:
|
||||
SettingsActivity.launch(getContext(), MenuTag.GRAPHICS, gameId);
|
||||
SettingsActivity.launch(getContext(), MenuTag.CONFIG, gameId);
|
||||
break;
|
||||
case 3:
|
||||
SettingsActivity.launch(getContext(), MenuTag.GCPAD_TYPE, gameId);
|
||||
SettingsActivity.launch(getContext(), MenuTag.GRAPHICS, gameId);
|
||||
break;
|
||||
case 4:
|
||||
SettingsActivity.launch(getContext(), MenuTag.GCPAD_TYPE, gameId);
|
||||
break;
|
||||
case 5:
|
||||
// Clear option for GC, Wii controls for else
|
||||
if (platform == Platform.GAMECUBE.toInt())
|
||||
clearGameSettings(gameId);
|
||||
else
|
||||
SettingsActivity.launch(getActivity(), MenuTag.WIIMOTE, gameId);
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
clearGameSettings(gameId);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public final class SettingsFile
|
|||
public static final String KEY_SLOT_A_DEVICE = "SlotA";
|
||||
public static final String KEY_SLOT_B_DEVICE = "SlotB";
|
||||
public static final String KEY_ENABLE_SAVE_STATES = "EnableSaveStates";
|
||||
public static final String KEY_DEFAULT_ISO = "DefaultISO";
|
||||
|
||||
public static final String KEY_ANALYTICS_ENABLED = "Enabled";
|
||||
public static final String KEY_ANALYTICS_PERMISSION_ASKED = "PermissionAsked";
|
||||
|
|
|
@ -337,6 +337,7 @@
|
|||
|
||||
<string-array name="gameSettingsMenusGC">
|
||||
<item>Details</item>
|
||||
<item>Set as Default ISO</item>
|
||||
<item>Core Settings</item>
|
||||
<item>GFX Settings</item>
|
||||
<item>GameCube Controller Settings</item>
|
||||
|
@ -344,6 +345,7 @@
|
|||
</string-array>
|
||||
<string-array name="gameSettingsMenusWii">
|
||||
<item>Details</item>
|
||||
<item>Set as Default ISO</item>
|
||||
<item>Core Settings</item>
|
||||
<item>GFX Settings</item>
|
||||
<item>GameCube Controller Settings</item>
|
||||
|
|
Loading…
Reference in New Issue