From 7fa40791c64754cc3363783e5ca0fcb1eb52973a Mon Sep 17 00:00:00 2001 From: Producdevity Date: Sat, 12 Jul 2025 18:25:28 +0200 Subject: [PATCH] chore: removed unnecessary typecasting --- .../org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 200af1587f..9b275972b4 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 @@ -153,7 +153,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { titleId, customSettings, requireContext(), - requireActivity() as? FragmentActivity, + requireActivity(), driverViewModel ) @@ -170,7 +170,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { isCustomSettingsIntent = true - // Continue with game setup finishGameSetup() } catch (e: Exception) { @@ -184,7 +183,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } - // Return early to prevent synchronous continuation return } else { Log.error("[EmulationFragment] Custom settings intent missing required extras") @@ -205,9 +203,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } - if (!isCustomSettingsIntent) { - finishGameSetup() - } + if (!isCustomSettingsIntent) finishGameSetup() } /** @@ -221,6 +217,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { intentGame!! } } catch (e: NullPointerException) { + Log.error("[EmulationFragment] No game found in arguments or intent: ${e.message}") Toast.makeText( requireContext(), R.string.no_game_present,