There was an error while loading. Please reload this page.
1 parent 38c73f3 commit 7a19584Copy full SHA for 7a19584
1 file changed
src/mods/vr/FFakeStereoRenderingHook.cpp
@@ -3484,7 +3484,11 @@ void FFakeStereoRenderingHook::begin_render_viewfamily(ISceneViewExtension* exte
3484
}
3485
3486
if (mid != 0) {
3487
- const auto candidate = utility::find_virtual_function_start(mid);
+ // unwind first to find the actual function start.
3488
+ // find_virtual_function_start doesnt use unwind, (it subtracts by 1)
3489
+ // it can find false positives or nothing at all.
3490
+ const auto unwind = utility::find_function_start_unwind(mid);
3491
+ const auto candidate = utility::find_virtual_function_start(unwind ? *unwind : mid);
3492
3493
if (candidate) {
3494
begin_rendering_view_family_real_fn = (BeginRenderViewFamilyRealFn)*candidate;
0 commit comments