diff options
| author | Matthew Collins <[email protected]> | 2019-03-16 10:57:21 +0000 |
|---|---|---|
| committer | Matthew Collins <[email protected]> | 2019-03-16 10:57:21 +0000 |
| commit | 6bcb5567baa03e8e4b00569a3d3634f887482798 (patch) | |
| tree | 9dc47830f5b0bdf6f0c92861086b8ec81703c8a5 /src/utils.rs | |
| parent | Add basic leaderboard handling (Work on #4) (diff) | |
| download | archived-steamworks-rs-6bcb5567baa03e8e4b00569a3d3634f887482798.tar.xz archived-steamworks-rs-6bcb5567baa03e8e4b00569a3d3634f887482798.zip | |
Generate the bindings from the provided json file instead of bindgen (Fixes #3)
Allow us to remove the hack for accessing packed structs
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/utils.rs b/src/utils.rs index 43e167b..34ba6c9 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -18,7 +18,7 @@ impl <Manager> Utils<Manager> { /// Returns the app ID of the current process pub fn app_id(&self) -> AppId { unsafe { - AppId(sys::SteamAPI_ISteamUtils_GetAppID(self.utils)) + AppId(sys::SteamAPI_ISteamUtils_GetAppID(self.utils).0) } } @@ -39,10 +39,10 @@ impl <Manager> Utils<Manager> { pub fn set_overlay_notification_position(&self, position: NotificationPosition) { unsafe { let position = match position { - NotificationPosition::TopLeft => sys::ENotificationPosition_k_EPositionTopLeft, - NotificationPosition::TopRight => sys::ENotificationPosition_k_EPositionTopRight, - NotificationPosition::BottomLeft => sys::ENotificationPosition_k_EPositionBottomLeft, - NotificationPosition::BottomRight => sys::ENotificationPosition_k_EPositionBottomRight, + NotificationPosition::TopLeft => sys::ENotificationPosition::EPositionTopLeft, + NotificationPosition::TopRight => sys::ENotificationPosition::EPositionTopRight, + NotificationPosition::BottomLeft => sys::ENotificationPosition::EPositionBottomLeft, + NotificationPosition::BottomRight => sys::ENotificationPosition::EPositionBottomRight, }; sys::SteamAPI_ISteamUtils_SetOverlayNotificationPosition(self.utils, position); } |