Skip to content

Commit faa51c9

Browse files
committed
full send interpolation
1 parent 2e71ae4 commit faa51c9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ impl SimConnector {
8181
}
8282
}
8383

84+
pub fn subcribe_to_system_event(&self, event_id: SIMCONNECT_CLIENT_EVENT_ID, event_name: &str) -> bool {
85+
unsafe {
86+
let result = SimConnect_SubscribeToSystemEvent(self.sim_connect_handle, event_id, as_c_string!(event_name));
87+
return result == 0;
88+
}
89+
}
90+
8491
pub fn get_next_message(&self) -> Result<DispatchResult, &str> {
8592
let mut data_buf: *mut SIMCONNECT_RECV = ptr::null_mut();
8693

0 commit comments

Comments
 (0)