@@ -905,21 +905,7 @@ pub fn entry_point() {
905905
906906#[ allow( unused) ]
907907fn xr_runtime_now ( xr_instance : & xr:: Instance , platform : Platform ) -> Option < Duration > {
908- let time_nanos = {
909- #[ cfg( target_os = "android" ) ]
910- if platform == Platform :: Pico {
911- let mut ts_now = libc:: timespec {
912- tv_sec : 0 ,
913- tv_nsec : 0 ,
914- } ;
915- unsafe { libc:: clock_gettime ( libc:: CLOCK_MONOTONIC , & mut ts_now) } ;
916- ts_now. tv_sec * 1_000_000_000 + ts_now. tv_nsec
917- } else {
918- xr_instance. now ( ) . ok ( ) ?. as_nanos ( )
919- }
920- #[ cfg( not( target_os = "android" ) ) ]
921- xr_instance. now ( ) . ok ( ) ?. as_nanos ( )
922- } ;
908+ let time_nanos = xr_instance. now ( ) . ok ( ) ?. as_nanos ( ) ;
923909
924910 ( time_nanos > 0 ) . then ( || Duration :: from_nanos ( time_nanos as _ ) )
925911}
@@ -929,14 +915,7 @@ fn xr_runtime_now(xr_instance: &xr::Instance, platform: Platform) -> Option<Dura
929915fn android_main ( app : android_activity:: AndroidApp ) {
930916 use android_activity:: { InputStatus , MainEvent , PollEvent } ;
931917
932- let rendering_thread = thread:: spawn ( || {
933- // workaround for the Pico runtime
934- let context = ndk_context:: android_context ( ) ;
935- let vm = unsafe { jni:: JavaVM :: from_raw ( context. vm ( ) . cast ( ) ) } . unwrap ( ) ;
936- let _env = vm. attach_current_thread ( ) . unwrap ( ) ;
937-
938- entry_point ( ) ;
939- } ) ;
918+ let rendering_thread = thread:: spawn ( entry_point) ;
940919
941920 let mut should_quit = false ;
942921 while !should_quit {
0 commit comments