mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 14:39:18 +01:00
Only hide validation_layer
setting on release instead of debug category
This commit is contained in:
parent
b2228a93da
commit
485bd2031c
@ -62,10 +62,10 @@ class GameSettingsFragment : PreferenceFragmentCompat() {
|
||||
true
|
||||
}
|
||||
|
||||
// Only show debug settings in debug builds
|
||||
// Only show validation layer setting in debug builds
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
if (BuildConfig.BUILD_TYPE != "release")
|
||||
findPreference<Preference>("category_debug")?.isVisible = true
|
||||
findPreference<Preference>("validation_layer")?.isVisible = true
|
||||
|
||||
if (!GpuDriverHelper.supportsForceMaxGpuClocks()) {
|
||||
val forceMaxGpuClocksPref = findPreference<CheckBoxPreference>("force_max_gpu_clocks")!!
|
||||
@ -75,6 +75,16 @@ class GameSettingsFragment : PreferenceFragmentCompat() {
|
||||
}
|
||||
|
||||
findPreference<GpuDriverPreference>("gpu_driver")?.item = item
|
||||
|
||||
// Hide settings that don't support per-game configuration
|
||||
findPreference<Preference>("profile_picture_value")?.isVisible = false
|
||||
findPreference<Preference>("log_level")?.isVisible = false
|
||||
|
||||
// TODO: remove this once we have more settings under the debug category
|
||||
// Avoid showing the debug category if no settings under it are visible
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
if (BuildConfig.BUILD_TYPE == "release")
|
||||
findPreference<PreferenceCategory>("category_debug")?.isVisible = false
|
||||
}
|
||||
|
||||
override fun onDisplayPreferenceDialog(preference : Preference) {
|
||||
|
@ -48,10 +48,10 @@ class GlobalSettingsFragment : PreferenceFragmentCompat() {
|
||||
true
|
||||
}
|
||||
|
||||
// Only show debug settings in debug builds
|
||||
// Only show validation layer setting in debug builds
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
if (BuildConfig.BUILD_TYPE != "release")
|
||||
findPreference<Preference>("category_debug")?.isVisible = true
|
||||
findPreference<Preference>("validation_layer")?.isVisible = true
|
||||
|
||||
if (!GpuDriverHelper.supportsForceMaxGpuClocks()) {
|
||||
val forceMaxGpuClocksPref = findPreference<CheckBoxPreference>("force_max_gpu_clocks")!!
|
||||
|
@ -155,8 +155,7 @@
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="category_debug"
|
||||
android:title="@string/debug"
|
||||
app:isPreferenceVisible="false">
|
||||
android:title="@string/debug">
|
||||
<emu.skyline.preference.LogLevelPreference
|
||||
android:defaultValue="2"
|
||||
android:entries="@array/log_level"
|
||||
@ -168,6 +167,7 @@
|
||||
android:summaryOff="@string/validation_layer_disabled"
|
||||
android:summaryOn="@string/validation_layer_enabled"
|
||||
app:key="validation_layer"
|
||||
app:isPreferenceVisible="false"
|
||||
app:title="@string/validation_layer" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
Loading…
Reference in New Issue
Block a user