summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-01-08 16:42:57 +0100
committerJosJuice <josjuice@gmail.com>2017-02-03 19:53:23 +0100
commit6aa41ebc55630cf5367540046f048f3435617c8c (patch)
treebb1ead0e64d93ab5eb6ffcd14a8cc4c10cfb2360
parent88e0a5e418824a31aa051875c5c0d2056ad84b0a (diff)
Movie: Put Wii s_bClearSave handling in a more logical place
-rw-r--r--Source/Core/Core/IOS/ES/ES.cpp9
-rw-r--r--Source/Core/Core/Movie.cpp21
-rw-r--r--Source/Core/Core/Movie.h1
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<u8>& 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);