From 6a425e95cb5feffb4938df7cf155397e8f4ac85e Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 26 Sep 2023 18:50:58 -0400 Subject: android: Don't wait for post to update input overlay visibility --- .../java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/android/app') diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index aa9cea442..39b2a961b 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -310,19 +310,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { binding.drawerLayout.close() } if (EmulationMenuSettings.showOverlay) { - binding.surfaceInputOverlay.post { - binding.surfaceInputOverlay.visibility = View.INVISIBLE - } + binding.surfaceInputOverlay.visibility = View.INVISIBLE } } else { if (EmulationMenuSettings.showOverlay && emulationViewModel.emulationStarted.value) { - binding.surfaceInputOverlay.post { - binding.surfaceInputOverlay.visibility = View.VISIBLE - } + binding.surfaceInputOverlay.visibility = View.VISIBLE } else { - binding.surfaceInputOverlay.post { - binding.surfaceInputOverlay.visibility = View.INVISIBLE - } + binding.surfaceInputOverlay.visibility = View.INVISIBLE } if (!isInFoldableLayout) { if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { -- cgit v1.2.3