summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2023-11-12 08:05:29 +0100
committert895 <clombardo169@gmail.com>2023-11-21 07:58:13 +0100
commite744c06f613d05762e3897a1df7709e8104ec03c (patch)
tree9dd549bdd97792750c23fd5ba31b1d854072ec1b /src/android
parentcommon: settings: Add ifdefs to define android's default settings (diff)
downloadyuzu-e744c06f613d05762e3897a1df7709e8104ec03c.tar
yuzu-e744c06f613d05762e3897a1df7709e8104ec03c.tar.gz
yuzu-e744c06f613d05762e3897a1df7709e8104ec03c.tar.bz2
yuzu-e744c06f613d05762e3897a1df7709e8104ec03c.tar.lz
yuzu-e744c06f613d05762e3897a1df7709e8104ec03c.tar.xz
yuzu-e744c06f613d05762e3897a1df7709e8104ec03c.tar.zst
yuzu-e744c06f613d05762e3897a1df7709e8104ec03c.zip
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/build.gradle.kts1
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt42
2 files changed, 0 insertions, 43 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index 021b070e0..5721327e7 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -219,7 +219,6 @@ dependencies {
implementation("io.coil-kt:coil:2.2.2")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.window:window:1.2.0-beta03")
- implementation("org.ini4j:ini4j:0.5.4")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.4")
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
index 2b04d666a..3ae5b4653 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
@@ -3,15 +3,8 @@
package org.yuzu.yuzu_emu.features.settings.utils
-import android.widget.Toast
import java.io.*
-import org.ini4j.Wini
-import org.yuzu.yuzu_emu.R
-import org.yuzu.yuzu_emu.YuzuApplication
-import org.yuzu.yuzu_emu.features.settings.model.*
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
-import org.yuzu.yuzu_emu.utils.Log
-import org.yuzu.yuzu_emu.utils.NativeConfig
/**
* Contains static methods for interacting with .ini files in which settings are stored.
@@ -19,41 +12,6 @@ import org.yuzu.yuzu_emu.utils.NativeConfig
object SettingsFile {
const val FILE_NAME_CONFIG = "config"
- /**
- * Saves a Settings HashMap to a given .ini file on disk. If unsuccessful, outputs an error
- * telling why it failed.
- *
- * @param fileName The target filename without a path or extension.
- */
- fun saveFile(fileName: String) {
- val ini = getSettingsFile(fileName)
- try {
- val wini = Wini(ini)
- for (specificCategory in Settings.Category.values()) {
- val categoryHeader = NativeConfig.getConfigHeader(specificCategory.ordinal)
- for (setting in Settings.settingsList) {
- if (setting.key!!.isEmpty()) continue
-
- val settingCategoryHeader =
- NativeConfig.getConfigHeader(setting.category.ordinal)
- val iniSetting: String? = wini.get(categoryHeader, setting.key)
- if (iniSetting != null || settingCategoryHeader == categoryHeader) {
- wini.put(settingCategoryHeader, setting.key, setting.valueAsString)
- }
- }
- }
- wini.store()
- } catch (e: IOException) {
- Log.error("[SettingsFile] File not found: " + fileName + ".ini: " + e.message)
- val context = YuzuApplication.appContext
- Toast.makeText(
- context,
- context.getString(R.string.error_saving, fileName, e.message),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
-
fun getSettingsFile(fileName: String): File =
File(DirectoryInitialization.userDirectory + "/config/" + fileName + ".ini")
}