Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
Steamworks.SteamGameServerUtils Class Reference

Static Public Member Functions

static bool BOverlayNeedsPresent ()
 
static SteamAPICall_t CheckFileSignature (string szFileName)
 
static ESteamAPICallFailure GetAPICallFailureReason (SteamAPICall_t hSteamAPICall)
 
static bool GetAPICallResult (SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed)
 
static AppId_t GetAppID ()
 
static EUniverse GetConnectedUniverse ()
 
static bool GetCSERIPPort (out uint unIP, out ushort usPort)
 
static byte GetCurrentBatteryPower ()
 
static bool GetEnteredGamepadTextInput (out string pchText, uint cchText)
 
static uint GetEnteredGamepadTextLength ()
 
static bool GetImageRGBA (int iImage, byte[] pubDest, int nDestBufferSize)
 
static bool GetImageSize (int iImage, out uint pnWidth, out uint pnHeight)
 
static uint GetIPCCallCount ()
 
static string GetIPCountry ()
 
static uint GetSecondsSinceAppActive ()
 
static uint GetSecondsSinceComputerActive ()
 
static uint GetServerRealTime ()
 
static string GetSteamUILanguage ()
 
static bool IsAPICallCompleted (SteamAPICall_t hSteamAPICall, out bool pbFailed)
 
static bool IsOverlayEnabled ()
 
static bool IsSteamInBigPictureMode ()
 
static bool IsSteamRunningInVR ()
 
static bool IsVRHeadsetStreamingEnabled ()
 
static void SetOverlayNotificationInset (int nHorizontalInset, int nVerticalInset)
 
static void SetOverlayNotificationPosition (ENotificationPosition eNotificationPosition)
 
static void SetVRHeadsetStreamingEnabled (bool bEnabled)
 
static void SetWarningMessageHook (SteamAPIWarningMessageHook_t pFunction)
 
static bool ShowGamepadTextInput (EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText)
 
static void StartVRDashboard ()
 

Member Function Documentation

static bool Steamworks.SteamGameServerUtils.BOverlayNeedsPresent ( )
inlinestatic

Normally this call is unneeded if your game has a constantly running frame loop that calls the

D3D Present API, or OGL SwapBuffers API every frame.

However, if you have a game that only refreshes the screen on an event driven basis then that can break

the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also

need to Present() to the screen any time an even needing a notification happens or when the overlay is

brought up over the game by a user. You can use this API to ask the overlay if it currently need a present

in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you

refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.

static SteamAPICall_t Steamworks.SteamGameServerUtils.CheckFileSignature ( string  szFileName)
inlinestatic

Asynchronous call to check if an executable file has been signed using the public key set on the signing tab

of the partner site, for example to refuse to load modified executable files.

The result is returned in CheckFileSignature_t.

k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function.

k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site.

k_ECheckFileSignatureFileNotFound - The file does not exist on disk.

k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match.

k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid.

static ESteamAPICallFailure Steamworks.SteamGameServerUtils.GetAPICallFailureReason ( SteamAPICall_t  hSteamAPICall)
inlinestatic
static bool Steamworks.SteamGameServerUtils.GetAPICallResult ( SteamAPICall_t  hSteamAPICall,
IntPtr  pCallback,
int  cubCallback,
int  iCallbackExpected,
out bool  pbFailed 
)
inlinestatic
static AppId_t Steamworks.SteamGameServerUtils.GetAppID ( )
inlinestatic

returns the appID of the current process

static EUniverse Steamworks.SteamGameServerUtils.GetConnectedUniverse ( )
inlinestatic

the universe this client is connecting to

static bool Steamworks.SteamGameServerUtils.GetCSERIPPort ( out uint  unIP,
out ushort  usPort 
)
inlinestatic

returns the IP of the reporting server for valve - currently only used in Source engine games

static byte Steamworks.SteamGameServerUtils.GetCurrentBatteryPower ( )
inlinestatic

return the amount of battery power left in the current system in % [0..100], 255 for being on AC power

static bool Steamworks.SteamGameServerUtils.GetEnteredGamepadTextInput ( out string  pchText,
uint  cchText 
)
inlinestatic
static uint Steamworks.SteamGameServerUtils.GetEnteredGamepadTextLength ( )
inlinestatic

