From bc360584a3a8a8902f50642496b2d1287e5088ac Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sat, 2 Jul 2022 14:49:51 -0500 Subject: VideoCommon: add structures to graphics mods to allow for future adding or removing parameters with less code overhead --- .../Runtime/Actions/PrintAction.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/PrintAction.cpp') diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/PrintAction.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/PrintAction.cpp index e6f7d6b659..e131b4ee1e 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/PrintAction.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/PrintAction.cpp @@ -5,27 +5,32 @@ #include "Common/Logging/Log.h" -void PrintAction::OnDrawStarted(bool*) +void PrintAction::OnDrawStarted(GraphicsModActionData::DrawStarted*) { INFO_LOG_FMT(VIDEO, "OnDrawStarted Called"); } -void PrintAction::OnEFB(bool*, u32 texture_width, u32 texture_height, u32* scaled_width, - u32* scaled_height) +void PrintAction::OnEFB(GraphicsModActionData::EFB* efb) { - if (!scaled_width || !scaled_height) + if (!efb) [[unlikely]] return; - INFO_LOG_FMT(VIDEO, "OnEFB Called. Original [{}, {}], Scaled [{}, {}]", texture_width, - texture_height, *scaled_width, *scaled_height); + if (!efb->scaled_width) [[unlikely]] + return; + + if (!efb->scaled_height) [[unlikely]] + return; + + INFO_LOG_FMT(VIDEO, "OnEFB Called. Original [{}, {}], Scaled [{}, {}]", efb->texture_width, + efb->texture_height, *efb->scaled_width, *efb->scaled_height); } -void PrintAction::OnProjection(Common::Matrix44*) +void PrintAction::OnProjection(GraphicsModActionData::Projection*) { INFO_LOG_FMT(VIDEO, "OnProjection Called"); } -void PrintAction::OnProjectionAndTexture(Common::Matrix44*) +void PrintAction::OnProjectionAndTexture(GraphicsModActionData::Projection*) { INFO_LOG_FMT(VIDEO, "OnProjectionAndTexture Called"); } -- cgit v1.2.3