Skip to content

Commit

Permalink
Merge branch 'praydog:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyhodge authored Mar 1, 2024
2 parents a5331cb + 77e89b1 commit 9b9da12
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mods/VR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2389,13 +2389,16 @@ bool VR::on_pre_gui_draw_element(REComponent* gui_element, void* primitive_conte
}
#endif

#ifdef RE7
if (name_hash == "HUD"_fnv) { // not a hero
// Stops HUD element from being stuck to the screen
sdk::call_object_func<REComponent*>(gui_element, "set_RenderTarget", context, gui_element, nullptr);
}
#endif

//spdlog::info("VR: on_pre_gui_draw_element: {}", name);
//spdlog::info("VR: on_pre_gui_draw_element: {} {:x}", name, (uintptr_t)game_object);

// Fixes various UI elements that are stuck to the camera, like Not a Hero's UI
sdk::call_object_func<REComponent*>(gui_element, "set_RenderTarget", context, gui_element, nullptr);

auto view = sdk::call_object_func<REComponent*>(gui_element, "get_View", context, gui_element);

if (view != nullptr) {
Expand Down

0 comments on commit 9b9da12

Please sign in to comment.