Skip to content

Commit

Permalink
added GameOverlayActivated Callback
Browse files Browse the repository at this point in the history
  • Loading branch information
hyultis committed Jan 23, 2024
1 parent a204e81 commit 3129bdb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/friends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,25 @@ unsafe impl Callback for PersonaStateChange {
}
}

#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct GameOverlayActivated {
pub active: u8
}

unsafe impl Callback for GameOverlayActivated {
const ID: i32 = CALLBACK_BASE_ID + 31;
const SIZE: i32 = std::mem::size_of::<sys::GameOverlayActivated_t>() as i32;

unsafe fn from_raw(raw: *mut c_void) -> Self {
let val = &mut *(raw as *mut sys::GameOverlayActivated_t);
Self {
active: val.m_bActive,
}
}
}


#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct GameLobbyJoinRequested {
Expand Down

0 comments on commit 3129bdb

Please sign in to comment.