mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
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.
This commit is contained in:
parent
4421cc471d
commit
d6230bbad8
2 changed files with 9 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue