mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 12:55:45 +00:00
[android] fix firmware overlay multiple updates (#252)
Signed-off-by: Aleksandr Popovich <alekpopo@pm.me> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/252 Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Co-committed-by: Aleksandr Popovich <alekpopo@pm.me>
This commit is contained in:
parent
cb3521272f
commit
aeb2aec13b
5 changed files with 10 additions and 8 deletions
|
@ -361,7 +361,7 @@ class NetPlayDialog(context: Context) : BottomSheetDialog(context) {
|
|||
|
||||
// setup listeners etc
|
||||
val roomNameWatcher = object : TextValidatorWatcher(
|
||||
binding.btnConfirm, // TODO(alekpop, crueter): Figure out a better way to deal with this?
|
||||
binding.btnConfirm,
|
||||
binding.layoutRoomName,
|
||||
context.getString(
|
||||
R.string.multiplayer_room_name_error
|
||||
|
|
|
@ -56,6 +56,7 @@ class SettingsFragmentPresenter(
|
|||
}
|
||||
|
||||
val pairedSettingKey = item.setting.pairedSettingKey
|
||||
|
||||
if (pairedSettingKey.isNotEmpty()) {
|
||||
val pairedSettingValue = NativeConfig.getBoolean(
|
||||
pairedSettingKey,
|
||||
|
@ -220,7 +221,6 @@ class SettingsFragmentPresenter(
|
|||
|
||||
private fun addGraphicsSettings(sl: ArrayList<SettingsItem>) {
|
||||
sl.apply {
|
||||
// TODO(crueter): reorganize this, this is awful
|
||||
add(HeaderSetting(R.string.backend))
|
||||
|
||||
add(IntSetting.RENDERER_ACCURACY.key)
|
||||
|
@ -436,7 +436,6 @@ class SettingsFragmentPresenter(
|
|||
}
|
||||
}
|
||||
|
||||
// TODO(alekpop): sort these into headers.
|
||||
private fun addEdenVeilSettings(sl: ArrayList<SettingsItem>) {
|
||||
sl.apply {
|
||||
add(HeaderSetting(R.string.veil_extensions))
|
||||
|
|
|
@ -22,6 +22,7 @@ class SwitchSettingViewHolder(val binding: ListItemSettingSwitchBinding, adapter
|
|||
binding.textSettingDescription.setVisible(setting.description.isNotEmpty())
|
||||
binding.textSettingDescription.text = setting.description
|
||||
|
||||
// TODO(alekpop): A race condition occurs here if the button is clicked too fast
|
||||
binding.switchWidget.setOnCheckedChangeListener(null)
|
||||
binding.switchWidget.isChecked = setting.getIsChecked(setting.needsRuntimeGlobal)
|
||||
binding.switchWidget.setOnCheckedChangeListener { _: CompoundButton, _: Boolean ->
|
||||
|
|
|
@ -105,6 +105,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
private var isInFoldableLayout = false
|
||||
|
||||
private lateinit var gpuModel: String
|
||||
private lateinit var fwVersion: String
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
|
@ -186,6 +187,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
}
|
||||
|
||||
gpuModel = GpuDriverHelper.getGpuModel().toString()
|
||||
fwVersion = NativeLibrary.firmwareVersion()
|
||||
|
||||
binding.surfaceEmulation.holder.addCallback(this)
|
||||
binding.doneControlConfig.setOnClickListener { stopConfiguringControls() }
|
||||
|
@ -755,7 +757,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
|
||||
if (BooleanSetting.SHOW_FW_VERSION.getBoolean(NativeConfig.isPerGameConfigLoaded())) {
|
||||
if (sb.isNotEmpty()) sb.append(" | ")
|
||||
sb.append(NativeLibrary.firmwareVersion())
|
||||
sb.append(fwVersion)
|
||||
}
|
||||
|
||||
binding.showSocOverlayText.text = sb.toString()
|
||||
|
|
|
@ -127,22 +127,22 @@ namespace AndroidSettings {
|
|||
Settings::Setting<bool> show_device_model{linkage, true, "show_device_model",
|
||||
Settings::Category::Overlay,
|
||||
Settings::Specialization::Default, true, true,
|
||||
&show_performance_overlay};
|
||||
&show_soc_overlay};
|
||||
|
||||
Settings::Setting<bool> show_gpu_model{linkage, true, "show_gpu_model",
|
||||
Settings::Category::Overlay,
|
||||
Settings::Specialization::Default, true, true,
|
||||
&show_performance_overlay};
|
||||
&show_soc_overlay};
|
||||
|
||||
Settings::Setting<bool> show_soc_model{linkage, true, "show_soc_model",
|
||||
Settings::Category::Overlay,
|
||||
Settings::Specialization::Default, true, true,
|
||||
&show_performance_overlay};
|
||||
&show_soc_overlay};
|
||||
|
||||
Settings::Setting<bool> show_fw_version{linkage, true, "show_firmware_version",
|
||||
Settings::Category::Overlay,
|
||||
Settings::Specialization::Default, true, true,
|
||||
&show_performance_overlay};
|
||||
&show_soc_overlay};
|
||||
|
||||
Settings::Setting<bool> soc_overlay_background{linkage, false, "soc_overlay_background",
|
||||
Settings::Category::Overlay,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue