ferretro/ferretro_base/examples/core_info.rs

13 lines
478 B
Rust

use ferretro_base::retro::loading::LibretroApi;
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
for core_path in std::env::args().skip(1) {
println!("{}:", core_path);
let lib = libloading::Library::new(&core_path)?;
let api = LibretroApi::from_library(lib)?;
let info = api.get_system_info();
println!("\t{} {} {:?}", info.library_name, info.library_version, info.valid_extensions);
}
Ok(())
}