mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-26 22:42:51 -05:00
Sync with KoalaBox
This commit is contained in:
@@ -6,15 +6,17 @@
|
||||
namespace steam_client {
|
||||
void* GetGenericInterface(
|
||||
const std::string& function_name,
|
||||
const std::string& interface_version,
|
||||
const char* interface_version, // This can be null
|
||||
const std::function<void*()>& original_function
|
||||
) noexcept {
|
||||
try {
|
||||
auto* const interface = original_function();
|
||||
|
||||
LOG_DEBUG("{} -> '{}' @ {}", function_name, interface_version, interface);
|
||||
if(interface_version) {
|
||||
LOG_DEBUG("{} -> '{}' @ {}", function_name, interface_version, interface);
|
||||
|
||||
steam_interfaces::hook_virtuals(interface, interface_version);
|
||||
steam_interfaces::hook_virtuals(interface, interface_version);
|
||||
}
|
||||
|
||||
return interface;
|
||||
} catch(const std::exception& e) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace steam_client {
|
||||
void* GetGenericInterface(
|
||||
const std::string& function_name,
|
||||
const std::string& interface_version,
|
||||
const char* interface_version,
|
||||
const std::function<void*()>& original_function
|
||||
) noexcept;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "steam_api/steam_interfaces.hpp"
|
||||
|
||||
#include "koalabox/module.hpp"
|
||||
#include "koalabox/lib.hpp"
|
||||
#include "smoke_api/smoke_api.hpp"
|
||||
#include "smoke_api/steamclient/steamclient.hpp"
|
||||
#include "virtuals/steam_api_virtuals.hpp"
|
||||
@@ -196,7 +196,7 @@ namespace steam_interfaces {
|
||||
}
|
||||
|
||||
void hook_steamclient_interface(
|
||||
const HMODULE steamclient_handle,
|
||||
void* steamclient_handle,
|
||||
const std::string& steam_client_interface_version
|
||||
) noexcept {
|
||||
try {
|
||||
@@ -209,7 +209,6 @@ namespace steam_interfaces {
|
||||
// Map virtual hook map to a set of keys
|
||||
const auto prefixes = std::views::keys(virtual_hook_map) | std::ranges::to<std::set>();
|
||||
|
||||
|
||||
const auto CreateInterface$ = KB_MOD_GET_FUNC(steamclient_handle, CreateInterface);
|
||||
const auto* const THIS = CreateInterface$(steam_client_interface_version.c_str(), nullptr);
|
||||
hook_virtuals(THIS, steam_client_interface_version);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace steam_interfaces {
|
||||
* such as in the case of late injection.
|
||||
*/
|
||||
void hook_steamclient_interface(
|
||||
HMODULE steamclient_handle,
|
||||
void* steamclient_handle,
|
||||
const std::string& steam_client_interface_version
|
||||
) noexcept;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user