mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-05-03 11:02:16 -04:00
Removed store mode
This commit is contained in:
67
src/virtuals/isteamclient.cpp
Normal file
67
src/virtuals/isteamclient.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
#include <koalabox/hook.hpp>
|
||||
#include <koalabox/logger.hpp>
|
||||
|
||||
#include "steam_interface/steam_client.hpp"
|
||||
#include "virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
VIRTUAL(void*)
|
||||
ISteamClient_GetISteamApps(PARAMS(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* version)
|
||||
) {
|
||||
try {
|
||||
return steam_client::GetGenericInterface(__func__, version, [&] {
|
||||
GET_ORIGINAL_HOOKED_FUNCTION(ISteamClient_GetISteamApps)
|
||||
return ISteamClient_GetISteamApps_o(ARGS(hSteamUser, hSteamPipe, version));
|
||||
});
|
||||
} catch (const std::exception& e) {
|
||||
LOG_ERROR("{} -> Error: {}", __func__, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
VIRTUAL(void*)
|
||||
ISteamClient_GetISteamUser(PARAMS(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* version)
|
||||
) {
|
||||
try {
|
||||
return steam_client::GetGenericInterface(__func__, version, [&] {
|
||||
GET_ORIGINAL_HOOKED_FUNCTION(ISteamClient_GetISteamUser)
|
||||
|
||||
return ISteamClient_GetISteamUser_o(ARGS(hSteamUser, hSteamPipe, version));
|
||||
});
|
||||
} catch (const std::exception& e) {
|
||||
LOG_ERROR("{} -> Error: {}", __func__, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
VIRTUAL(void*)
|
||||
ISteamClient_GetISteamGenericInterface(
|
||||
PARAMS(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion)
|
||||
) {
|
||||
try {
|
||||
return steam_client::GetGenericInterface(__func__, pchVersion, [&] {
|
||||
GET_ORIGINAL_HOOKED_FUNCTION(ISteamClient_GetISteamGenericInterface)
|
||||
|
||||
return ISteamClient_GetISteamGenericInterface_o(ARGS(hSteamUser, hSteamPipe, pchVersion)
|
||||
);
|
||||
});
|
||||
} catch (const std::exception& e) {
|
||||
LOG_ERROR("{} -> Error: {}", __func__, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
VIRTUAL(void*)
|
||||
ISteamClient_GetISteamInventory(
|
||||
PARAMS(HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char* pchVersion)
|
||||
) {
|
||||
try {
|
||||
return steam_client::GetGenericInterface(__func__, pchVersion, [&] {
|
||||
GET_ORIGINAL_HOOKED_FUNCTION(ISteamClient_GetISteamInventory)
|
||||
|
||||
return ISteamClient_GetISteamInventory_o(ARGS(hSteamUser, hSteamPipe, pchVersion));
|
||||
});
|
||||
} catch (const std::exception& e) {
|
||||
LOG_ERROR("{} -> Error: {}", __func__, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user