restore accidentally removed flag for ipv6 for SteamClient020 + VS warning fix + small refactor

This commit is contained in:
otavepto 2024-06-07 19:55:30 +03:00
parent b89dfe6e44
commit f7c7d79e0a
5 changed files with 11 additions and 5 deletions

View File

@ -16,6 +16,8 @@
<http://www.gnu.org/licenses/>. */
#include "dll/base.h"
#include "dll/settings_parser.h"
std::recursive_mutex global_mutex{};
// some arbitrary counter/time for reference
@ -299,6 +301,7 @@ unsigned int file_size_(const std::string &full_path)
return buffer.st_size;
}
#ifdef EMU_EXPERIMENTAL_BUILD
#ifdef __WINDOWS__
@ -591,9 +594,6 @@ HINTERNET WINAPI Mine_WinHttpOpenRequest(
}
#include "dll/settings_parser.h"
static bool network_functions_attached = false;
BOOL WINAPI DllMain( HINSTANCE, DWORD dwReason, LPVOID )
{
@ -659,3 +659,4 @@ void set_whitelist_ips(uint32_t *from, uint32_t *to, unsigned num_ips)
}
#endif

View File

@ -241,10 +241,11 @@ static void *create_client_interface(const char *ver)
} else if (strcmp(ver, "SteamClient019") == 0) {
steam_client = static_cast<ISteamClient019 *>(get_steam_client());
} else if (strcmp(ver, "SteamClient020") == 0) {
steamclient_has_ipv6_functions_flag = true;
steam_client = static_cast<ISteamClient020 *>(get_steam_client());
} else if (strcmp(ver, STEAMCLIENT_INTERFACE_VERSION) == 0) {
steam_client = static_cast<ISteamClient *>(get_steam_client());
steamclient_has_ipv6_functions_flag = true;
steam_client = static_cast<ISteamClient *>(get_steam_client());
} else {
PRINT_DEBUG("requested unknown steamclient version '%s'", ver);
steam_client = static_cast<ISteamClient *>(get_steam_client());

View File

@ -53,9 +53,12 @@ bool file_exists_(const std::string &full_path);
unsigned int file_size_(const std::string &full_path);
void set_whitelist_ips(uint32_t *from, uint32_t *to, unsigned num_ips);
#ifdef EMU_EXPERIMENTAL_BUILD
bool crack_SteamAPI_RestartAppIfNecessary(uint32 unOwnAppID);
bool crack_SteamAPI_Init();
#endif
#endif // BASE_INCLUDE_H

View File

@ -36,4 +36,5 @@ HSteamPipe flat_hsteampipe();
HSteamUser flat_gs_hsteamuser();
HSteamPipe flat_gs_hsteampipe();
#endif // __INCLUDED_DLL_H__

View File

@ -490,7 +490,7 @@ std::string Local_Storage::get_user_appdata_path()
static std::string replace_with(std::string s, std::string const &old, const char *new_str)
{
int pos;
size_t pos{};
while ((pos = s.find(old)) != std::string::npos)
s.replace(pos, old.length(), new_str);