aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs
index f95719f..2ad34f1 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,18 +1,24 @@
use super::*;
+/// Access to the steam utils interface
pub struct Utils {
pub(crate) utils: *mut sys::ISteamUtils,
pub(crate) _client: Arc<ClientInner>,
}
impl Utils {
+ /// Returns the app ID of the current process
pub fn app_id(&self) -> AppId {
unsafe {
AppId(sys::SteamAPI_ISteamUtils_GetAppID(self.utils))
}
}
+ /// Returns the language the steam client is currently
+ /// running in.
+ ///
+ /// Generally you want `Apps::current_game_language` instead of this
pub fn ui_language(&self) -> Cow<str> {
unsafe {
let lang = sys::SteamAPI_ISteamUtils_GetSteamUILanguage(self.utils);