From 6aa41ebc55630cf5367540046f048f3435617c8c Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 8 Jan 2017 16:42:57 +0100 Subject: [PATCH] Movie: Put Wii s_bClearSave handling in a more logical place --- Source/Core/Core/IOS/ES/ES.cpp | 9 +-------- Source/Core/Core/Movie.cpp | 21 +++------------------ Source/Core/Core/Movie.h | 1 - 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index 6602649441..a32fdc83a9 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -1317,15 +1317,8 @@ u32 ES::ES_DIVerify(const std::vector& tmd) File::CreateFullPath(Common::GetTitleDataPath(tmd_title_id, Common::FROM_SESSION_ROOT)); std::string save_path = Common::GetTitleDataPath(tmd_title_id, Common::FROM_SESSION_ROOT); - if (Movie::IsRecordingInput()) - { - // TODO: Check for the actual save data - if (File::Exists(save_path + "banner.bin")) - Movie::SetClearSave(false); - else - Movie::SetClearSave(true); - } + // TODO: There's not supposed to be a whole load of Movie code in IOS HLE. // TODO: Force the game to save to another location, instead of moving the user's save. if (Movie::IsPlayingInput() && Movie::IsConfigSaved() && Movie::IsStartingFromClearSave()) { diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index c1f45302b1..4717ae1ff5 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -374,11 +374,6 @@ u64 GetTotalLagCount() return s_totalLagCount; } -void SetClearSave(bool enabled) -{ - s_bClearSave = enabled; -} - void SignalDiscChange(const std::string& new_path) { if (Movie::IsRecordingInput()) @@ -573,19 +568,6 @@ bool BeginRecordingInput(int controllers) State::SaveAs(save_path); s_bRecordingFromSaveState = true; - // This is only done here if starting from save state because otherwise we won't have the - // titleid. Otherwise it's set in IOS::HLE::Device::ES. - // TODO: find a way to GetTitleDataPath() from Movie::Init() - // TODO: This comment is out of date. The title ID is no longer set in IOS::HLE::Device::ES - if (SConfig::GetInstance().bWii) - { - if (File::Exists(Common::GetTitleDataPath(SConfig::GetInstance().m_title_id, - Common::FROM_SESSION_ROOT) + - "banner.bin")) - Movie::s_bClearSave = false; - else - Movie::s_bClearSave = true; - } std::thread md5thread(GetMD5); md5thread.detach(); GetSettings(); @@ -1487,6 +1469,9 @@ void GetSettings() s_bNetPlay = NetPlay::IsNetPlayRunning(); if (SConfig::GetInstance().bWii) { + u64 title_id = SConfig::GetInstance().m_title_id; + s_bClearSave = + !File::Exists(Common::GetTitleDataPath(title_id, Common::FROM_SESSION_ROOT) + "banner.bin"); s_language = SConfig::GetInstance().m_wii_language; } else diff --git a/Source/Core/Core/Movie.h b/Source/Core/Core/Movie.h index e7da22d12e..811de415b0 100644 --- a/Source/Core/Core/Movie.h +++ b/Source/Core/Core/Movie.h @@ -129,7 +129,6 @@ u64 GetTotalInputCount(); u64 GetCurrentLagCount(); u64 GetTotalLagCount(); -void SetClearSave(bool enabled); void SignalDiscChange(const std::string& new_path); void SetReset(bool reset);