From 716f656d286d24f32eca5316f6c9ea83c3455bb5 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Thu, 20 Jun 2013 06:08:17 -0400 Subject: [PATCH] Save sync gpu setting to dtm header. --- Source/Core/Core/Src/BootManager.cpp | 1 + Source/Core/Core/Src/Movie.cpp | 9 ++++++++- Source/Core/Core/Src/Movie.h | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp index e4ce413926..9e79de0d23 100644 --- a/Source/Core/Core/Src/BootManager.cpp +++ b/Source/Core/Core/Src/BootManager.cpp @@ -126,6 +126,7 @@ bool BootCore(const std::string& _rFilename) StartUp.bProgressive = Movie::IsProgressive(); StartUp.bFastDiscSpeed = Movie::IsFastDiscSpeed(); StartUp.iCPUCore = Movie::GetCPUMode(); + StartUp.bSyncGPU = Movie::IsSyncGPU(); if (Movie::IsUsingMemcard() && Movie::IsStartingFromClearSave() && !StartUp.bWii) { if (File::Exists("Movie.raw")) diff --git a/Source/Core/Core/Src/Movie.cpp b/Source/Core/Core/Src/Movie.cpp index 5a81c7d904..df5be29fa0 100644 --- a/Source/Core/Core/Src/Movie.cpp +++ b/Source/Core/Core/Src/Movie.cpp @@ -51,7 +51,7 @@ u64 g_currentLagCount = 0, g_totalLagCount = 0; // just stats u64 g_currentInputCount = 0, g_totalInputCount = 0; // just stats u64 g_recordingStartTime; // seconds since 1970 that recording started bool bSaveConfig, bSkipIdle, bDualCore, bProgressive, bDSPHLE, bFastDiscSpeed = false; -bool bMemcard, g_bClearSave = false; +bool bMemcard, g_bClearSave, bSyncGPU = false; std::string videoBackend = "unknown"; int iCPUCore = 1; bool g_bDiscChange = false; @@ -353,6 +353,10 @@ bool IsUsingMemcard() { return bMemcard; } +bool IsSyncGPU() +{ + return bSyncGPU; +} void ChangePads(bool instantly) { @@ -675,6 +679,7 @@ void ReadHeader() g_bClearSave = tmpHeader.bClearSave; bMemcard = tmpHeader.bMemcard; bongos = tmpHeader.bongos; + bSyncGPU = tmpHeader.bSyncGPU; memcpy(revision, tmpHeader.revision, ARRAYSIZE(revision)); } else @@ -1111,6 +1116,7 @@ void SaveRecording(const char *filename) header.bUseRealXFB = g_ActiveConfig.bUseRealXFB; header.bMemcard = bMemcard; header.bClearSave = g_bClearSave; + header.bSyncGPU = bSyncGPU; strncpy((char *)header.discChange, g_discChange.c_str(),ARRAYSIZE(header.discChange)); strncpy((char *)header.author, author.c_str(),ARRAYSIZE(header.author)); memcpy(header.md5,MD5,16); @@ -1169,6 +1175,7 @@ void GetSettings() bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE; bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed; videoBackend = g_video_backend->GetName(); + bSyncGPU = SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU; iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore; if (!Core::g_CoreStartupParameter.bWii) g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA); diff --git a/Source/Core/Core/Src/Movie.h b/Source/Core/Core/Src/Movie.h index a29b47ae79..27ac18e1b6 100644 --- a/Source/Core/Core/Src/Movie.h +++ b/Source/Core/Core/Src/Movie.h @@ -106,7 +106,8 @@ struct DTMHeader { bool bMemcard; bool bClearSave; // Create a new memory card when playing back a movie if true u8 bongos; - u8 reserved[15]; // Padding for any new config options + bool bSyncGPU; + u8 reserved[14]; // Padding for any new config options u8 discChange[40]; // Name of iso file to switch to, for two disc games. u8 revision[20]; // Git hash u8 reserved2[27]; // Make heading 256 bytes, just because we can @@ -138,6 +139,7 @@ bool IsFastDiscSpeed(); int GetCPUMode(); bool IsStartingFromClearSave(); bool IsUsingMemcard(); +bool IsSyncGPU(); void SetGraphicsConfig(); void GetSettings();