mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Config: Port Movie settings to new config system.
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
#include "Common/Timer.h"
|
||||
|
||||
#include "Core/Config/GraphicsSettings.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/NetplaySettings.h"
|
||||
#include "Core/Config/SYSCONFSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
@ -575,9 +576,10 @@ void Renderer::DrawDebugText()
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
const bool show_movie_window = config.m_ShowFrameCount | config.m_ShowLag |
|
||||
config.m_ShowInputDisplay | config.m_ShowRTC |
|
||||
config.m_ShowRerecord;
|
||||
const bool show_movie_window = config.m_ShowFrameCount || config.m_ShowLag ||
|
||||
Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY) ||
|
||||
Config::Get(Config::MAIN_MOVIE_SHOW_RTC) ||
|
||||
Config::Get(Config::MAIN_MOVIE_SHOW_RERECORD);
|
||||
if (show_movie_window)
|
||||
{
|
||||
// Position under the FPS display.
|
||||
@ -603,11 +605,11 @@ void Renderer::DrawDebugText()
|
||||
}
|
||||
if (SConfig::GetInstance().m_ShowLag)
|
||||
ImGui::Text("Lag: %" PRIu64 "\n", Movie::GetCurrentLagCount());
|
||||
if (SConfig::GetInstance().m_ShowInputDisplay)
|
||||
if (Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY))
|
||||
ImGui::TextUnformatted(Movie::GetInputDisplay().c_str());
|
||||
if (SConfig::GetInstance().m_ShowRTC)
|
||||
if (Config::Get(Config::MAIN_MOVIE_SHOW_RTC))
|
||||
ImGui::TextUnformatted(Movie::GetRTCDisplay().c_str());
|
||||
if (SConfig::GetInstance().m_ShowRerecord)
|
||||
if (Config::Get(Config::MAIN_MOVIE_SHOW_RERECORD))
|
||||
ImGui::TextUnformatted(Movie::GetRerecords().c_str());
|
||||
}
|
||||
ImGui::End();
|
||||
@ -1452,7 +1454,7 @@ bool Renderer::IsFrameDumping() const
|
||||
if (m_screenshot_request.IsSet())
|
||||
return true;
|
||||
|
||||
if (SConfig::GetInstance().m_DumpFrames)
|
||||
if (Config::Get(Config::MAIN_MOVIE_DUMP_FRAMES))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -1659,7 +1661,7 @@ void Renderer::FrameDumpThreadFunc()
|
||||
m_screenshot_completed.Set();
|
||||
}
|
||||
|
||||
if (SConfig::GetInstance().m_DumpFrames)
|
||||
if (Config::Get(Config::MAIN_MOVIE_DUMP_FRAMES))
|
||||
{
|
||||
if (!frame_dump_started)
|
||||
{
|
||||
@ -1670,7 +1672,7 @@ void Renderer::FrameDumpThreadFunc()
|
||||
|
||||
// Stop frame dumping if we fail to start.
|
||||
if (!frame_dump_started)
|
||||
SConfig::GetInstance().m_DumpFrames = false;
|
||||
Config::SetCurrent(Config::MAIN_MOVIE_DUMP_FRAMES, false);
|
||||
}
|
||||
|
||||
// If we failed to start frame dumping, don't write a frame.
|
||||
@ -1741,7 +1743,7 @@ std::string Renderer::GetFrameDumpNextImageFileName() const
|
||||
bool Renderer::StartFrameDumpToImage(const FrameDump::FrameData&)
|
||||
{
|
||||
m_frame_dump_image_counter = 1;
|
||||
if (!SConfig::GetInstance().m_DumpFramesSilent)
|
||||
if (!Config::Get(Config::MAIN_MOVIE_DUMP_FRAMES_SILENT))
|
||||
{
|
||||
// Only check for the presence of the first image to confirm overwriting.
|
||||
// A previous run will always have at least one image, and it's safe to assume that if the user
|
||||
|
Reference in New Issue
Block a user