mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-25 18:57:56 -05:00
nvnflinger: allow locking framerate during video playback
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user