Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

steamutils001 imp #66

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dll/dll/steam_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


class Steam_Utils :
public ISteamUtils001,
public ISteamUtils002,
public ISteamUtils003,
public ISteamUtils004,
Expand Down
5 changes: 4 additions & 1 deletion dll/steam_client_interface_getter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ ISteamUtils *Steam_Client::GetISteamUtils( HSteamPipe hSteamPipe, const char *pc
steam_utils_temp = steam_utils;
}

if (strcmp(pchVersion, "SteamUtils002") == 0) {

if (strcmp(pchVersion, "SteamUtils001") == 0) {
return reinterpret_cast<ISteamUtils *>(static_cast<ISteamUtils001 *>(steam_utils_temp));
} else if (strcmp(pchVersion, "SteamUtils002") == 0) {
return reinterpret_cast<ISteamUtils *>(static_cast<ISteamUtils002 *>(steam_utils_temp));
} else if (strcmp(pchVersion, "SteamUtils003") == 0) {
return reinterpret_cast<ISteamUtils *>(static_cast<ISteamUtils003 *>(steam_utils_temp)); // ISteamUtils003 Not found in public Archive, must be between 1.02-1.03
Expand Down
34 changes: 34 additions & 0 deletions sdk/steam/isteamutils001.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

#ifndef ISTEAMUTILS001_H
#define ISTEAMUTILS001_H
#ifdef STEAM_WIN32
#pragma once
#endif

class ISteamUtils001
{
public:
// return the number of seconds since the user
virtual uint32 GetSecondsSinceAppActive() = 0;
virtual uint32 GetSecondsSinceComputerActive() = 0;

// the universe this client is connecting to
virtual EUniverse GetConnectedUniverse() = 0;

// Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time)
virtual uint32 GetServerRealTime() = 0;

// 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".
virtual const char *GetIPCountry() = 0;

// returns true if the image exists, and valid sizes were filled out
virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0;

// 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)
virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0;
};

#endif // ISTEAMUTILS001_H
1 change: 1 addition & 0 deletions sdk/steam/steam_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#include "isteamfriends015.h"
#include "isteamfriends016.h"
#include "isteamutils.h"
#include "isteamutils001.h"
#include "isteamutils002.h"
#include "isteamutils003.h"
#include "isteamutils004.h"
Expand Down