mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
SteamInternal_CreateInterface should return NULL if not called with "SteamClient"
This commit is contained in:
parent
6dd7f517e6
commit
f3e968b54c
2 changed files with 34 additions and 31 deletions
|
@ -135,6 +135,8 @@ Steam_Client *get_steam_clientserver_old()
|
||||||
S_API void * S_CALLTYPE SteamInternal_CreateInterface( const char *ver )
|
S_API void * S_CALLTYPE SteamInternal_CreateInterface( const char *ver )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("SteamInternal_CreateInterface %s\n", ver);
|
PRINT_DEBUG("SteamInternal_CreateInterface %s\n", ver);
|
||||||
|
|
||||||
|
if (strstr(ver, "SteamClient") == ver) {
|
||||||
void *steam_client;
|
void *steam_client;
|
||||||
|
|
||||||
if (strcmp(ver, "SteamClient007") == 0) {
|
if (strcmp(ver, "SteamClient007") == 0) {
|
||||||
|
@ -167,6 +169,9 @@ S_API void * S_CALLTYPE SteamInternal_CreateInterface( const char *ver )
|
||||||
|
|
||||||
if (steam_client) g_pSteamClientGameServer = (ISteamClient *)steam_client;
|
if (steam_client) g_pSteamClientGameServer = (ISteamClient *)steam_client;
|
||||||
return steam_client;
|
return steam_client;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ContextInitData { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; };
|
struct ContextInitData { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; };
|
||||||
|
|
|
@ -699,8 +699,6 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
|
||||||
return GetISteamGameServerStats(hSteamUser, hSteamPipe, pchVersion);
|
return GetISteamGameServerStats(hSteamUser, hSteamPipe, pchVersion);
|
||||||
} else if (strstr(pchVersion, "SteamMatchMakingServers") == pchVersion) {
|
} else if (strstr(pchVersion, "SteamMatchMakingServers") == pchVersion) {
|
||||||
return GetISteamMatchmakingServers(hSteamUser, hSteamPipe, pchVersion);
|
return GetISteamMatchmakingServers(hSteamUser, hSteamPipe, pchVersion);
|
||||||
} else if (strstr(pchVersion, "STEAMREMOTESTORAGE_INTERFACE_VERSION") == pchVersion) {
|
|
||||||
return GetISteamRemoteStorage(hSteamUser, hSteamPipe, pchVersion);
|
|
||||||
} else if (strstr(pchVersion, "SteamFriends") == pchVersion) {
|
} else if (strstr(pchVersion, "SteamFriends") == pchVersion) {
|
||||||
return GetISteamFriends(hSteamUser, hSteamPipe, pchVersion);
|
return GetISteamFriends(hSteamUser, hSteamPipe, pchVersion);
|
||||||
} else if (strstr(pchVersion, "SteamMatchMaking") == pchVersion) {
|
} else if (strstr(pchVersion, "SteamMatchMaking") == pchVersion) {
|
||||||
|
|
Loading…
Reference in a new issue