stubs for ENVIRONMENT_GET_PERF_INTERFACE
This commit is contained in:
parent
604b3f03f8
commit
f4335e3f11
|
@ -225,7 +225,18 @@ impl StaticCallbacks {
|
||||||
// TODO EnvCmd::GetSensorInterface => {},
|
// TODO EnvCmd::GetSensorInterface => {},
|
||||||
// TODO EnvCmd::GetCameraInterface => {},
|
// TODO EnvCmd::GetCameraInterface => {},
|
||||||
EnvCmd::GetLogInterface => unsafe { c_ext_handle_get_log_interface(data as *mut LogCallback) },
|
EnvCmd::GetLogInterface => unsafe { c_ext_handle_get_log_interface(data as *mut LogCallback) },
|
||||||
// TODO EnvCmd::GetPerfInterface => {},
|
EnvCmd::GetPerfInterface => {
|
||||||
|
let pc = PerfCallback {
|
||||||
|
get_time_usec: Self::perf_get_time_usec_cb,
|
||||||
|
get_cpu_features: Self::perf_get_cpu_features_cb,
|
||||||
|
get_perf_counter: Self::perf_get_counter_cb,
|
||||||
|
perf_register: Self::perf_register_cb,
|
||||||
|
perf_start: Self::perf_start_cb,
|
||||||
|
perf_stop: Self::perf_stop_cb,
|
||||||
|
perf_log: Self::perf_log_cb,
|
||||||
|
};
|
||||||
|
Self::clone_into_void(data, &pc)?
|
||||||
|
},
|
||||||
// TODO EnvCmd::GetLocationInterface => {},
|
// TODO EnvCmd::GetLocationInterface => {},
|
||||||
EnvCmd::GetCoreAssetsDirectory => Self::path_into_void(data, handler.get_core_assets_directory()?)?,
|
EnvCmd::GetCoreAssetsDirectory => Self::path_into_void(data, handler.get_core_assets_directory()?)?,
|
||||||
EnvCmd::GetSaveDirectory => Self::path_into_void(data, handler.get_save_directory()?)?,
|
EnvCmd::GetSaveDirectory => Self::path_into_void(data, handler.get_save_directory()?)?,
|
||||||
|
@ -321,13 +332,20 @@ impl StaticCallbacks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" fn set_rumble_state_cb(port: c_uint, effect: RumbleEffect, strength: u16) -> bool {
|
extern "C" fn set_rumble_state_cb(port: c_uint, effect: RumbleEffect, strength: u16) -> bool {
|
||||||
match unsafe { CB_SINGLETON.handler.as_mut() } {
|
match unsafe { CB_SINGLETON.handler.as_mut() } {
|
||||||
Some(cb) => cb.set_rumble_state(port, effect, strength),
|
Some(cb) => cb.set_rumble_state(port, effect, strength),
|
||||||
None => false,
|
None => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO: trait methods
|
||||||
|
extern "C" fn perf_get_time_usec_cb() -> Time { 0 }
|
||||||
|
extern "C" fn perf_get_counter_cb() -> PerfTick { 0 }
|
||||||
|
extern "C" fn perf_get_cpu_features_cb() -> u64 { 0 }
|
||||||
|
extern "C" fn perf_log_cb() {}
|
||||||
|
extern "C" fn perf_register_cb(_counter: *mut PerfCounter) {}
|
||||||
|
extern "C" fn perf_start_cb(_counter: *mut PerfCounter) {}
|
||||||
|
extern "C" fn perf_stop_cb(_counter: *mut PerfCounter) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct LibretroWrapper {
|
pub struct LibretroWrapper {
|
||||||
|
|
Loading…
Reference in New Issue