Returns previously entered text & length

static bool Steamworks.SteamGameServerUtils.GetImageRGBA ( int  iImage,
byte[]  pubDest,
int  nDestBufferSize 
)
inlinestatic

returns true if the image exists, and the buffer was successfully filled out

results are returned in RGBA format

the destination buffer size should be 4 * height * width * sizeof(char)

static bool Steamworks.SteamGameServerUtils.GetImageSize ( int  iImage,
out uint  pnWidth,
out uint  pnHeight 
)
inlinestatic

returns true if the image exists, and valid sizes were filled out

static uint Steamworks.SteamGameServerUtils.GetIPCCallCount ( )
inlinestatic

returns the number of IPC calls made since the last time this function was called

Used for perf debugging so you can understand how many IPC calls your game makes per frame

Every IPC call is at minimum a thread context switch if not a process one so you want to rate

control how often you do them.

static string Steamworks.SteamGameServerUtils.GetIPCountry ( )
inlinestatic

returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)

e.g "US" or "UK".

static uint Steamworks.SteamGameServerUtils.GetSecondsSinceAppActive ( )
inlinestatic

return the number of seconds since the user

static uint Steamworks.SteamGameServerUtils.GetSecondsSinceComputerActive ( )
inlinestatic
static uint Steamworks.SteamGameServerUtils.GetServerRealTime ( )
inlinestatic

Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time)

static string Steamworks.SteamGameServerUtils.GetSteamUILanguage ( )
inlinestatic

returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases

static bool Steamworks.SteamGameServerUtils.IsAPICallCompleted ( SteamAPICall_t  hSteamAPICall,
out bool  pbFailed 
)
inlinestatic

API asynchronous call results

can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)

static bool Steamworks.SteamGameServerUtils.IsOverlayEnabled ( )
inlinestatic

Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to

start & hook the game process, so this function will initially return false while the overlay is loading.

static bool Steamworks.SteamGameServerUtils.IsSteamInBigPictureMode ( )
inlinestatic

returns true if Steam & the Steam Overlay are running in Big Picture mode

Games much be launched through the Steam client to enable the Big Picture overlay. During development,

a game can be added as a non-steam game to the developers library to test this feature

static bool Steamworks.SteamGameServerUtils.IsSteamRunningInVR ( )
inlinestatic

returns true if Steam itself is running in VR mode

static bool Steamworks.SteamGameServerUtils.IsVRHeadsetStreamingEnabled ( )
inlinestatic

Returns true if the HMD content will be streamed via Steam In-Home Streaming

static void Steamworks.SteamGameServerUtils.SetOverlayNotificationInset ( int  nHorizontalInset,
int  nVerticalInset 
)
inlinestatic

Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.

static void Steamworks.SteamGameServerUtils.SetOverlayNotificationPosition ( ENotificationPosition  eNotificationPosition)
inlinestatic

Sets the position where the overlay instance for the currently calling game should show notifications.

This position is per-game and if this function is called from outside of a game context it will do nothing.

static void Steamworks.SteamGameServerUtils.SetVRHeadsetStreamingEnabled ( bool  bEnabled)
inlinestatic

Set whether the HMD content will be streamed via Steam In-Home Streaming

If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.

If this is set to false, then the application window will be streamed instead, and remote input will be allowed.

The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.

(this is useful for games that have asymmetric multiplayer gameplay)

static void Steamworks.SteamGameServerUtils.SetWarningMessageHook ( SteamAPIWarningMessageHook_t  pFunction)
inlinestatic

API warning handling

'int' is the severity; 0 for msg, 1 for warning

'const char *' is the text of the message

callbacks will occur directly after the API function is called that generated the warning or message

static bool Steamworks.SteamGameServerUtils.ShowGamepadTextInput ( EGamepadTextInputMode  eInputMode,
EGamepadTextInputLineMode  eLineInputMode,
string  pchDescription,
uint  unCharMax,
string  pchExistingText 
)
inlinestatic

Activates the Big Picture text input dialog which only supports gamepad input

static void Steamworks.SteamGameServerUtils.StartVRDashboard ( )
inlinestatic

ask SteamUI to create and render its OpenVR dashboard


The documentation for this class was generated from the following file: