diff options
author | Lioncash <mathew1800@gmail.com> | 2021-04-26 15:11:33 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-04-26 15:39:49 +0200 |
commit | dcb91ca4a4a97d279d01ebe010e07298acca1ba9 (patch) | |
tree | 873cdb75aadc3be02c833c205d8e37c375fa49dd /src/core/hle/service/bcat | |
parent | Merge pull request #6198 from Kewlan/favorite-games (diff) | |
download | yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.gz yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.bz2 yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.lz yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.xz yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.zst yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.zip |
Diffstat (limited to 'src/core/hle/service/bcat')
-rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/bcat/module.cpp | 22 |
2 files changed, 16 insertions, 10 deletions
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index 78c047bd2..cee1774d1 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp @@ -415,9 +415,9 @@ std::optional<std::vector<u8>> Boxcat::GetLaunchParameter(TitleIDVersion title) if (Settings::values.bcat_boxcat_local) { LOG_INFO(Service_BCAT, "Boxcat using local data by override, skipping download."); } else { - Boxcat::Client client{path, title.title_id, title.build_id}; + Client launch_client{path, title.title_id, title.build_id}; - const auto res = client.DownloadLaunchParam(); + const auto res = launch_client.DownloadLaunchParam(); if (res != DownloadResult::Success) { LOG_ERROR(Service_BCAT, "Boxcat synchronization failed with error '{}'!", res); diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index c7dd04a6e..285085f2a 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp @@ -174,9 +174,9 @@ private: }; std::shared_ptr<IDeliveryCacheProgressService> CreateProgressService(SyncType type) { - auto& backend{progress.at(static_cast<std::size_t>(type))}; - return std::make_shared<IDeliveryCacheProgressService>(system, backend.GetEvent(), - backend.GetImpl()); + auto& progress_backend{GetProgressBackend(type)}; + return std::make_shared<IDeliveryCacheProgressService>(system, progress_backend.GetEvent(), + progress_backend.GetImpl()); } void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) { @@ -184,7 +184,7 @@ private: backend.Synchronize({system.CurrentProcess()->GetTitleID(), GetCurrentBuildID(system.GetCurrentProcessBuildID())}, - progress.at(static_cast<std::size_t>(SyncType::Normal))); + GetProgressBackend(SyncType::Normal)); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); @@ -201,8 +201,7 @@ private: backend.SynchronizeDirectory({system.CurrentProcess()->GetTitleID(), GetCurrentBuildID(system.GetCurrentProcessBuildID())}, - name, - progress.at(static_cast<std::size_t>(SyncType::Directory))); + name, GetProgressBackend(SyncType::Directory)); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); @@ -265,9 +264,16 @@ private: rb.Push(RESULT_SUCCESS); } - Backend& backend; + ProgressServiceBackend& GetProgressBackend(SyncType type) { + return progress.at(static_cast<size_t>(type)); + } - std::array<ProgressServiceBackend, static_cast<std::size_t>(SyncType::Count)> progress; + const ProgressServiceBackend& GetProgressBackend(SyncType type) const { + return progress.at(static_cast<size_t>(type)); + } + + Backend& backend; + std::array<ProgressServiceBackend, static_cast<size_t>(SyncType::Count)> progress; }; void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) { |