From e0e02397a7e19a299bb32952c6e9d92c917e2d0e Mon Sep 17 00:00:00 2001 From: lif Date: Sat, 23 Nov 2019 21:19:15 -0800 Subject: [PATCH] use cargo examples semantically --- Cargo.toml | 13 ++++--------- src/bin/example.rs => examples/sdl2_emulator.rs | 0 src/retro/wrapper.rs | 6 +++--- 3 files changed, 7 insertions(+), 12 deletions(-) rename src/bin/example.rs => examples/sdl2_emulator.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 47434ec..723bc52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,8 @@ failure = "^0.1" libloading = "^0.5" num_enum = "^0.4" structopt = "^0.3" -sdl2 = { version = "^0.32", optional = true } -crossbeam-channel = { version = "^0.4", optional = true } -[features] -with-sdl2 = ["sdl2", "crossbeam-channel"] - -[[bin]] -name = "example" -path = "src/bin/example.rs" -required-features = ["with-sdl2"] +[dev-dependencies] +# example: sdl2_emulator +sdl2 = "^0.32" +crossbeam-channel = "^0.4" diff --git a/src/bin/example.rs b/examples/sdl2_emulator.rs similarity index 100% rename from src/bin/example.rs rename to examples/sdl2_emulator.rs diff --git a/src/retro/wrapper.rs b/src/retro/wrapper.rs index b31646e..0152361 100644 --- a/src/retro/wrapper.rs +++ b/src/retro/wrapper.rs @@ -255,7 +255,7 @@ impl StaticCallbacks { }; Self::clone_into_void(data, &si)? } - // TODO EnvCmd::GetCameraInterface => {}, + // TODO (apathy) EnvCmd::GetCameraInterface => {}, EnvCmd::GetLogInterface => unsafe { c_ext_handle_get_log_interface(data as *mut LogCallback) } @@ -271,7 +271,7 @@ impl StaticCallbacks { }; Self::clone_into_void(data, &pc)? } - // TODO EnvCmd::GetLocationInterface => {}, + // TODO (apathy) EnvCmd::GetLocationInterface => {}, EnvCmd::GetCoreAssetsDirectory => { Self::path_into_void(data, handler.get_core_assets_directory()?)? } @@ -307,7 +307,7 @@ impl StaticCallbacks { .collect(); handler.set_controller_info(controller_info) } - // TODO EnvCmd::SetMemoryMaps => {}, + // TODO (experimental) EnvCmd::SetMemoryMaps => {}, EnvCmd::SetGeometry => { handler.set_geometry(Self::from_void::(data)?.clone()) }