Android fixes + codebase rebranding

This commit is contained in:
OpenSauce04 2024-03-31 19:27:55 +01:00
parent bacd935a90
commit f12b649194
149 changed files with 227 additions and 227 deletions

View File

@ -33,7 +33,7 @@
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:name="io.github.lime3ds.CitraApplication"
android:name="io.github.lime3ds.LimeApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
@ -47,7 +47,7 @@
<activity
android:name="io.github.lime3ds.ui.main.MainActivity"
android:theme="@style/Theme.Citra.Splash.Main"
android:theme="@style/Theme.Lime.Splash.Main"
android:exported="true">
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
@ -61,13 +61,13 @@
<activity
android:name="io.github.lime3ds.features.settings.ui.SettingsActivity"
android:configChanges="orientation|screenSize|uiMode"
android:theme="@style/Theme.Citra.Main"
android:theme="@style/Theme.Lime.Main"
android:label="@string/preferences_settings"/>
<activity
android:name="io.github.lime3ds.activities.EmulationActivity"
android:exported="true"
android:theme="@style/Theme.Citra.Main"
android:theme="@style/Theme.Lime.Main"
android:launchMode="singleTop">
<intent-filter>
@ -87,7 +87,7 @@
<activity
android:name="io.github.lime3ds.features.cheats.ui.CheatsActivity"
android:exported="false"
android:theme="@style/Theme.Citra.Main"
android:theme="@style/Theme.Lime.Main"
android:label="@string/cheats"/>
</application>

View File

