From 53e2cc5fbcdca5b7e2d6816577fe02e9abf7b3a0 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sat, 8 Nov 2025 14:54:47 -0500 Subject: [PATCH] feat: enhance connection handling in sdxr_start with error logging --- bridge/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bridge/src/lib.rs b/bridge/src/lib.rs index 414a92c..89d0a62 100644 --- a/bridge/src/lib.rs +++ b/bridge/src/lib.rs @@ -168,7 +168,16 @@ pub extern "C" fn sdxr_start(app_id: *const std::os::raw::c_char) -> i32 { // Run the client - asteroids will manage the projector and call reify() each frame // This blocks until the client disconnects or is shut down - ast::client::run::(&[]).await; + match stardust_xr_fusion::client::Client::connect().await { + Ok(client) => { + println!("[bridge] Connected to Stardust server successfully"); + // Now try to run the full asteroids client + ast::client::run::(&[]).await; + }, + Err(e) => { + println!("[bridge] Failed to connect to Stardust server: {:?}", e); + } + } println!("[bridge] Client disconnected"); let _ = cmd_task;