diff options
| author | 2021-12-03 12:31:07 +0800 | |
|---|---|---|
| committer | 2021-12-05 00:06:14 +0800 | |
| commit | 5462485cc3835941713b835bce3b671b15d210b7 (patch) | |
| tree | e054071cd06fd36a0ca03478e168cb866a057b15 /src/video_core/gpu.cpp | |
| parent | Support multiple videos playing (diff) | |
| download | yuzu-5462485cc3835941713b835bce3b671b15d210b7.tar.gz yuzu-5462485cc3835941713b835bce3b671b15d210b7.tar.xz yuzu-5462485cc3835941713b835bce3b671b15d210b7.zip | |
Address feedback
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 27a47954d..8788f5148 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -333,8 +333,8 @@ struct GPU::Impl { | |||
| 333 | return; | 333 | return; |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | if (cdma_pushers.find(id) == cdma_pushers.end()) { | 336 | if (!cdma_pushers.contains(id)) { |
| 337 | cdma_pushers[id] = std::make_unique<Tegra::CDmaPusher>(gpu); | 337 | cdma_pushers.insert_or_assign(id, std::make_unique<Tegra::CDmaPusher>(gpu)); |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | // SubmitCommandBuffer would make the nvdec operations async, this is not currently working | 340 | // SubmitCommandBuffer would make the nvdec operations async, this is not currently working |
| @@ -345,8 +345,9 @@ struct GPU::Impl { | |||
| 345 | 345 | ||
| 346 | /// Frees the CDMAPusher instance to free up resources | 346 | /// Frees the CDMAPusher instance to free up resources |
| 347 | void ClearCdmaInstance(u32 id) { | 347 | void ClearCdmaInstance(u32 id) { |
| 348 | if (cdma_pushers.find(id) != cdma_pushers.end()) { | 348 | const auto iter = cdma_pushers.find(id); |
| 349 | cdma_pushers.erase(id); | 349 | if (iter != cdma_pushers.end()) { |
| 350 | cdma_pushers.erase(iter); | ||
| 350 | } | 351 | } |
| 351 | } | 352 | } |
| 352 | 353 | ||