mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Merge pull request #1272 from RisingFog/sconfig-dump-frames
Move bDumpFrames to SConfig (and it's references)
This commit is contained in:
@ -713,7 +713,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||
{
|
||||
if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
|
||||
{
|
||||
if (g_ActiveConfig.bDumpFrames && !frame_data.empty())
|
||||
if (SConfig::GetInstance().m_DumpFrames && !frame_data.empty())
|
||||
AVIDump::AddFrame(&frame_data[0], fbWidth, fbHeight);
|
||||
|
||||
Core::Callback_VideoCopiedToXFB(false);
|
||||
@ -724,7 +724,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||
const XFBSourceBase* const* xfbSourceList = FramebufferManager::GetXFBSource(xfbAddr, fbWidth, fbHeight, &xfbCount);
|
||||
if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
|
||||
{
|
||||
if (g_ActiveConfig.bDumpFrames && !frame_data.empty())
|
||||
if (SConfig::GetInstance().m_DumpFrames && !frame_data.empty())
|
||||
AVIDump::AddFrame(&frame_data[0], fbWidth, fbHeight);
|
||||
|
||||
Core::Callback_VideoCopiedToXFB(false);
|
||||
@ -833,7 +833,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||
|
||||
// Dump frames
|
||||
static int w = 0, h = 0;
|
||||
if (g_ActiveConfig.bDumpFrames)
|
||||
if (SConfig::GetInstance().m_DumpFrames)
|
||||
{
|
||||
static int s_recordWidth;
|
||||
static int s_recordHeight;
|
||||
|
@ -1366,10 +1366,10 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||
static void DumpFrame(const std::vector<u8>& data, int w, int h)
|
||||
{
|
||||
#if defined(HAVE_LIBAV) || defined(_WIN32)
|
||||
if (g_ActiveConfig.bDumpFrames && !data.empty())
|
||||
{
|
||||
AVIDump::AddFrame(&data[0], w, h);
|
||||
}
|
||||
if (SConfig::GetInstance().m_DumpFrames && !data.empty())
|
||||
{
|
||||
AVIDump::AddFrame(&data[0], w, h);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1516,7 +1516,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL)
|
||||
{
|
||||
#if defined _WIN32 || defined HAVE_LIBAV
|
||||
if (g_ActiveConfig.bDumpFrames)
|
||||
if (SConfig::GetInstance().m_DumpFrames)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(s_criticalScreenshot);
|
||||
if (frame_data.empty() || w != flipped_trc.GetWidth() ||
|
||||
@ -1577,7 +1577,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||
bLastFrameDumped = false;
|
||||
}
|
||||
#else
|
||||
if (g_ActiveConfig.bDumpFrames)
|
||||
if (SConfig::GetInstance().m_DumpFrames)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(s_criticalScreenshot);
|
||||
std::string movie_file_name;
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
#include "VideoBackends/Software/BPMemLoader.h"
|
||||
#include "VideoBackends/Software/DebugUtil.h"
|
||||
#include "VideoBackends/Software/EfbInterface.h"
|
||||
@ -253,7 +255,7 @@ void OnFrameEnd(u32 width, u32 height)
|
||||
{
|
||||
if (!g_bSkipCurrentFrame)
|
||||
{
|
||||
if (g_SWVideoConfig.bDumpFrames)
|
||||
if (SConfig::GetInstance().m_DumpFrames)
|
||||
{
|
||||
DumpColorTexture(StringFromFormat("%sframe%i_color.png",
|
||||
File::GetUserPath(D_DUMPFRAMES_IDX).c_str(), swstats.frameCount), width, height);
|
||||
|
@ -21,7 +21,6 @@ SWVideoConfig::SWVideoConfig()
|
||||
|
||||
bDumpTextures = false;
|
||||
bDumpObjects = false;
|
||||
bDumpFrames = false;
|
||||
|
||||
bZComploc = true;
|
||||
bZFreeze = true;
|
||||
|
@ -31,7 +31,6 @@ struct SWVideoConfig : NonCopyable
|
||||
|
||||
bool bDumpTextures;
|
||||
bool bDumpObjects;
|
||||
bool bDumpFrames;
|
||||
|
||||
// Debug only
|
||||
bool bDumpTevStages;
|
||||
|
Reference in New Issue
Block a user