use cargo examples semantically

This commit is contained in:
lif 2019-11-23 21:19:15 -08:00
parent 74952f0678
commit e0e02397a7
3 changed files with 7 additions and 12 deletions

View File

@ -13,13 +13,8 @@ failure = "^0.1"
libloading = "^0.5" libloading = "^0.5"
num_enum = "^0.4" num_enum = "^0.4"
structopt = "^0.3" structopt = "^0.3"
sdl2 = { version = "^0.32", optional = true }
crossbeam-channel = { version = "^0.4", optional = true }
[features] [dev-dependencies]
with-sdl2 = ["sdl2", "crossbeam-channel"] # example: sdl2_emulator
sdl2 = "^0.32"
[[bin]] crossbeam-channel = "^0.4"
name = "example"
path = "src/bin/example.rs"
required-features = ["with-sdl2"]

View File

@ -255,7 +255,7 @@ impl StaticCallbacks {
}; };
Self::clone_into_void(data, &si)? Self::clone_into_void(data, &si)?
} }
// TODO EnvCmd::GetCameraInterface => {}, // TODO (apathy) EnvCmd::GetCameraInterface => {},
EnvCmd::GetLogInterface => unsafe { EnvCmd::GetLogInterface => unsafe {
c_ext_handle_get_log_interface(data as *mut LogCallback) c_ext_handle_get_log_interface(data as *mut LogCallback)
} }
@ -271,7 +271,7 @@ impl StaticCallbacks {
}; };
Self::clone_into_void(data, &pc)? Self::clone_into_void(data, &pc)?
} }
// TODO EnvCmd::GetLocationInterface => {}, // TODO (apathy) EnvCmd::GetLocationInterface => {},
EnvCmd::GetCoreAssetsDirectory => { EnvCmd::GetCoreAssetsDirectory => {
Self::path_into_void(data, handler.get_core_assets_directory()?)? Self::path_into_void(data, handler.get_core_assets_directory()?)?
} }
@ -307,7 +307,7 @@ impl StaticCallbacks {
.collect(); .collect();
handler.set_controller_info(controller_info) handler.set_controller_info(controller_info)
} }
// TODO EnvCmd::SetMemoryMaps => {}, // TODO (experimental) EnvCmd::SetMemoryMaps => {},
EnvCmd::SetGeometry => { EnvCmd::SetGeometry => {
handler.set_geometry(Self::from_void::<GameGeometry>(data)?.clone()) handler.set_geometry(Self::from_void::<GameGeometry>(data)?.clone())
} }