Upgrade to support steam sdk 1.5.2
This commit is contained in:
parent
19dc4f468a
commit
16fe3ad252
36
dll/flat.cpp
36
dll/flat.cpp
|
@ -1180,6 +1180,42 @@ STEAMAPI_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6Connectivit
|
|||
return (ptr)->GetIPv6ConnectivityState(eProtocol);
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self )
|
||||
{
|
||||
int test1 = ((char *)self - (char*)get_steam_client()->steam_utils);
|
||||
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_utils);
|
||||
auto ptr = get_steam_client()->steam_gameserver_utils;
|
||||
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
|
||||
ptr = get_steam_client()->steam_utils;
|
||||
}
|
||||
|
||||
return (ptr)->IsSteamRunningOnSteamDeck();
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamUtils_ShowFloatingGamepadTextInput( ISteamUtils* self, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight )
|
||||
{
|
||||
int test1 = ((char *)self - (char*)get_steam_client()->steam_utils);
|
||||
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_utils);
|
||||
auto ptr = get_steam_client()->steam_gameserver_utils;
|
||||
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
|
||||
ptr = get_steam_client()->steam_utils;
|
||||
}
|
||||
|
||||
return (ptr)->ShowFloatingGamepadTextInput(eKeyboardMode, nTextFieldXPosition, nTextFieldYPosition, nTextFieldWidth, nTextFieldHeight);
|
||||
}
|
||||
|
||||
STEAMAPI_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode )
|
||||
{
|
||||
int test1 = ((char *)self - (char*)get_steam_client()->steam_utils);
|
||||
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_utils);
|
||||
auto ptr = get_steam_client()->steam_gameserver_utils;
|
||||
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
|
||||
ptr = get_steam_client()->steam_utils;
|
||||
}
|
||||
|
||||
return (ptr)->SetGameLauncherMode(bLauncherMode);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009()
|
||||
{
|
||||
return get_steam_client()->GetISteamMatchmaking(flat_hsteamuser(), flat_hsteampipe(), "SteamMatchMaking009");
|
||||
|
|
|
@ -398,6 +398,8 @@ ISteamUtils *Steam_Client::GetISteamUtils( HSteamPipe hSteamPipe, const char *pc
|
|||
return (ISteamUtils *)(void *)(ISteamUtils008 *)steam_utils_temp;
|
||||
} else if (strcmp(pchVersion, "SteamUtils009") == 0) {
|
||||
return (ISteamUtils *)(void *)(ISteamUtils009 *)steam_utils_temp;
|
||||
} else if (strcmp(pchVersion, "SteamUtils010") == 0) {
|
||||
return (ISteamUtils *)(void *)(ISteamUtils010 *)steam_utils_temp;
|
||||
} else if (strcmp(pchVersion, STEAMUTILS_INTERFACE_VERSION) == 0) {
|
||||
return (ISteamUtils *)(void *)(ISteamUtils *)steam_utils_temp;
|
||||
} else {
|
||||
|
|
|
@ -31,6 +31,7 @@ public ISteamUtils006,
|
|||
public ISteamUtils007,
|
||||
public ISteamUtils008,
|
||||
public ISteamUtils009,
|
||||
public ISteamUtils010,
|
||||
public ISteamUtils
|
||||
{
|
||||
private:
|
||||
|
@ -405,4 +406,25 @@ ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProt
|
|||
return k_ESteamIPv6ConnectivityState_Unknown;
|
||||
}
|
||||
|
||||
// returns true if currently running on the Steam Deck device
|
||||
bool IsSteamRunningOnSteamDeck()
|
||||
{
|
||||
PRINT_DEBUG("IsSteamRunningOnSteamDeck\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
|
||||
// The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field
|
||||
bool ShowFloatingGamepadTextInput( EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight )
|
||||
{
|
||||
PRINT_DEBUG("ShowFloatingGamepadTextInput\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher
|
||||
void SetGameLauncherMode( bool bLauncherMode )
|
||||
{
|
||||
PRINT_DEBUG("SetGameLauncherMode\n");
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -41,6 +41,13 @@ enum EGamepadTextInputLineMode
|
|||
k_EGamepadTextInputLineModeMultipleLines = 1
|
||||
};
|
||||
|
||||
enum EFloatingGamepadTextInputMode
|
||||
{
|
||||
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
|
||||
k_EFloatingGamepadTextInputModeModeEmail = 2,
|
||||
k_EFloatingGamepadTextInputModeModeNumeric = 3,
|
||||
};
|
||||
|
||||
// The context where text filtering is being done
|
||||
enum ETextFilteringContext
|
||||
|
@ -64,7 +71,7 @@ extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char
|
|||
class ISteamUtils
|
||||
{
|
||||
public:
|
||||
// return the number of seconds since the user
|
||||
// return the number of seconds since the user
|
||||
virtual uint32 GetSecondsSinceAppActive() = 0;
|
||||
virtual uint32 GetSecondsSinceComputerActive() = 0;
|
||||
|
||||
|
@ -86,8 +93,8 @@ public:
|
|||
// the destination buffer size should be 4 * height * width * sizeof(char)
|
||||
virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0;
|
||||
|
||||
// returns the IP of the reporting server for valve - currently only used in Source engine games
|
||||
virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0;
|
||||
// Deprecated. Do not call this.
|
||||
STEAM_PRIVATE_API( virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; )
|
||||
|
||||
// return the amount of battery power left in the current system in % [0..100], 255 for being on AC power
|
||||
virtual uint8 GetCurrentBatteryPower() = 0;
|
||||
|
@ -146,7 +153,7 @@ public:
|
|||
STEAM_CALL_RESULT( CheckFileSignature_t )
|
||||
virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0;
|
||||
|
||||
// Activates the Big Picture text input dialog which only supports gamepad input
|
||||
// Activates the full-screen text input dialog which takes a initial text string and returns the text the user has typed
|
||||
virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0;
|
||||
|
||||
// Returns previously entered text & length
|
||||
|
@ -203,6 +210,16 @@ public:
|
|||
// Return what we believe your current ipv6 connectivity to "the internet" is on the specified protocol.
|
||||
// This does NOT tell you if the Steam client is currently connected to Steam via ipv6.
|
||||
virtual ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProtocol eProtocol ) = 0;
|
||||
|
||||
// returns true if currently running on the Steam Deck device
|
||||
virtual bool IsSteamRunningOnSteamDeck() = 0;
|
||||
|
||||
// Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
|
||||
// The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field
|
||||
virtual bool ShowFloatingGamepadTextInput( EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight ) = 0;
|
||||
|
||||
// In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher
|
||||
virtual void SetGameLauncherMode( bool bLauncherMode ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils010"
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
#include "isteamutils007.h"
|
||||
#include "isteamutils008.h"
|
||||
#include "isteamutils009.h"
|
||||
#include "isteamutils010.h"
|
||||
#include "isteammatchmaking.h"
|
||||
#include "isteammatchmaking006.h"
|
||||
#include "isteammatchmaking007.h"
|
||||
|
|
|
@ -208,6 +208,9 @@ STEAMAPI_API bool SteamAPI_ISteamUtils_IsSteamChinaLauncher( ISteamUtils* self )
|
|||
STEAMAPI_API bool SteamAPI_ISteamUtils_InitFilterText( ISteamUtils* self, uint32 unFilterOptions );
|
||||
STEAMAPI_API int SteamAPI_ISteamUtils_FilterText( ISteamUtils* self, ETextFilteringContext eContext, uint64_steamid sourceSteamID, const char * pchInputMessage, char * pchOutFilteredText, uint32 nByteSizeOutFilteredText );
|
||||
STEAMAPI_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState( ISteamUtils* self, ESteamIPv6ConnectivityProtocol eProtocol );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUtils_ShowFloatingGamepadTextInput( ISteamUtils* self, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight );
|
||||
STEAMAPI_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
|
||||
|
||||
// ISteamMatchmaking
|
||||
STEAMAPI_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009();
|
||||
|
|
Loading…
Reference in New Issue