@ -17,7 +17,7 @@ import io.github.lime3ds.utils.PermissionsHandler
import io.github.lime3ds.utils.Log
import io.github.lime3ds.utils.MemoryUtil
class CitraApplication : Application() {
class LimeApplication : Application() {
private fun createNotificationChannel() {
with(getSystemService(NotificationManager::class.java)) {
// General notification
@ -71,7 +71,7 @@ class CitraApplication : Application() {
}
companion object {
private var application: CitraApplication? = null
private var application: LimeApplication? = null
val appContext: Context get() = application!!.applicationContext

View File

@ -247,7 +247,7 @@ object NativeLibrary {
@get:Keep
@get:JvmStatic
val isPortraitMode: Boolean
get() = CitraApplication.appContext.resources.configuration.orientation ==
get() = LimeApplication.appContext.resources.configuration.orientation ==
Configuration.ORIENTATION_PORTRAIT
@Keep
@ -369,7 +369,7 @@ object NativeLibrary {
.setTitle(captionId)
.setMessage(
Html.fromHtml(
CitraApplication.appContext.resources.getString(R.string.redump_games),
LimeApplication.appContext.resources.getString(R.string.redump_games),
Html.FROM_HTML_MODE_LEGACY
)
)
@ -519,7 +519,7 @@ object NativeLibrary {
@JvmStatic
fun createFile(directory: String, filename: String): Boolean =
if (FileUtil.isNativePath(directory)) {
CitraApplication.documentsTree.createFile(directory, filename)
LimeApplication.documentsTree.createFile(directory, filename)
} else {
FileUtil.createFile(directory, filename) != null
}
@ -528,7 +528,7 @@ object NativeLibrary {
@JvmStatic
fun createDir(directory: String, directoryName: String): Boolean =
if (FileUtil.isNativePath(directory)) {
CitraApplication.documentsTree.createDir(directory, directoryName)
LimeApplication.documentsTree.createDir(directory, directoryName)
} else {
FileUtil.createDir(directory, directoryName) != null
}
@ -537,7 +537,7 @@ object NativeLibrary {
@JvmStatic
fun openContentUri(path: String, openMode: String): Int =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.openContentUri(path, openMode)
LimeApplication.documentsTree.openContentUri(path, openMode)
} else {
FileUtil.openContentUri(path, openMode)
}
@ -546,7 +546,7 @@ object NativeLibrary {
@JvmStatic
fun getFilesName(path: String): Array<String?> =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.getFilesName(path)
LimeApplication.documentsTree.getFilesName(path)
} else {
FileUtil.getFilesName(path)
}
@ -555,7 +555,7 @@ object NativeLibrary {
@JvmStatic
fun getSize(path: String): Long =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.getFileSize(path)
LimeApplication.documentsTree.getFileSize(path)
} else {
FileUtil.getFileSize(path)
}
@ -564,7 +564,7 @@ object NativeLibrary {
@JvmStatic
fun fileExists(path: String): Boolean =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.exists(path)
LimeApplication.documentsTree.exists(path)
} else {
FileUtil.exists(path)
}
@ -573,7 +573,7 @@ object NativeLibrary {
@JvmStatic
fun isDirectory(path: String): Boolean =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.isDirectory(path)
LimeApplication.documentsTree.isDirectory(path)
} else {
FileUtil.isDirectory(path)
}
@ -588,7 +588,7 @@ object NativeLibrary {
if (FileUtil.isNativePath(sourcePath) &&
FileUtil.isNativePath(destinationParentPath)
) {
CitraApplication.documentsTree
LimeApplication.documentsTree
.copyFile(sourcePath, destinationParentPath, destinationFilename)
} else {
FileUtil.copyFile(
@ -602,7 +602,7 @@ object NativeLibrary {
@JvmStatic
fun renameFile(path: String, destinationFilename: String): Boolean =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.renameFile(path, destinationFilename)
LimeApplication.documentsTree.renameFile(path, destinationFilename)
} else {
FileUtil.renameFile(path, destinationFilename)
}
@ -611,7 +611,7 @@ object NativeLibrary {
@JvmStatic
fun deleteDocument(path: String): Boolean =
if (FileUtil.isNativePath(path)) {
CitraApplication.documentsTree.deleteDocument(path)
LimeApplication.documentsTree.deleteDocument(path)
} else {
FileUtil.deleteDocument(path)
}

View File

@ -25,7 +25,7 @@ import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.navigation.fragment.NavHostFragment
import androidx.preference.PreferenceManager
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
import io.github.lime3ds.camera.StillImageCameraHelper.OnFilePickerResult
@ -46,7 +46,7 @@ import io.github.lime3ds.viewmodel.EmulationViewModel
class EmulationActivity : AppCompatActivity() {
private val preferences: SharedPreferences
get() = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
get() = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
private var foregroundService: Intent? = null
var isActivityRecreated = false

View File

@ -24,7 +24,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.color.MaterialColors
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import io.github.lime3ds.HomeNavigationDirections
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.adapters.GameAdapter.GameViewHolder
import io.github.lime3ds.databinding.CardGameBinding
@ -70,7 +70,7 @@ class GameAdapter(private val activity: AppCompatActivity) :
gameExists(holder)
val preferences =
PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
preferences.edit()
.putLong(
holder.game.keyLastPlayedTime,
@ -112,12 +112,12 @@ class GameAdapter(private val activity: AppCompatActivity) :
}
val gameExists = DocumentFile.fromSingleUri(
CitraApplication.appContext,
LimeApplication.appContext,
Uri.parse(holder.game.path)
)?.exists() == true
return if (!gameExists) {
Toast.makeText(
CitraApplication.appContext,
LimeApplication.appContext,
R.string.loader_error_file_not_found,
Toast.LENGTH_LONG
).show()

View File

@ -10,7 +10,7 @@ import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.databinding.ListItemSettingBinding
import io.github.lime3ds.fragments.LicenseBottomSheetDialogFragment
import io.github.lime3ds.model.License
@ -47,7 +47,7 @@ class LicenseAdapter(private val activity: AppCompatActivity, var licenses: List
fun bind(license: License) {
this.license = license
val context = CitraApplication.appContext
val context = LimeApplication.appContext
binding.textSettingName.text = context.getString(license.titleId)
binding.textSettingDescription.text = context.getString(license.descriptionId)
}

View File

@ -7,7 +7,7 @@ package io.github.lime3ds.applets
import android.text.InputFilter
import android.text.Spanned
import androidx.annotation.Keep
import io.github.lime3ds.CitraApplication.Companion.appContext
import io.github.lime3ds.LimeApplication.Companion.appContext
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
import io.github.lime3ds.fragments.KeyboardDialogFragment

View File

@ -12,7 +12,7 @@ import androidx.core.graphics.drawable.toBitmap
import coil.executeBlocking
import coil.imageLoader
import coil.request.ImageRequest
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.NativeLibrary
// Used in native code.
@ -53,7 +53,7 @@ object StillImageCameraHelper {
@Keep
@JvmStatic
fun LoadImageFromFile(uri: String?, width: Int, height: Int): Bitmap? {
val context = CitraApplication.appContext
val context = LimeApplication.appContext
val request = ImageRequest.Builder(context)
.data(uri)
.size(width, height)

View File

@ -5,7 +5,7 @@
package io.github.lime3ds.features.settings.model
import android.text.TextUtils
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.features.settings.ui.SettingsActivityView
import io.github.lime3ds.features.settings.utils.SettingsFile
@ -79,7 +79,7 @@ class Settings {
fun saveSettings(view: SettingsActivityView) {
if (TextUtils.isEmpty(gameId)) {
view.showToastMessage(
CitraApplication.appContext.getString(R.string.ini_saved),
LimeApplication.appContext.getString(R.string.ini_saved),
false
)
for ((fileName, sectionNames) in configFileSectionsMap.entries) {

View File

@ -11,7 +11,7 @@ import android.view.InputDevice.MotionRange
import android.view.KeyEvent
import android.widget.Toast
import androidx.preference.PreferenceManager
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
import io.github.lime3ds.features.hotkeys.Hotkey
@ -22,7 +22,7 @@ class InputBindingSetting(
val abstractSetting: AbstractSetting,
titleId: Int
) : SettingsItem(abstractSetting, titleId, 0) {
private val context: Context get() = CitraApplication.appContext
private val context: Context get() = LimeApplication.appContext
private val preferences: SharedPreferences
get() = PreferenceManager.getDefaultSharedPreferences(context)

View File

@ -21,7 +21,7 @@ import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updatePadding
import androidx.preference.PreferenceManager
import com.google.android.material.color.MaterialColors
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
import io.github.lime3ds.databinding.ActivitySettingsBinding
@ -193,7 +193,7 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
val controllerKeys = Settings.buttonKeys + Settings.circlePadKeys + Settings.cStickKeys +
Settings.dPadKeys + Settings.triggerKeys
val editor =
PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext).edit()
PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext).edit()
controllerKeys.forEach { editor.remove(it) }
editor.apply()
@ -213,7 +213,7 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
// Set the root of the document tree before we create a new config file or the native code
// will fail when creating the file.
if (DirectoryInitialization.setCitraUserDirectory()) {
CitraApplication.documentsTree.setRoot(Uri.parse(DirectoryInitialization.userPath))
LimeApplication.documentsTree.setRoot(Uri.parse(DirectoryInitialization.userPath))
NativeLibrary.createConfigFile()
} else {
throw IllegalStateException("Citra directory unavailable when accessing config file!")

View File

@ -12,7 +12,7 @@ import android.hardware.camera2.CameraManager
import android.os.Build
import android.text.TextUtils
import androidx.preference.PreferenceManager
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.features.settings.model.AbstractBooleanSetting
import io.github.lime3ds.features.settings.model.AbstractIntSetting
@ -60,7 +60,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
fun onViewCreated(settingsAdapter: SettingsAdapter) {
this.settingsAdapter = settingsAdapter
preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
preferences = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
loadSettingsList()
}

View File

@ -6,7 +6,7 @@ package io.github.lime3ds.features.settings.ui.viewholder
import android.view.View
import androidx.preference.PreferenceManager
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.databinding.ListItemSettingBinding
import io.github.lime3ds.features.settings.model.view.InputBindingSetting
import io.github.lime3ds.features.settings.model.view.SettingsItem
@ -17,7 +17,7 @@ class InputBindingSettingViewHolder(val binding: ListItemSettingBinding, adapter
private lateinit var setting: InputBindingSetting
override fun bind(item: SettingsItem) {
val preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
val preferences = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
setting = item as InputBindingSetting
binding.textSettingName.setText(item.nameId)
val uiString = preferences.getString(setting.abstractSetting.key, "")!!

View File

@ -7,7 +7,7 @@ package io.github.lime3ds.features.settings.utils
import android.content.Context
import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.features.settings.model.AbstractSetting
import io.github.lime3ds.features.settings.model.BooleanSetting
@ -55,7 +55,7 @@ object SettingsFile {
val sections: HashMap<String, SettingSection?> = SettingsSectionMap()
var reader: BufferedReader? = null
try {
val context: Context = CitraApplication.appContext
val context: Context = LimeApplication.appContext
val inputStream = context.contentResolver.openInputStream(ini.uri)
reader = BufferedReader(InputStreamReader(inputStream))
var current: SettingSection? = null
@ -125,7 +125,7 @@ object SettingsFile {
) {
val ini = getSettingsFile(fileName)
try {
val context: Context = CitraApplication.appContext
val context: Context = LimeApplication.appContext
val inputStream = context.contentResolver.openInputStream(ini.uri)
val writer = Wini(inputStream)
val keySet: Set<String> = sections.keys
@ -141,7 +141,7 @@ object SettingsFile {
} catch (e: Exception) {
Log.error("[SettingsFile] File not found: $fileName.ini: ${e.message}")
view.showToastMessage(
CitraApplication.appContext
LimeApplication.appContext
.getString(R.string.error_saving, fileName, e.message), false
)
}
@ -153,7 +153,7 @@ object SettingsFile {
) {
val ini = getSettingsFile(fileName)
try {
val context: Context = CitraApplication.appContext
val context: Context = LimeApplication.appContext
val inputStream = context.contentResolver.openInputStream(ini.uri)
val writer = Wini(inputStream)
writer.put(setting.section, setting.key, setting.valueAsString)
@ -184,13 +184,13 @@ object SettingsFile {
}
fun getSettingsFile(fileName: String): DocumentFile {
val root = DocumentFile.fromTreeUri(CitraApplication.appContext, Uri.parse(userDirectory))
val root = DocumentFile.fromTreeUri(LimeApplication.appContext, Uri.parse(userDirectory))
val configDirectory = root!!.findFile("config")
return configDirectory!!.findFile("$fileName.ini")!!
}
private fun getCustomGameSettingsFile(gameId: String): DocumentFile {
val root = DocumentFile.fromTreeUri(CitraApplication.appContext, Uri.parse(userDirectory))
val root = DocumentFile.fromTreeUri(LimeApplication.appContext, Uri.parse(userDirectory))
val configDirectory = root!!.findFile("GameSettings")
return configDirectory!!.findFile("$gameId.ini")!!
}

View File

@ -23,7 +23,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.databinding.DialogCopyDirBinding
import io.github.lime3ds.model.SetupCallback
@ -125,14 +125,14 @@ class CopyDirProgressDialog : DialogFragment() {
object : FileUtil.CopyDirListener {
override fun onSearchProgress(directoryName: String) {
viewModel.onUpdateSearchProgress(
CitraApplication.appContext.resources,
LimeApplication.appContext.resources,
directoryName
)
}
override fun onCopyProgress(filename: String, progress: Int, max: Int) {
viewModel.onUpdateCopyProgress(
CitraApplication.appContext.resources,
LimeApplication.appContext.resources,
filename,
progress,
max

View File

@ -43,7 +43,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.slider.Slider
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.EmulationNavigationDirections
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
@ -70,7 +70,7 @@ import io.github.lime3ds.viewmodel.EmulationViewModel
class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.FrameCallback {
private val preferences: SharedPreferences
get() = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
get() = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
private lateinit var emulationState: EmulationState
private var perfStatsUpdater: Runnable? = null

View File

@ -25,7 +25,7 @@ import com.google.android.material.color.MaterialColors
import com.google.android.material.transition.MaterialFadeThrough
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.adapters.GameAdapter
import io.github.lime3ds.databinding.FragmentGamesBinding
@ -147,7 +147,7 @@ class GamesFragment : Fragment() {
}
private fun setAdapter(games: List<Game>) {
val preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
val preferences = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
if (preferences.getBoolean(Settings.PREF_SHOW_HOME_APPS, false)) {
(binding.gridGames.adapter as GameAdapter).submitList(games)
} else {

View File

@ -24,7 +24,7 @@ import androidx.navigation.fragment.findNavController
import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.GridLayoutManager
import com.google.android.material.transition.MaterialSharedAxis
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.adapters.HomeSettingAdapter
import io.github.lime3ds.databinding.FragmentHomeSettingsBinding
@ -50,7 +50,7 @@ class HomeSettingsFragment : Fragment() {
private val driverViewModel: DriverViewModel by activityViewModels()
private val preferences get() =
PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -188,7 +188,7 @@ class HomeSettingsFragment : Fragment() {
.apply()
Toast.makeText(
CitraApplication.appContext,
LimeApplication.appContext,
R.string.games_dir_selected,
Toast.LENGTH_LONG
).show()

View File

@ -27,7 +27,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import info.debatty.java.stringsimilarity.Jaccard
import info.debatty.java.stringsimilarity.JaroWinkler
import kotlinx.coroutines.launch
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.adapters.GameAdapter
import io.github.lime3ds.databinding.FragmentSearchBinding
@ -65,7 +65,7 @@ class SearchFragment : Fragment() {
homeViewModel.setNavigationVisibility(visible = true, animated = true)
homeViewModel.setStatusBarShadeVisibility(visible = true)
preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
preferences = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
if (savedInstanceState != null) {
binding.searchText.setText(savedInstanceState.getString(SEARCH_TEXT))

View File

@ -30,7 +30,7 @@ import androidx.preference.PreferenceManager
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.transition.MaterialFadeThrough
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.R
import io.github.lime3ds.adapters.SetupAdapter
import io.github.lime3ds.databinding.FragmentSetupBinding
@ -60,7 +60,7 @@ class SetupFragment : Fragment() {
private lateinit var pages: MutableList<SetupPage>
private val preferences: SharedPreferences
get() = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
get() = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
companion object {
const val KEY_NEXT_VISIBILITY = "NextButtonVisibility"

View File

@ -26,7 +26,7 @@ import androidx.preference.PreferenceManager
import com.google.android.material.textfield.MaterialAutoCompleteTextView
import com.google.android.material.transition.MaterialSharedAxis
import kotlinx.coroutines.launch
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.HomeNavigationDirections
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
@ -92,7 +92,7 @@ class SystemFilesFragment : Fragment() {
homeViewModel.setNavigationVisibility(visible = false, animated = true)
homeViewModel.setStatusBarShadeVisibility(visible = false)
val preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
val preferences = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
if (!preferences.getBoolean(WARNING_SHOWN, false)) {
MessageDialogFragment.newInstance(
R.string.home_menu_warning,
@ -155,7 +155,7 @@ class SystemFilesFragment : Fragment() {
}
private fun reloadUi() {
val preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
val preferences = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
binding.switchRunSystemSetup.isChecked = SystemSaveGame.getIsSystemSetupNeeded()
binding.switchRunSystemSetup.setOnCheckedChangeListener { _, isChecked ->

View File

@ -21,7 +21,7 @@ import android.view.View
import android.view.View.OnTouchListener
import androidx.core.content.ContextCompat
import androidx.preference.PreferenceManager
import io.github.lime3ds.CitraApplication
import io.github.lime3ds.LimeApplication
import io.github.lime3ds.NativeLibrary
import io.github.lime3ds.R
import io.github.lime3ds.utils.EmulationMenuSettings
@ -778,7 +778,7 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex
companion object {
private val preferences
get() = PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext)
get() = PreferenceManager.getDefaultSharedPreferences(LimeApplication.appContext)
/**
* Resizes a [Bitmap] by a given scale factor

Some files were not shown because too many files have changed in this diff Show More