Skip to content

Commit

Permalink
Fix logspam.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyall committed Sep 1, 2024
1 parent 91a5be4 commit 6ff1c28
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,15 +614,15 @@ void HUD()

i++;
if (i == 100) { // 10s
//spdlog::error("Movies: Prepare: Failed to find WBP_EventMovie_C address.");
spdlog::error("Movies: Prepare: Failed to find WBP_EventMovie_C address.");
return;
}
}
}
spdlog::info("Movies: Prepare: WBP_EventMovie_C address = {:x}", (uintptr_t)EventMovie);

// Add pillarboxing/letterboxing and scale movies
if (EventMovie->IsA(SDK::UWBP_EventMovie_C::StaticClass())) {
if (EventMovie->Image_0->RenderTransform.Scale.X == 1.00f && EventMovie->Image_0->RenderTransform.Scale.Y == 1.00f) {
spdlog::info("Movies: Prepare: WBP_EventMovie_C address = {:x}", (uintptr_t)EventMovie);
auto widgetTree = (SDK::UPanelWidget*)EventMovie->WidgetTree->RootWidget;

// Create background image
Expand Down Expand Up @@ -652,7 +652,7 @@ void HUD()
}
}
} else {
//spdlog::error("Movies: Prepare: Not a valid WBP_EventMovie_C address.");
spdlog::error("Movies: Prepare: Not a valid WBP_EventMovie_C address.");
}
});
}
Expand All @@ -671,8 +671,10 @@ void HUD()
MoviePlayMidHook = safetyhook::create_mid(MovieStopScanResult,
[](SafetyHookContext& ctx)
{
EventMovie = nullptr;
spdlog::info("Movies: Stop: Movie stopped.");
if (EventMovie != nullptr) {
EventMovie = nullptr;
spdlog::info("Movies: Stop: Movie stopped.");
}
});
}
else if (!MovieStopScanResult)
Expand Down

0 comments on commit 6ff1c28

Please sign in to comment.