Skip to content

Commit

Permalink
Fix sign warnings on newest VS2022
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Dec 13, 2023
1 parent e1ac360 commit 726c67c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mods/vr/FFakeStereoRenderingHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,14 @@ bool FFakeStereoRenderingHook::standard_fake_stereo_hook(uintptr_t vtable) {
}

const auto stereo_projection_matrix_index = *stereo_view_offset_index + 1;
const auto is_4_18_or_lower = stereo_view_offset_index <= 6;
const auto is_4_18_or_lower = *stereo_view_offset_index <= 6;

const auto& stereo_view_offset_func = ((uintptr_t*)vtable)[*stereo_view_offset_index];

auto render_texture_render_thread_func = utility::find_virtual_function_from_string_ref(game, L"RenderTexture_RenderThread");

// Seems more robust than simply just checking the vtable index.
m_uses_old_rendertarget_manager = stereo_view_offset_index <= 11 && !render_texture_render_thread_func;
m_uses_old_rendertarget_manager = *stereo_view_offset_index <= 11 && !render_texture_render_thread_func;

if (!render_texture_render_thread_func) {
// Fallback scan to checking for the first non-default virtual function (<= 4.18)
Expand Down

0 comments on commit 726c67c

Please sign in to comment.