diff options
author | t895 <clombardo169@gmail.com> | 2023-12-29 22:38:15 +0100 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2023-12-30 21:11:36 +0100 |
commit | 278cafb76c016427c9e524a38cd0b42caf25d72a (patch) | |
tree | e3b01a9da62f9cd8a921ccae7d26df0a24cf9406 | |
parent | frontend_common: config: Do not count "." as a special character (diff) | |
download | yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.tar yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.tar.gz yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.tar.bz2 yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.tar.lz yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.tar.xz yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.tar.zst yuzu-278cafb76c016427c9e524a38cd0b42caf25d72a.zip |
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt index 792f6a253..6f7f40e43 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt @@ -5,6 +5,7 @@ package org.yuzu.yuzu_emu.utils import android.content.res.Configuration import android.graphics.Color +import android.os.Build import androidx.annotation.ColorInt import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatDelegate @@ -23,7 +24,13 @@ object ThemeHelper { setThemeMode(activity) when (Theme.from(IntSetting.THEME.getInt())) { Theme.Default -> activity.setTheme(R.style.Theme_Yuzu_Main) - Theme.MaterialYou -> activity.setTheme(R.style.Theme_Yuzu_Main_MaterialYou) + Theme.MaterialYou -> { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + activity.setTheme(R.style.Theme_Yuzu_Main_MaterialYou) + } else { + activity.setTheme(R.style.Theme_Yuzu_Main) + } + } } // Using a specific night mode check because this could apply incorrectly when using the |