Resolve a relative asset path to the app bundle path.
(path: &str)
| 26 | |
| 27 | /// Resolve a relative asset path to the app bundle path. |
| 28 | fn resolve_path(path: &str) -> String { |
| 29 | if path.starts_with('/') { |
| 30 | return path.to_string(); |
| 31 | } |
| 32 | unsafe { |
| 33 | if let Some(ref base) = BUNDLE_PATH { |
| 34 | format!("{}/{}", base, path) |
| 35 | } else { |
| 36 | path.to_string() |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | fn engine() -> &'static mut EngineState { |
| 42 | unsafe { ENGINE.get_mut().expect("Engine not initialized") } |
no outgoing calls
no test coverage detected