mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-23 01:59:19 +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
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only show debug settings in debug builds
|
// Only show validation layer setting in debug builds
|
||||||
@Suppress("SENSELESS_COMPARISON")
|
@Suppress("SENSELESS_COMPARISON")
|
||||||
if (BuildConfig.BUILD_TYPE != "release")
|
if (BuildConfig.BUILD_TYPE != "release")
|
||||||
findPreference<Preference>("category_debug")?.isVisible = true
|
findPreference<Preference>("validation_layer")?.isVisible = true
|
||||||
|
|
||||||
if (!GpuDriverHelper.supportsForceMaxGpuClocks()) {
|
if (!GpuDriverHelper.supportsForceMaxGpuClocks()) {
|
||||||
val forceMaxGpuClocksPref = findPreference<CheckBoxPreference>("force_max_gpu_clocks")!!
|
val forceMaxGpuClocksPref = findPreference<CheckBoxPreference>("force_max_gpu_clocks")!!
|
||||||
@ -75,6 +75,16 @@ class GameSettingsFragment : PreferenceFragmentCompat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
findPreference<GpuDriverPreference>("gpu_driver")?.item = item
|
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) {
|
override fun onDisplayPreferenceDialog(preference : Preference) {
|
||||||
|
@ -48,10 +48,10 @@ class GlobalSettingsFragment : PreferenceFragmentCompat() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only show debug settings in debug builds
|
// Only show validation layer setting in debug builds
|
||||||
@Suppress("SENSELESS_COMPARISON")
|
@Suppress("SENSELESS_COMPARISON")
|
||||||
if (BuildConfig.BUILD_TYPE != "release")
|
if (BuildConfig.BUILD_TYPE != "release")
|
||||||
findPreference<Preference>("category_debug")?.isVisible = true
|
findPreference<Preference>("validation_layer")?.isVisible = true
|
||||||
|
|
||||||
if (!GpuDriverHelper.supportsForceMaxGpuClocks()) {
|
if (!GpuDriverHelper.supportsForceMaxGpuClocks()) {
|
||||||
val forceMaxGpuClocksPref = findPreference<CheckBoxPreference>("force_max_gpu_clocks")!!
|
val forceMaxGpuClocksPref = findPreference<CheckBoxPreference>("force_max_gpu_clocks")!!
|
||||||
|
@ -155,8 +155,7 @@
|
|||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="category_debug"
|
android:key="category_debug"
|
||||||
android:title="@string/debug"
|
android:title="@string/debug">
|
||||||
app:isPreferenceVisible="false">
|
|
||||||
<emu.skyline.preference.LogLevelPreference
|
<emu.skyline.preference.LogLevelPreference
|
||||||
android:defaultValue="2"
|
android:defaultValue="2"
|
||||||
android:entries="@array/log_level"
|
android:entries="@array/log_level"
|
||||||
@ -168,6 +167,7 @@
|
|||||||
android:summaryOff="@string/validation_layer_disabled"
|
android:summaryOff="@string/validation_layer_disabled"
|
||||||
android:summaryOn="@string/validation_layer_enabled"
|
android:summaryOn="@string/validation_layer_enabled"
|
||||||
app:key="validation_layer"
|
app:key="validation_layer"
|
||||||
|
app:isPreferenceVisible="false"
|
||||||
app:title="@string/validation_layer" />
|
app:title="@string/validation_layer" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
||||||
|
Loading…
Reference in New Issue
Block a user