MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_end_drawing

Function bloom_end_drawing

native/android/src/lib.rs:302–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

300
301#[no_mangle]
302pub extern "C" fn bloom_end_drawing() {
303 let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
304 engine().end_frame();
305 }));
306 if let Err(e) = result {
307 let msg = if let Some(s) = e.downcast_ref::<&str>() {
308 s.to_string()
309 } else if let Some(s) = e.downcast_ref::<String>() {
310 s.clone()
311 } else {
312 format!("unknown panic: {:?}", e.type_id())
313 };
314 // Write to file since eprintln doesn't reach logcat on Android
315 static mut LOGGED: bool = false;
316 unsafe {
317 if !LOGGED {
318 LOGGED = true;
319 let path = resolve_path("bloom_panic.txt");
320 let _ = std::fs::write(&path, format!("end_drawing panic: {}\n", msg));
321 }
322 }
323 }
324}
325
326// ============================================================
327// Audio (Oboe / AAudio)

Callers

nothing calls this directly

Calls 4

cloneMethod · 0.80
engineFunction · 0.70
resolve_pathFunction · 0.70
end_frameMethod · 0.45

Tested by

no test coverage detected