Skip to content

Commit

Permalink
Fix compilation errors after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Aug 16, 2023
1 parent 2a8c23c commit 3251b8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mods/VR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void VR::on_camera_get_view_matrix(REManagedObject* camera, Matrix4x4f* result)
//}
}

HookManager::PreHookResult VR::pre_set_hdr_mode(std::vector<uintptr_t>& args, std::vector<sdk::RETypeDefinition*>& arg_tys) {
HookManager::PreHookResult VR::pre_set_hdr_mode(std::vector<uintptr_t>& args, std::vector<sdk::RETypeDefinition*>& arg_tys, uintptr_t ret_addr) {
if (!VR::get()->is_hmd_active()) {
return HookManager::PreHookResult::CALL_ORIGINAL;
}
Expand Down
4 changes: 2 additions & 2 deletions src/mods/VR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ class VR : public Mod {
static Matrix4x4f* gui_camera_get_projection_matrix_hook(REManagedObject* camera, Matrix4x4f* result);
void on_camera_get_view_matrix(REManagedObject* camera, Matrix4x4f* result) override;

static HookManager::PreHookResult pre_set_hdr_mode(std::vector<uintptr_t>& args, std::vector<sdk::RETypeDefinition*>& arg_tys);
static void post_set_hdr_mode(uintptr_t& ret_val, sdk::RETypeDefinition* ret_ty) {}
static HookManager::PreHookResult pre_set_hdr_mode(std::vector<uintptr_t>& args, std::vector<sdk::RETypeDefinition*>& arg_tys, uintptr_t ret_addr);
static void post_set_hdr_mode(uintptr_t& ret_val, sdk::RETypeDefinition* ret_ty, uintptr_t ret_addr) {}

bool on_pre_overlay_layer_update(sdk::renderer::layer::Overlay* layer, void* render_context) override;
bool on_pre_overlay_layer_draw(sdk::renderer::layer::Overlay* layer, void* render_context) override;
Expand Down
4 changes: 2 additions & 2 deletions src/mods/vr/CameraDuplicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void CameraDuplicator::hook_get_primary_camera() {
const auto get_primary_camera_fn = sceneview_t->get_method("get_PrimaryCamera");
spdlog::info("Hooking getPrimaryCamera: {:x}", (uintptr_t)get_primary_camera_fn);

g_hookman.add(get_primary_camera_fn, [this](std::vector<uintptr_t>& args, std::vector<sdk::RETypeDefinition*>& arg_tys) {
g_hookman.add(get_primary_camera_fn, [this](std::vector<uintptr_t>& args, std::vector<sdk::RETypeDefinition*>& arg_tys, uintptr_t ret_addr) {
if (m_new_cameras.empty()) {
return HookManager::PreHookResult::CALL_ORIGINAL;
}
Expand All @@ -332,7 +332,7 @@ void CameraDuplicator::hook_get_primary_camera() {

return HookManager::PreHookResult::CALL_ORIGINAL;
},
[this](uintptr_t& ret_val, sdk::RETypeDefinition* ret_ty) {
[this](uintptr_t& ret_val, sdk::RETypeDefinition* ret_ty, uintptr_t ret_addr) {
std::scoped_lock _{ m_camera_mutex };

for (auto new_camera : m_new_cameras) {
Expand Down

0 comments on commit 3251b8e

Please sign in to comment.