aboutsummaryrefslogtreecommitdiff
path: root/steamworks-sys
diff options
context:
space:
mode:
authorMatthew Collins <[email protected]>2018-02-27 12:18:56 +0000
committerMatthew Collins <[email protected]>2018-02-27 12:18:56 +0000
commitdb7c3f7bcd5f1e804345bf90591f3e360ef456fb (patch)
tree621b19bddf5078ef8c5d763575eeb6745888cb64 /steamworks-sys
parentDerive `Ord`/`Eq` for SteamId (diff)
downloadsteamworks-rs-db7c3f7bcd5f1e804345bf90591f3e360ef456fb.tar.xz
steamworks-rs-db7c3f7bcd5f1e804345bf90591f3e360ef456fb.zip
Add basic steam user accessor
Diffstat (limited to 'steamworks-sys')
-rw-r--r--steamworks-sys/src/lib.cpp3
-rw-r--r--steamworks-sys/src/lib.rs5
2 files changed, 7 insertions, 1 deletions
diff --git a/steamworks-sys/src/lib.cpp b/steamworks-sys/src/lib.cpp
index 9994909..75c399a 100644
--- a/steamworks-sys/src/lib.cpp
+++ b/steamworks-sys/src/lib.cpp
@@ -99,4 +99,5 @@ extern "C" ISteamMatchmaking *steam_rust_get_matchmaking() {
}
extern "C" ISteamUtils *steam_rust_get_utils() { return SteamUtils(); }
extern "C" ISteamApps *steam_rust_get_apps() { return SteamApps(); }
-extern "C" ISteamFriends *steam_rust_get_friends() { return SteamFriends(); } \ No newline at end of file
+extern "C" ISteamFriends *steam_rust_get_friends() { return SteamFriends(); }
+extern "C" ISteamUser *steam_rust_get_user() { return SteamUser(); } \ No newline at end of file
diff --git a/steamworks-sys/src/lib.rs b/steamworks-sys/src/lib.rs
index 604d12e..db642ac 100644
--- a/steamworks-sys/src/lib.rs
+++ b/steamworks-sys/src/lib.rs
@@ -17,6 +17,8 @@ pub struct ISteamApps(c_void);
pub struct ISteamFriends(c_void);
#[repr(C)]
pub struct ISteamMatchmaking(c_void);
+#[repr(C)]
+pub struct ISteamUser(c_void);
pub type HSteamPipe = i32;
pub type HSteamUser = i32;
@@ -215,6 +217,7 @@ extern "C" {
pub fn steam_rust_get_utils() -> *mut ISteamUtils;
pub fn steam_rust_get_apps() -> *mut ISteamApps;
pub fn steam_rust_get_friends() -> *mut ISteamFriends;
+ pub fn steam_rust_get_user() -> *mut ISteamUser;
//
pub fn SteamAPI_Init() -> u8;
@@ -255,4 +258,6 @@ extern "C" {
pub fn SteamAPI_ISteamMatchmaking_CreateLobby(instance: *mut ISteamMatchmaking, lobby_ty: LobbyType, max_members: c_int) -> SteamAPICall;
pub fn SteamAPI_ISteamMatchmaking_RequestLobbyList(instance: *mut ISteamMatchmaking) -> SteamAPICall;
pub fn SteamAPI_ISteamMatchmaking_GetLobbyByIndex(instance: *mut ISteamMatchmaking, lobby: c_int) -> u64;
+
+ pub fn SteamAPI_ISteamUser_GetSteamID(instance: *mut ISteamUser) -> u64;
}