Resolve a relative asset path to the app bundle path.
(path: &str)
| 109 | |
| 110 | /// Resolve a relative asset path to the app bundle path. |
| 111 | fn resolve_path(path: &str) -> String { |
| 112 | if path.starts_with('/') { |
| 113 | return path.to_string(); |
| 114 | } |
| 115 | unsafe { |
| 116 | if let Some(ref base) = BUNDLE_PATH { |
| 117 | format!("{}/{}", base, path) |
| 118 | } else { |
| 119 | path.to_string() |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | fn engine() -> &'static mut EngineState { |
| 125 | unsafe { ENGINE.get_mut().expect("Engine not initialized") } |
no outgoing calls
no test coverage detected