diff options
| author | Filoppi <filippotarpini@hotmail.it> | 2023-12-18 00:52:31 +0200 |
|---|---|---|
| committer | Filoppi <filippotarpini@hotmail.it> | 2024-04-03 13:32:01 +0300 |
| commit | d6230bbad83d1961e31c88cc2da4f2a6eb1edc35 (patch) | |
| tree | 575ab81c3cc56d6a710e011d220682e3410ccd0d /Source/Core/VideoCommon/Present.cpp | |
| parent | 4421cc471d4d61c2e5ded49497b58651e7f65351 (diff) | |
Video: Change the frame dumper to actually use the raw emulation output resolution, avoiding any scaling if possible.
This should make comparisons much more reliable as pixels wouldn't be smushed together or stretched.
Diffstat (limited to 'Source/Core/VideoCommon/Present.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Present.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp index 0cc19d6e14..322685084d 100644 --- a/Source/Core/VideoCommon/Present.cpp +++ b/Source/Core/VideoCommon/Present.cpp @@ -214,14 +214,17 @@ void Presenter::ProcessFrameDumping(u64 ticks) const MathUtil::Rectangle<int> target_rect; if (!g_ActiveConfig.bInternalResolutionFrameDumps && !g_gfx->IsHeadless()) { + // This is already scaled by "VIDEO_ENCODER_LCM" target_rect = GetTargetRectangle(); } else { - int width, height; - std::tie(width, height) = - CalculateOutputDimensions(m_xfb_rect.GetWidth(), m_xfb_rect.GetHeight()); - target_rect = MathUtil::Rectangle<int>(0, 0, width, height); + target_rect = m_xfb_rect; + ASSERT(target_rect.top == 0 && target_rect.left == 0); + // Scale positively to make sure the least amount of information is lost. + // TODO: this should be added as black padding on the edges by the frame dumper + target_rect.right += VIDEO_ENCODER_LCM - (target_rect.GetWidth() % VIDEO_ENCODER_LCM); + target_rect.bottom += VIDEO_ENCODER_LCM - (target_rect.GetHeight() % VIDEO_ENCODER_LCM); } g_frame_dumper->DumpCurrentFrame(m_xfb_entry->texture.get(), m_xfb_rect, target_rect, ticks, |
