#7 Merge gihub patch - fix
parent
31db9558af
commit
5cff23e543
11
src/core.rs
11
src/core.rs
|
@ -325,15 +325,8 @@ pub struct EventManager<'a> {
|
||||||
|
|
||||||
impl<'a> EventManager<'a> {
|
impl<'a> EventManager<'a> {
|
||||||
|
|
||||||
pub fn detach(&self, event_type: EventType, registered_callback: *mut c_void) -> Result<(),()> {
|
pub fn detach(&self, event_type: EventType, registered_callback: *mut c_void) {
|
||||||
let result = unsafe {
|
unsafe { sys::libvlc_event_detach(self.ptr, event_type as i32, Some(event_manager_callback), registered_callback) }
|
||||||
sys::libvlc_event_detach(self.ptr, event_type as i32, event_manager_callback, registered_callback)
|
|
||||||
};
|
|
||||||
if result == 0 {
|
|
||||||
Ok(())
|
|
||||||
} else {
|
|
||||||
Err(())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn attach<F>(&self, event_type: EventType, callback: F) -> Result<*mut c_void, ()>
|
pub fn attach<F>(&self, event_type: EventType, callback: F) -> Result<*mut c_void, ()>
|
||||||
|
|
Loading…
Reference in New Issue