Fix steam proxy

This commit is contained in:
momo5502 2019-09-24 23:00:50 +02:00
parent c399eed444
commit 25a9919498
2 changed files with 433 additions and 436 deletions

View File

@ -405,7 +405,7 @@ namespace demonware
io::register_hook("ioctlsocket", io::ioctl_socket);
io::register_hook("gethostbyname", io::get_host_by_name);
utils::hook(SELECT_VALUE(0x6F40A0, 0x6EE1C0, 0x611310), bd_logger_stub, HOOK_JUMP).install()->quick();
//utils::hook(SELECT_VALUE(0x6F40A0, 0x6EE1C0, 0x611310), bd_logger_stub, HOOK_JUMP).install()->quick();
}
void dw::bd_logger_stub(int /*type*/, const char* const /*channelName*/, const char*, const char* const /*file*/,

View File

@ -12,18 +12,17 @@ class steam_proxy final : public module
public:
void post_start() override
{
if (game::is_dedi()) return;
this->run_mod();
this->load_client();
this->clean_up_on_error();
}
void post_load() override
{
if (game::is_dedi()) return;
this->load_client();
this->clean_up_on_error();
try
{
if (game::is_sp())
@ -116,10 +115,8 @@ private:
this->steam_pipe_ = this->steam_client_module_.invoke<void*>("Steam_CreateSteamPipe");
this->global_user_ = this->steam_client_module_.invoke<void*>("Steam_ConnectToGlobalUser", this->steam_pipe_);
this->client_user_ = this->client_engine_.invoke<void*>(8, this->steam_pipe_, this->global_user_,
"CLIENTUSER_INTERFACE_VERSION001"); // GetIClientUser
this->client_utils_ = this->client_engine_.invoke<void*>(13, this->steam_pipe_,
"CLIENTUTILS_INTERFACE_VERSION001"); // GetIClientUtils
this->client_user_ = this->client_engine_.invoke<void*>(8, this->steam_pipe_, this->global_user_); // GetIClientUser
this->client_utils_ = this->client_engine_.invoke<void*>(13, this->steam_pipe_); // GetIClientUtils
}
void start_mod(const std::string& title, size_t app_id)
@ -175,4 +172,4 @@ private:
}
};
//REGISTER_MODULE(steam_proxy)
REGISTER_MODULE(steam_proxy)