mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Video Common: Make auto IR work with HybridXFB
This commit is contained in:
parent
76b775d5be
commit
e33ab4117d
@ -150,8 +150,8 @@ bool Renderer::CalculateTargetSize()
|
||||
if (g_ActiveConfig.iEFBScale == EFB_SCALE_AUTO_INTEGRAL)
|
||||
{
|
||||
// Set a scale based on the window size
|
||||
int width = FramebufferManagerBase::ScaleToVirtualXfbWidth(EFB_WIDTH, m_target_rectangle);
|
||||
int height = FramebufferManagerBase::ScaleToVirtualXfbHeight(EFB_HEIGHT, m_target_rectangle);
|
||||
int width = EFB_WIDTH * m_target_rectangle.GetWidth() / m_last_xfb_width;
|
||||
int height = EFB_HEIGHT * m_target_rectangle.GetWidth() / m_last_xfb_height;
|
||||
m_efb_scale = std::max((width - 1) / EFB_WIDTH + 1, (height - 1) / EFB_HEIGHT + 1);
|
||||
}
|
||||
else
|
||||
@ -652,6 +652,10 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
|
||||
m_fps_counter.Update();
|
||||
update_frame_count = true;
|
||||
}
|
||||
|
||||
// Update our last xfb values
|
||||
m_last_xfb_width = (fbStride < 1 || fbStride > MAX_XFB_WIDTH) ? MAX_XFB_WIDTH : fbStride;
|
||||
m_last_xfb_height = (fbHeight < 1 || fbHeight > MAX_XFB_HEIGHT) ? MAX_XFB_HEIGHT : fbHeight;
|
||||
}
|
||||
|
||||
frameCount++;
|
||||
|
@ -209,6 +209,10 @@ private:
|
||||
|
||||
AbstractTexture * m_last_xfb_texture;
|
||||
|
||||
// Note: Only used for auto-ir
|
||||
u32 m_last_xfb_width = MAX_XFB_WIDTH;
|
||||
u32 m_last_xfb_height = MAX_XFB_HEIGHT;
|
||||
|
||||
// NOTE: The methods below are called on the framedumping thread.
|
||||
bool StartFrameDumpToAVI(const FrameDumpConfig& config);
|
||||
void DumpFrameToAVI(const FrameDumpConfig& config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user