From 3c1992bc11d266841cf780419bc6ad435871e74e Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Wed, 13 Aug 2025 12:44:28 -0400 Subject: [PATCH] last try --- .../main/java/com/starship/android/MainActivity.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/starship/android/MainActivity.java b/android/app/src/main/java/com/starship/android/MainActivity.java index 3ced02e6..f467dd34 100644 --- a/android/app/src/main/java/com/starship/android/MainActivity.java +++ b/android/app/src/main/java/com/starship/android/MainActivity.java @@ -235,12 +235,17 @@ setupControllerOverlay(); } else { Log.i(TAG, "sf64.o2r found in internal storage, game should start normally."); } + + // Signal to C++ that setup is complete + setupLatch.countDown(); } public static void waitForSetupFromNative() { - // This method is called from C++ but we don't need it anymore - // The C++ polling system handles waiting for the file - Log.i(TAG, "waitForSetupFromNative() called from C++ - using polling system"); + try { + setupLatch.await(); + } catch (InterruptedException ignored) { + Log.w(TAG, "waitForSetupFromNative interrupted"); + } } // ===== Asset seeding (optional, safe if assets not present) =====