fix some old interfaces getters

This commit is contained in:
a 2024-12-06 22:52:21 +02:00
parent 661dac1120
commit 88a941c170

View File

@ -347,7 +347,9 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
steam_networking_sockets_serialized_temp = steam_networking_sockets_serialized;
}
if (strcmp(pchVersion, "SteamNetworkingSocketsSerialized002") == 0) {
if (strcmp(pchVersion, "SteamNetworkingSocketsSerialized001") == 0) { // not found in public archives, defined as an alias to v002 in proton src
return reinterpret_cast<void *>(static_cast<ISteamNetworkingSocketsSerialized002 *>(steam_networking_sockets_serialized_temp));
} else if (strcmp(pchVersion, "SteamNetworkingSocketsSerialized002") == 0) {
return reinterpret_cast<void *>(static_cast<ISteamNetworkingSocketsSerialized002 *>(steam_networking_sockets_serialized_temp));
} else if (strcmp(pchVersion, "SteamNetworkingSocketsSerialized003") == 0) {
return reinterpret_cast<void *>(static_cast<ISteamNetworkingSocketsSerialized003 *>(steam_networking_sockets_serialized_temp));
@ -372,6 +374,7 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
return reinterpret_cast<void *>(static_cast<ISteamNetworkingSockets003 *>( steam_networking_sockets_temp));
} else if (strcmp(pchVersion, "SteamNetworkingSockets004") == 0) {
return reinterpret_cast<void *>(static_cast<ISteamNetworkingSockets004 *>( steam_networking_sockets_temp));
// TODO SteamNetworkingSockets005 not found in public archives
} else if (strcmp(pchVersion, "SteamNetworkingSockets006") == 0) {
return reinterpret_cast<void *>(static_cast<ISteamNetworkingSockets006 *>( steam_networking_sockets_temp));
} else if (strcmp(pchVersion, "SteamNetworkingSockets007") == 0) { // Not found in public Archive, real steamclient64.dll returns null
@ -451,7 +454,7 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
return GetISteamUser(hSteamUser, hSteamPipe, pchVersion);
} else if (strstr(pchVersion, "SteamUtils") == pchVersion) {
return GetISteamUtils(hSteamPipe, pchVersion);
} else if (strstr(pchVersion, "STEAMAPPS_INTERFACE_VERSION") == pchVersion) {
} else if ((strstr(pchVersion, "STEAMAPPS_INTERFACE_VERSION") == pchVersion) || (strstr(pchVersion, "SteamApps") == pchVersion)) {
return GetISteamApps(hSteamUser, hSteamPipe, pchVersion);
} else if (strstr(pchVersion, "STEAMSCREENSHOTS_INTERFACE_VERSION") == pchVersion) {
return GetISteamScreenshots(hSteamUser, hSteamPipe, pchVersion);
@ -558,7 +561,7 @@ ISteamApps *Steam_Client::GetISteamApps( HSteamUser hSteamUser, HSteamPipe hStea
} else {
steam_apps_temp = steam_apps;
}
if (strcmp(pchVersion, "STEAMAPPS_INTERFACE_VERSION001") == 0) {
if ((strcmp(pchVersion, "STEAMAPPS_INTERFACE_VERSION001") == 0) || (strcmp(pchVersion, "SteamApps001") == 0)) {
return reinterpret_cast<ISteamApps *>(static_cast<ISteamApps001 *>(steam_apps_temp));
} else if (strcmp(pchVersion, "STEAMAPPS_INTERFACE_VERSION002") == 0) {
return reinterpret_cast<ISteamApps *>(static_cast<ISteamApps002 *>(steam_apps_temp));
@ -726,8 +729,12 @@ ISteamController *Steam_Client::GetISteamController( HSteamUser hSteamUser, HSte
PRINT_DEBUG("%s", pchVersion);
if (!steam_pipes.count(hSteamPipe) || !hSteamUser) return NULL;
if (strcmp(pchVersion, "STEAMCONTROLLER_INTERFACE_VERSION") == 0) {
if (strcmp(pchVersion, "STEAMCONTROLLER_INTERFACE_VERSION") == 0) { // SDK <= 1.34
return reinterpret_cast<ISteamController *>(static_cast<ISteamController001 *>(steam_controller));
} else if (strcmp(pchVersion, "SteamController001") == 0) {
return nullptr; // real steamclient64.dll returns null
} else if (strcmp(pchVersion, "SteamController002") == 0) {
return nullptr; // real steamclient64.dll returns null
} else if (strcmp(pchVersion, "SteamController003") == 0) {
return reinterpret_cast<ISteamController *>(static_cast<ISteamController003 *>(steam_controller));
} else if (strcmp(pchVersion, "SteamController004") == 0) {