diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2025-05-03 18:37:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-03 18:37:51 +0200 |
| commit | c574b651aa013baa5321c1a852ee385f8083062d (patch) | |
| tree | b4568a04af4368695516db66538efb7820fa70c6 /Source/Android/app/src | |
| parent | dcc09906e58e3731224418544976745d43f2e8d0 (diff) | |
| parent | 61299536663976aff4adfdec335ad88d7c5a3a28 (diff) | |
Merge pull request #13621 from JosJuice/android-remove-loaddefaultsettings
Android: Remove unused onSettingsFileNotFound and friends
Diffstat (limited to 'Source/Android/app/src')
6 files changed, 12 insertions, 39 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.kt index d9736fd84d..cd5bdb51eb 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.kt @@ -10,6 +10,11 @@ import org.dolphinemu.dolphinemu.R import org.dolphinemu.dolphinemu.features.input.model.MappingCommon import java.io.Closeable +/** + * Represents a set of settings stored in the native part of Dolphin. + * + * A set of settings can be either the global settings, or game settings for a particular game. + */ class Settings : Closeable { private var gameId: String = "" private var revision = 0 diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.kt index e222a8c78f..63a3992487 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.kt @@ -230,11 +230,6 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView { fragment?.onSettingsFileLoaded(settings) } - override fun onSettingsFileNotFound() { - val fragment: SettingsFragmentView? = fragment - fragment?.loadDefaultSettings() - } - override fun showToastMessage(message: String) { Toast.makeText(this, message, Toast.LENGTH_SHORT).show() } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.kt index 435d23fad6..1cd39f6fe4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.kt @@ -31,27 +31,18 @@ interface SettingsActivityView { fun showDialogFragment(fragment: DialogFragment) /** - * Called by a contained Fragment to get access to the Setting HashMap - * loaded from disk, so that each Fragment doesn't need to perform its own - * read operation. - * - * @return A possibly null HashMap of Settings. + * Identifies which set of settings is to be read from and written to. */ val settings: Settings /** - * Called when an asynchronous load operation completes. + * Called when a Settings object becomes available. * - * @param settings The (possibly null) result of the ini load operation. + * @param settings The settings that this Activity should access. */ fun onSettingsFileLoaded(settings: Settings) /** - * Called when an asynchronous load operation fails. - */ - fun onSettingsFileNotFound() - - /** * Display a popup text message on screen. * * @param message The contents of the onscreen message. diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.kt index 651a86db51..6a294ee139 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.kt @@ -116,10 +116,6 @@ class SettingsFragment : Fragment(), SettingsFragmentView { adapter!!.setSettings(settingsList) } - override fun loadDefaultSettings() { - presenter.loadDefaultSettings() - } - override fun loadSubMenu(menuKey: MenuTag) { if (menuKey == MenuTag.GPU_DRIVERS) { showGpuDriverDialog() diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt index 6e2371e7e4..e584e0a2ff 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.kt @@ -100,10 +100,6 @@ class SettingsFragmentPresenter( } } - fun loadDefaultSettings() { - loadSettingsList() - } - private fun loadSettingsList() { val sl = ArrayList<SettingsItem>() when (menuTag) { diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.kt index 896b316883..076beaff6f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.kt @@ -14,10 +14,9 @@ import org.dolphinemu.dolphinemu.utils.GpuDriverInstallResult */ interface SettingsFragmentView { /** - * Called by the containing Activity to notify the Fragment that an - * asynchronous load operation completed. + * Called when a Settings object becomes available. * - * @param settings The (possibly null) result of the ini load operation. + * @param settings The settings that this Fragment should access. */ fun onSettingsFileLoaded(settings: Settings) @@ -29,12 +28,6 @@ interface SettingsFragmentView { fun showSettingsList(settingsList: ArrayList<SettingsItem>) /** - * Called by the containing Activity when an asynchronous load operation fails. - * Instructs the Fragment to load the settings screen with defaults selected. - */ - fun loadDefaultSettings() - - /** * @return The Fragment's containing activity. */ val fragmentActivity: FragmentActivity @@ -95,12 +88,9 @@ interface SettingsFragmentView { * @param value The current value of the Setting. */ fun hasMenuTagActionForValue(menuTag: MenuTag, value: Int): Boolean + /** - * Returns whether the input mapping dialog should detect inputs from all devices, - * not just the device configured for the controller. - */ - /** - * Sets whether the input mapping dialog should detect inputs from all devices, + * Controls whether the input mapping dialog should detect inputs from all devices, * not just the device configured for the controller. */ var isMappingAllDevices: Boolean |
