diff options
| author | JMC47 <JMC4789@gmail.com> | 2026-08-28 21:19:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-28 21:19:23 -0400 |
| commit | 28adf6dd886db508bcd361316ae94920bb395121 (patch) | |
| tree | e2f21a42196016e71ca0455a28e4b70008304f19 /Source/Android | |
| parent | 4f8af23db516d8b6e9cd00e7b261a65b026514a8 (diff) | |
| parent | 0bca7edf206f8ec58f35ecab351e2ef889fdee71 (diff) | |
Merge pull request #14831 from tom-pratt/netplay-crash-pre-api31
Fix netplay crash on pre API 31 devices
Diffstat (limited to 'Source/Android')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/theme/DolphinTheme.kt | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/theme/DolphinTheme.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/theme/DolphinTheme.kt index 4aa7e2055a..074856bad8 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/theme/DolphinTheme.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/theme/DolphinTheme.kt @@ -89,10 +89,6 @@ fun PreviewTheme( private fun Context.toDolphinColorScheme(isDark: Boolean): ColorScheme { fun attr(@AttrRes attr: Int) = Color(MaterialColors.getColor(this, attr, 0)) - val background = obtainStyledAttributes(intArrayOf(android.R.attr.colorBackground)).use { - Color(it.getColor(0, 0)) - } - return if (isDark) { darkColorScheme( primary = attr(AppCompatR.attr.colorPrimary), @@ -111,7 +107,7 @@ private fun Context.toDolphinColorScheme(isDark: Boolean): ColorScheme { onError = attr(MaterialR.attr.colorOnError), errorContainer = attr(MaterialR.attr.colorErrorContainer), onErrorContainer = attr(MaterialR.attr.colorOnErrorContainer), - background = background, + background = attr(android.R.attr.colorBackground), onBackground = attr(MaterialR.attr.colorOnBackground), surface = attr(MaterialR.attr.colorSurface), onSurface = attr(MaterialR.attr.colorOnSurface), @@ -140,7 +136,7 @@ private fun Context.toDolphinColorScheme(isDark: Boolean): ColorScheme { onError = attr(MaterialR.attr.colorOnError), errorContainer = attr(MaterialR.attr.colorErrorContainer), onErrorContainer = attr(MaterialR.attr.colorOnErrorContainer), - background = background, + background = attr(android.R.attr.colorBackground), onBackground = attr(MaterialR.attr.colorOnBackground), surface = attr(MaterialR.attr.colorSurface), onSurface = attr(MaterialR.attr.colorOnSurface), |
