diff options
| author | Matthew Collins <[email protected]> | 2018-05-05 15:46:12 +0100 |
|---|---|---|
| committer | Matthew Collins <[email protected]> | 2018-05-05 15:46:12 +0100 |
| commit | 5ef3f6e17cd14d452cfcdbb8a30abf61e513e84d (patch) | |
| tree | e667ed1dccc3d3ac0df83e8c66b76dd5dc0771e8 /steamworks-sys | |
| parent | Minor bump due to slight mistake with last publish (diff) | |
| download | steamworks-rs-5ef3f6e17cd14d452cfcdbb8a30abf61e513e84d.tar.xz steamworks-rs-5ef3f6e17cd14d452cfcdbb8a30abf61e513e84d.zip | |
Rework how the sys crate is generated
Due to packing issues with steam's structs we use wrapper methods
to access the fields and create the structs.
Diffstat (limited to 'steamworks-sys')
| -rw-r--r-- | steamworks-sys/Cargo.toml | 11 | ||||
| -rw-r--r-- | steamworks-sys/build.rs | 209 | ||||
| -rw-r--r-- | steamworks-sys/src/lib.cpp | 4 | ||||
| -rw-r--r-- | steamworks-sys/src/lib.rs | 229 | ||||
| -rw-r--r-- | steamworks-sys/wrapper.hpp | 3 |
5 files changed, 234 insertions, 222 deletions
diff --git a/steamworks-sys/Cargo.toml b/steamworks-sys/Cargo.toml index 96edbe7..9b4960e 100644 --- a/steamworks-sys/Cargo.toml +++ b/steamworks-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "steamworks-sys" -version = "0.2.3" +version = "0.3.0" authors = ["Thinkofname"] build = "build.rs" description = "Provides raw bindings to the steamworks sdk" @@ -8,6 +8,9 @@ license = "MIT / Apache-2.0" repository = "https://github.com/Thinkofname/steamworks-rs" documentation = "https://docs.rs/steamworks-sys" +[package.metadata.docs.rs] +features = [ "docs-only" ] + [features] default = [] @@ -20,6 +23,8 @@ libc = "0.2.36" [build-dependencies] cc = "1.0.4" +bindgen = "0.36.0" +serde = "1.0.37" +serde_derive = "1.0.37" +serde_json = "1.0.14" -[package.metadata.docs.rs] -features = [ "docs-only" ]
\ No newline at end of file diff --git a/steamworks-sys/build.rs b/steamworks-sys/build.rs index 8dbf861..2aa6c42 100644 --- a/steamworks-sys/build.rs +++ b/steamworks-sys/build.rs @@ -1,6 +1,32 @@ - +extern crate bindgen; extern crate cc; +extern crate serde_json; +#[macro_use] +extern crate serde_derive; + +#[derive(Deserialize)] +struct SteamApi { + structs: Vec<SteamStruct>, + enums: Vec<SteamEnum>, +} + +#[derive(Deserialize)] +struct SteamEnum { + enumname: String, +} + +#[derive(Deserialize)] +struct SteamStruct { + #[serde(rename = "struct")] + struct_: String, + fields: Vec<SteamField>, +} +#[derive(Deserialize)] +struct SteamField { + fieldname: String, + fieldtype: String, +} #[cfg(feature = "docs-only")] fn main() {} @@ -8,8 +34,12 @@ fn main() {} #[cfg(not(feature = "docs-only"))] fn main() { use std::env; - use std::path::Path; + use std::path::{Path, PathBuf}; + use std::io::Write; + use std::fmt::Write as FWrite; + use std::fs::File; + let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); let sdk_loc = env::var("STEAM_SDK_LOCATION") .expect("STEAM_SDK_LOCATION must be set"); let sdk_loc = Path::new(&sdk_loc); @@ -37,9 +67,184 @@ fn main() { println!("cargo:rustc-link-search={}", path.display()); println!("cargo:rustc-link-lib=dylib={}", lib); + let mut builder = bindgen::builder() + .header("wrapper.hpp") + .clang_arg(format!("-I{}", sdk_loc.join("public/steam").display())) + .ctypes_prefix("libc") + .rustfmt_bindings(false); + + // Steamworks uses packed structs making them hard to work + // with normally + let steam_api: SteamApi = serde_json::from_reader(File::open(sdk_loc.join("public/steam/steam_api.json")).unwrap()) + .unwrap(); + + let mut cpp_wrapper = String::from(r#" +#include <steam_api.h> +#include <steam_gameserver.h> +#include <stdint.h> +extern "C" { + "#); + + fn field_type_fix(fty: &str) -> (&str, String){ + let fty = { + if fty.contains("enum") { + fty.trim_left_matches("enum ") + } else if fty.contains("struct") { + fty.trim_left_matches("struct ") + } else if fty == "_Bool" { + "bool" + } else { + fty + } + }; + let fty_rust = if fty == "const char*" || fty == "*const char" || fty == "const char *" { + "*const libc::c_char".to_owned() + } else if fty == "char*" { + "*mut libc::c_char".to_owned() + } else if fty == "const char **" { + "*mut *const libc::c_char".to_owned() + }else if fty.ends_with("*") { + if fty.starts_with("const") { + let trimmed = fty.trim_left_matches("const ").trim_right_matches("*"); + format!("*const {}", trimmed) + } else { + let trimmed = fty.trim_right_matches("*"); + format!("*mut {}", trimmed) + } + } else if fty.contains("[") { + panic!("Unsupported field type array") + } else if fty == "class CSteamID" { + "u64".to_owned() + } else if fty == "class CGameID" { + "u64".to_owned() + } else if fty == "int" { + "libc::c_int".to_owned() + } else if fty == "float" { + "libc::c_float".to_owned() + } else if fty == "double" { + "libc::c_double".to_owned() + } else { + fty.to_owned() + }; + (fty, fty_rust) + } + + for SteamStruct{struct_: ref ty, ref fields} in &steam_api.structs { + if ty.contains("::") || !ty.ends_with("_t") || fields.iter().any(|v| v.fieldtype.contains('[')) + || ty.chars().next().map_or(true, |v| v.is_lowercase()) + || ty.starts_with("GSStats") + { + continue; + } + builder = builder.whitelist_type(ty); + + // Make a raw constructor + writeln!(cpp_wrapper, r#"{ty} __rust_helper_raw__{ty}() {{ + {ty} created_type = {{}}; + return created_type; + }}"#, ty = ty).unwrap(); + builder = builder.raw_line(format!(r#" + extern "C" {{ + fn __rust_helper_raw__{ty}() -> {ty}; + }} + pub unsafe fn create_empty_{ty}() -> {ty} {{ + __rust_helper_raw__{ty}() + }} + "#, ty = ty)); + + // Make a typed constructor + let mut typed_constr_extern = String::new(); + let mut typed_constr_wrap = String::new(); + write!(cpp_wrapper, r#"{ty} __rust_helper_typed__{ty}("#, ty = ty).unwrap(); + write!(typed_constr_extern, r#"extern "C" {{ + fn __rust_helper_typed__{ty}("#, ty = ty).unwrap(); + write!(typed_constr_wrap, r#"pub unsafe fn create_{ty}("#, ty = ty).unwrap(); + for (idx, SteamField{fieldname: ref fname, fieldtype: ref fty}) in fields.iter().enumerate() { + let (fty, fty_rust) = field_type_fix(fty); + write!(cpp_wrapper, "{} {}", fty, fname).unwrap(); + write!(typed_constr_extern, "{}: {},", fname, fty_rust).unwrap(); + write!(typed_constr_wrap, "{}: {},", fname, fty_rust).unwrap(); + if idx != fields.len() - 1 { + cpp_wrapper.push(','); + } + } + + write!(cpp_wrapper, r#") {{ + {ty} created_type = {{}}; + "#, ty = ty).unwrap(); + write!(typed_constr_extern, r#") -> {ty}; + }}"#, ty = ty).unwrap(); + write!(typed_constr_wrap, r#") -> {ty} {{ + __rust_helper_typed__{ty}("#, ty = ty).unwrap(); + for SteamField{fieldname: ref fname, ..} in fields.iter() { + write!(cpp_wrapper, "created_type.{fname} = {fname};", fname = fname).unwrap(); + write!(typed_constr_wrap, "{},", fname).unwrap(); + } + writeln!(cpp_wrapper, r#" + return created_type; + }}"#).unwrap(); + writeln!(typed_constr_wrap, r#") + }}"#).unwrap(); + + builder = builder.raw_line(typed_constr_extern); + builder = builder.raw_line(typed_constr_wrap); + + + for SteamField{fieldname: ref fname, fieldtype: ref fty} in fields.iter() { + let (fty, fty_rust) = field_type_fix(fty); + builder = builder.whitelist_type(fty); + // Generate getters/setters for fields + + writeln!(cpp_wrapper, r#" + {fty} __rust_helper_getter__{ty}_{fname}(const {ty}* from) {{ + return from->{fname}; + }} + void __rust_helper_setter__{ty}_{fname}({ty}* to, {fty} val) {{ + to->{fname} = val; + }} + "#, ty = ty, fty = fty, fname = fname).unwrap(); + + builder = builder.raw_line(format!(r#" + extern "C" {{ + fn __rust_helper_getter__{ty}_{fname}(from: *const {ty}) -> {fty_rust}; + fn __rust_helper_setter__{ty}_{fname}(from: *mut {ty}, val: {fty_rust}); + }} + impl {ty} {{ + pub unsafe fn get_{fname}(&self) -> {fty_rust} {{ + __rust_helper_getter__{ty}_{fname}(self) + }} + pub unsafe fn set_{fname}(&mut self, val: {fty_rust}) {{ + __rust_helper_setter__{ty}_{fname}(self, val) + }} + }} + "#, ty = ty, fty_rust = fty_rust, fname = fname)) + } + } + for e in steam_api.enums { + builder = builder.whitelist_type(e.enumname); + } + builder = builder.whitelist_type("EServerMode"); + + cpp_wrapper.push_str("}"); + + File::create(out_path.join("steam_gen.cpp")) + .unwrap() + .write_all(cpp_wrapper.as_bytes()) + .unwrap(); + + // panic!("{}", out_path.join("steam_gen.cpp").display()); cc::Build::new() .cpp(true) .include(sdk_loc.join("public/steam")) .file("src/lib.cpp") + .file(out_path.join("steam_gen.cpp")) .compile("steamrust"); + + let bindings = builder + .generate() + .unwrap(); + // panic!("{}", bindings.to_string()); + bindings + .write_to_file(out_path.join("bindings.rs")) + .expect("Couldn't write bindings!"); }
\ No newline at end of file diff --git a/steamworks-sys/src/lib.cpp b/steamworks-sys/src/lib.cpp index 226c31a..38701da 100644 --- a/steamworks-sys/src/lib.cpp +++ b/steamworks-sys/src/lib.cpp @@ -6,7 +6,7 @@ struct CallbackData { int param_size; void* userdata; void (*run)(void*, void*, void*); - void (*run_extra)(void*, void*, void*, bool, SteamAPICall_t); + void (*run_extra)(void*, void*, void*, uint8_t, SteamAPICall_t); void (*dealloc)(void*, void*); }; @@ -26,7 +26,7 @@ public: } void Run(void* pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall) { - data.run_extra(this, data.userdata, pvParam, bIOFailure, hSteamAPICall); + data.run_extra(this, data.userdata, pvParam, bIOFailure ? 1 : 0, hSteamAPICall); } int GetCallbackSizeBytes() { diff --git a/steamworks-sys/src/lib.rs b/steamworks-sys/src/lib.rs index 5fbb565..7d6ebae 100644 --- a/steamworks-sys/src/lib.rs +++ b/steamworks-sys/src/lib.rs @@ -1,7 +1,11 @@ #![allow(non_camel_case_types)] +#![allow(non_upper_case_globals)] +#![allow(non_snake_case)] extern crate libc; +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); + use libc::{ c_char, c_void, @@ -24,222 +28,15 @@ pub struct ISteamUser(c_void); pub struct ISteamGameServer(c_void); pub type HSteamPipe = i32; -pub type HSteamUser = i32; -pub type HAuthTicket = u32; pub type AppId = u32; pub type SteamAPICall = u64; #[repr(C)] -pub enum PersonaState { - Offline = 0, - Online = 1, - Busy = 2, - Away = 3, - Snooze = 4, - LookingToTrade = 5, - LookingToPlay = 6, - Max, -} - -#[repr(C)] -pub enum LobbyType { - Private = 0, - FriendsOnly = 1, - Public = 2, - Invisible = 3, -} - -#[repr(C)] -pub struct PersonaStateChange_t { - pub steam_id: u64, - pub flags: c_int, -} - -#[repr(C)] -pub struct GetAuthSessionTicketResponse_t { - pub auth_ticket: HAuthTicket, - pub result: SResult, -} - -#[repr(C)] -pub struct ValidateAuthTicketResponse_t { - pub steam_id: u64, - pub response: AuthSessionResponse, - pub owner_steam_id: u64, -} - -#[repr(C)] -pub struct LobbyCreated { - pub result: SResult, - pub lobby_steam_id: u64, -} -#[repr(C)] -pub struct LobbyMatchList { - pub lobbies_matching: u32, -} - -#[repr(C)] -pub enum NotificationPosition { - TopLeft = 0, - TopRight = 1, - BottomLeft = 2, - BottomRight = 3, -} - -#[repr(C)] -pub enum BeginAuthSessionResult { - Ok = 0, - InvalidTicket = 1, - DuplicateRequest = 2, - InvalidVersion = 3, - GameMismatch = 4, - ExpiredTicket = 5, -} - -#[repr(C)] -pub enum AuthSessionResponse { - Ok = 0, - UserNotConnectedToSteam = 1, - NoLicenseOrExpired = 2, - VACBanned = 3, - LoggedInElseWhere = 4, - VACCheckTimedOut = 5, - AuthTicketCancelled = 6, - AuthTicketInvalidAlreadyUsed = 7, - AuthTicketInvalid = 8, - PublisherIssuedBan = 9, -} - -#[repr(C)] -pub enum ServerMode { - Invalid = 0, - NoAuthentication = 1, - Authentication = 2, - AuthenticationAndSecure = 3, -} - -#[repr(C)] -#[derive(Clone, Copy, Debug, Ord, PartialOrd, Eq, PartialEq)] -pub enum SResult { - Ok = 1, - Fail = 2, - NoConnection = 3, - InvalidPassword = 5, - LoggedInElsewhere = 6, - InvalidProtocolVer = 7, - InvalidParam = 8, - FileNotFound = 9, - Busy = 10, - InvalidState = 11, - InvalidName = 12, - InvalidEmail = 13, - DuplicateName = 14, - AccessDenied = 15, - Timeout = 16, - Banned = 17, - AccountNotFound = 18, - InvalidSteamID = 19, - ServiceUnavailable = 20, - NotLoggedOn = 21, - Pending = 22, - EncryptionFailure = 23, - InsufficientPrivilege = 24, - LimitExceeded = 25, - Revoked = 26, - Expired = 27, - AlreadyRedeemed = 28, - DuplicateRequest = 29, - AlreadyOwned = 30, - IPNotFound = 31, - PersistFailed = 32, - LockingFailed = 33, - LogonSessionReplaced = 34, - ConnectFailed = 35, - HandshakeFailed = 36, - IOFailure = 37, - RemoteDisconnect = 38, - ShoppingCartNotFound = 39, - Blocked = 40, - Ignored = 41, - NoMatch = 42, - AccountDisabled = 43, - ServiceReadOnly = 44, - AccountNotFeatured = 45, - AdministratorOK = 46, - ContentVersion = 47, - TryAnotherCM = 48, - PasswordRequiredToKickSession = 49, - AlreadyLoggedInElsewhere = 50, - Suspended = 51, - Cancelled = 52, - DataCorruption = 53, - DiskFull = 54, - RemoteCallFailed = 55, - PasswordUnset = 56, - ExternalAccountUnlinked = 57, - PSNTicketInvalid = 58, - ExternalAccountAlreadyLinked = 59, - RemoteFileConflict = 60, - IllegalPassword = 61, - SameAsPreviousValue = 62, - AccountLogonDenied = 63, - CannotUseOldPassword = 64, - InvalidLoginAuthCode = 65, - AccountLogonDeniedNoMail = 66, - HardwareNotCapableOfIPT = 67, - IPTInitError = 68, - ParentalControlRestricted = 69, - FacebookQueryError = 70, - ExpiredLoginAuthCode = 71, - IPLoginRestrictionFailed = 72, - AccountLockedDown = 73, - AccountLogonDeniedVerifiedEmailRequired = 74, - NoMatchingURL = 75, - BadResponse = 76, - RequirePasswordReEntry = 77, - ValueOutOfRange = 78, - UnexpectedError = 79, - Disabled = 80, - InvalidCEGSubmission = 81, - RestrictedDevice = 82, - RegionLocked = 83, - RateLimitExceeded = 84, - AccountLoginDeniedNeedTwoFactor = 85, - ItemDeleted = 86, - AccountLoginDeniedThrottle = 87, - TwoFactorCodeMismatch = 88, - TwoFactorActivationCodeMismatch = 89, - AccountAssociatedToMultiplePartners = 90, - NotModified = 91, - NoMobileDevice = 92, - TimeNotSynced = 93, - SmsCodeFailed = 94, - AccountLimitExceeded = 95, - AccountActivityLimitExceeded = 96, - PhoneActivityLimitExceeded = 97, - RefundToWallet = 98, - EmailSendFailure = 99, - NotSettled = 100, - NeedCaptcha = 101, - GSLTDenied = 102, - GSOwnerDenied = 103, - InvalidItemType = 104, - IPBanned = 105, - GSLTExpired = 106, - InsufficientFunds = 107, - TooManyPending = 108, - NoSiteLicensesFound = 109, - WGNetworkSendExceeded = 110, - AccountNotFriends = 111, - LimitedUserAccount = 112, -} - -#[repr(C)] pub struct CallbackData { pub param_size: c_int, pub userdata: *mut c_void, pub run: unsafe extern "C" fn(*mut c_void, *mut c_void, *mut c_void), - pub run_extra: unsafe extern "C" fn(*mut c_void, *mut c_void, *mut c_void, bool, SteamAPICall), + pub run_extra: unsafe extern "C" fn(*mut c_void, *mut c_void, *mut c_void, u8, SteamAPICall), pub dealloc: unsafe extern "C" fn(*mut c_void, *mut c_void), } @@ -257,7 +54,7 @@ extern "C" { pub fn steam_rust_get_server() -> *mut ISteamGameServer; pub fn steam_rust_get_server_apps() -> *mut ISteamApps; - pub fn steam_rust_game_server_init(ip: u32, steam_port: u16, game_port: u16, query_port: u16, server_mode: ServerMode, version: *const c_char) -> c_int; + pub fn steam_rust_game_server_init(ip: u32, steam_port: u16, game_port: u16, query_port: u16, server_mode: EServerMode, version: *const c_char) -> c_int; // @@ -280,11 +77,11 @@ extern "C" { pub fn SteamAPI_ISteamUtils_GetAppID(instance: *mut ISteamUtils) -> u32; pub fn SteamAPI_ISteamUtils_GetSteamUILanguage(instance: *mut ISteamUtils) -> *const c_char; pub fn SteamAPI_ISteamUtils_IsAPICallCompleted(instance: *mut ISteamUtils, api_call: SteamAPICall, failed: *mut bool) -> bool; - pub fn SteamAPI_ISteamUtils_SetOverlayNotificationPosition(instance: *mut ISteamUtils, position: NotificationPosition); + pub fn SteamAPI_ISteamUtils_SetOverlayNotificationPosition(instance: *mut ISteamUtils, position: ENotificationPosition); pub fn SteamAPI_ISteamApps_BIsAppInstalled(instance: *mut ISteamApps, app_id: AppId) -> u8; pub fn SteamAPI_ISteamApps_BIsDlcInstalled(instance: *mut ISteamApps, app_id: AppId) -> u8; - pub fn SteamAPI_ISteamApps_BIsSubscribedApp(instace: *mut ISteamApps, app_id: AppId) -> u8; + pub fn SteamAPI_ISteamApps_BIsSubscribedApp(instance: *mut ISteamApps, app_id: AppId) -> u8; pub fn SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend(instance: *mut ISteamApps) -> u8; pub fn SteamAPI_ISteamApps_BIsVACBanned(instance: *mut ISteamApps) -> u8; pub fn SteamAPI_ISteamApps_BIsCybercafe(instance: *mut ISteamApps) -> u8; @@ -300,18 +97,20 @@ extern "C" { pub fn SteamAPI_ISteamFriends_GetFriendCount(instance: *mut ISteamFriends, flags: c_int) -> c_int; pub fn SteamAPI_ISteamFriends_GetFriendByIndex(instance: *mut ISteamFriends, friend: c_int, flags: c_int) -> u64; pub fn SteamAPI_ISteamFriends_GetFriendPersonaName(instance: *mut ISteamFriends, friend: u64) -> *const c_char; - pub fn SteamAPI_ISteamFriends_GetFriendPersonaState(instance: *mut ISteamFriends, friend: u64) -> PersonaState; + pub fn SteamAPI_ISteamFriends_GetFriendPersonaState(instance: *mut ISteamFriends, friend: u64) -> EPersonaState; pub fn SteamAPI_ISteamFriends_RequestUserInformation(instance: *mut ISteamFriends, user_id: u64, name_only: u8) -> u8; pub fn SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(instance: *mut ISteamFriends, url: *const c_char); pub fn SteamAPI_ISteamFriends_GetPersonaName(instance: *mut ISteamFriends) -> *const c_char; - pub fn SteamAPI_ISteamMatchmaking_CreateLobby(instance: *mut ISteamMatchmaking, lobby_ty: LobbyType, max_members: c_int) -> SteamAPICall; + pub fn SteamAPI_ISteamMatchmaking_CreateLobby(instance: *mut ISteamMatchmaking, lobby_ty: ELobbyType, 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_ISteamMatchmaking_LeaveLobby(instance: *mut ISteamMatchmaking, lobby: u64); + pub fn SteamAPI_ISteamMatchmaking_JoinLobby(instance: *mut ISteamMatchmaking, lobby: u64) -> SteamAPICall; pub fn SteamAPI_ISteamUser_GetSteamID(instance: *mut ISteamUser) -> u64; pub fn SteamAPI_ISteamUser_GetAuthSessionTicket(instance: *mut ISteamUser, ticket: *mut c_void, max_ticket: c_int, ticket_size: *mut u32) -> HAuthTicket; - pub fn SteamAPI_ISteamUser_BeginAuthSession(instance: *mut ISteamUser, ticket: *const c_void, ticket_size: *mut u32, steam_id: u64) -> BeginAuthSessionResult; + pub fn SteamAPI_ISteamUser_BeginAuthSession(instance: *mut ISteamUser, ticket: *const c_void, ticket_size: *mut u32, steam_id: u64) -> EBeginAuthSessionResult; pub fn SteamAPI_ISteamUser_EndAuthSession(instance: *mut ISteamUser, steam_id: u64); pub fn SteamAPI_ISteamUser_CancelAuthTicket(instance: *mut ISteamUser, auth_ticket: HAuthTicket); @@ -321,7 +120,7 @@ extern "C" { pub fn SteamAPI_ISteamGameServer_SetDedicatedServer(instance: *mut ISteamGameServer, dedicated: u8); pub fn SteamAPI_ISteamGameServer_GetSteamID(instance: *mut ISteamGameServer) -> u64; pub fn SteamAPI_ISteamGameServer_GetAuthSessionTicket(instance: *mut ISteamGameServer, ticket: *mut c_void, max_ticket: c_int, ticket_size: *mut u32) -> HAuthTicket; - pub fn SteamAPI_ISteamGameServer_BeginAuthSession(instance: *mut ISteamGameServer, ticket: *const c_void, ticket_size: *mut u32, steam_id: u64) -> BeginAuthSessionResult; + pub fn SteamAPI_ISteamGameServer_BeginAuthSession(instance: *mut ISteamGameServer, ticket: *const c_void, ticket_size: *mut u32, steam_id: u64) -> EBeginAuthSessionResult; pub fn SteamAPI_ISteamGameServer_EndAuthSession(instance: *mut ISteamGameServer, steam_id: u64); pub fn SteamAPI_ISteamGameServer_CancelAuthTicket(instance: *mut ISteamGameServer, auth_ticket: HAuthTicket); } diff --git a/steamworks-sys/wrapper.hpp b/steamworks-sys/wrapper.hpp new file mode 100644 index 0000000..27c4619 --- /dev/null +++ b/steamworks-sys/wrapper.hpp @@ -0,0 +1,3 @@ +#include <steam_api.h> +#include <steam_gameserver.h> +#include <stdint.h>
\ No newline at end of file |