diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2018-12-24 13:39:07 -0500 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2019-04-25 08:07:57 -0400 |
| commit | c40cff454d0b4af1c14cafe11ca7372be8ccbd11 (patch) | |
| tree | 939cc519cf8f7f6df253b228ae6bd26f14506fda /src/core/hle/service/mii/mii_manager.cpp | |
| parent | f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb (diff) | |
mii: Implement IsUpdated command (IPC 0)
Diffstat (limited to 'src/core/hle/service/mii/mii_manager.cpp')
| -rw-r--r-- | src/core/hle/service/mii/mii_manager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index 083c62b1e..7011ea2bd 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp @@ -204,6 +204,14 @@ MiiInfo MiiManager::CreateDefault(u32 index) { return ConvertStoreDataToInfo(new_mii); } +bool MiiManager::CheckUpdatedFlag() const { + return updated_flag; +} + +void MiiManager::ResetUpdatedFlag() { + updated_flag = false; +} + bool MiiManager::Empty() const { return Size() == 0; } @@ -213,6 +221,7 @@ bool MiiManager::Full() const { } void MiiManager::Clear() { + updated_flag = true; std::fill(database.miis.begin(), database.miis.end(), MiiStoreData{}); } @@ -244,6 +253,7 @@ bool MiiManager::Remove(Common::UUID uuid) { if (iter == database.miis.end()) return false; + updated_flag = true; *iter = MiiStoreData{}; EnsureDatabasePartition(); return true; @@ -277,6 +287,7 @@ bool MiiManager::Move(Common::UUID uuid, u32 new_index) { if (index == INVALID_INDEX || new_index >= MAX_MIIS) return false; + updated_flag = true; const auto moving = database.miis[index]; const auto replacing = database.miis[new_index]; if (replacing.uuid) { @@ -294,6 +305,7 @@ bool MiiManager::Move(Common::UUID uuid, u32 new_index) { bool MiiManager::AddOrReplace(const MiiStoreData& data) { const auto index = IndexOf(data.uuid); + updated_flag = true; if (index == INVALID_INDEX) { const auto size = Size(); if (size == MAX_MIIS) |
