summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-06-09 03:53:57 +0200
committerGitHub <noreply@github.com>2023-06-09 03:53:57 +0200
commit2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27 (patch)
tree0e8077362c472ee5d30ff92a036fa4d8f45d9ee6 /src/core/hle/service
parentMerge pull request #10676 from bunnei/fix-mi-5-android (diff)
parentnvnflinger: allow locking framerate during video playback (diff)
downloadyuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.tar
yuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.tar.gz
yuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.tar.bz2
yuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.tar.lz
yuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.tar.xz
yuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.tar.zst
yuzu-2a1acbfb4d0de3f5dadea014dc7a5c2a31366f27.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp4
-rw-r--r--src/core/hle/service/nvnflinger/nvnflinger.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
index 0c7aee1b8..dc45169ad 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
@@ -69,7 +69,7 @@ NvResult nvhost_nvdec::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8> in
void nvhost_nvdec::OnOpen(DeviceFD fd) {
LOG_INFO(Service_NVDRV, "NVDEC video stream started");
- system.AudioCore().SetNVDECActive(true);
+ system.SetNVDECActive(true);
}
void nvhost_nvdec::OnClose(DeviceFD fd) {
@@ -79,7 +79,7 @@ void nvhost_nvdec::OnClose(DeviceFD fd) {
if (iter != host1x_file.fd_to_id.end()) {
system.GPU().ClearCdmaInstance(iter->second);
}
- system.AudioCore().SetNVDECActive(false);
+ system.SetNVDECActive(false);
}
} // namespace Service::Nvidia::Devices
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp
index 4988e6e17..da2d5890f 100644
--- a/src/core/hle/service/nvnflinger/nvnflinger.cpp
+++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp
@@ -324,6 +324,10 @@ s64 Nvnflinger::GetNextTicks() const {
speed_scale = 0.01f;
}
}
+ if (system.GetNVDECActive() && settings.use_video_framerate.GetValue()) {
+ // Run at intended presentation rate during video playback.
+ speed_scale = 1.f;
+ }
// As an extension, treat nonpositive swap interval as framerate multiplier.
const f32 effective_fps = swap_interval <= 0 ? 120.f * static_cast<f32>(1 - swap_interval)