diff options
author | bunnei <bunneidev@gmail.com> | 2022-09-10 20:01:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 20:01:11 +0200 |
commit | cd4b9bffb2d42b1f8d4386b251a35344891df55a (patch) | |
tree | 53454fa29c30e9fa7f1f2c31f9586839d799f277 /src/core | |
parent | Merge pull request #8863 from german77/triggers (diff) | |
parent | Don't stall with nvdec (diff) | |
download | yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.tar yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.tar.gz yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.tar.bz2 yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.tar.lz yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.tar.xz yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.tar.zst yuzu-cd4b9bffb2d42b1f8d4386b251a35344891df55a.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/result.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 4de44cd06..47a1b829b 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -117,6 +117,7 @@ union Result { BitField<0, 9, ErrorModule> module; BitField<9, 13, u32> description; + Result() = default; constexpr explicit Result(u32 raw_) : raw(raw_) {} constexpr Result(ErrorModule module_, u32 description_) @@ -130,6 +131,7 @@ union Result { return !IsSuccess(); } }; +static_assert(std::is_trivial_v<Result>); [[nodiscard]] constexpr bool operator==(const Result& a, const Result& b) { return a.raw == b.raw; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index 2a5128c60..a7385fce8 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "audio_core/audio_core.h" #include "common/assert.h" #include "common/logging/log.h" #include "core/core.h" @@ -65,7 +66,10 @@ NvResult nvhost_nvdec::Ioctl3(DeviceFD fd, Ioctl command, const std::vector<u8>& return NvResult::NotImplemented; } -void nvhost_nvdec::OnOpen(DeviceFD fd) {} +void nvhost_nvdec::OnOpen(DeviceFD fd) { + LOG_INFO(Service_NVDRV, "NVDEC video stream started"); + system.AudioCore().SetNVDECActive(true); +} void nvhost_nvdec::OnClose(DeviceFD fd) { LOG_INFO(Service_NVDRV, "NVDEC video stream ended"); @@ -73,6 +77,7 @@ void nvhost_nvdec::OnClose(DeviceFD fd) { if (iter != fd_to_id.end()) { system.GPU().ClearCdmaInstance(iter->second); } + system.AudioCore().SetNVDECActive(false); } } // namespace Service::Nvidia::Devices |