From 42500628e7ac7c28161ed1a40623e7c9bf2fb131 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 26 Apr 2021 10:37:40 +0200 Subject: [PATCH] early-access version 1635 --- README.md | 2 +- .../service/nvdrv/devices/nvhost_nvdec.cpp | 3 ++- .../hle/service/nvdrv/devices/nvhost_vic.cpp | 12 +++++------- src/video_core/gpu.cpp | 4 +--- src/video_core/gpu.h | 4 ++-- src/yuzu/configuration/config.cpp | 19 ++++++++++--------- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index dca2b583f..1e6e5f67f 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1632. +This is the source code for early-access 1635. ## Legal Notice diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index 8b37f7a3f..aa51d44c5 100755 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp @@ -66,7 +66,8 @@ NvResult nvhost_nvdec::Ioctl3(DeviceFD fd, Ioctl command, const std::vector& void nvhost_nvdec::OnOpen(DeviceFD fd) {} void nvhost_nvdec::OnClose(DeviceFD fd) { - system.GPU().ClearCommandBuffer(); + LOG_INFO(Service_NVDRV, "NVDEC video stream ended"); + system.GPU().ClearCdmaInstance(); system.GPU().MemoryManager().InvalidateQueuedCaches(); } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index 6c2f95fc0..8e712c451 100755 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -30,13 +30,8 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, const std::vector& i return GetWaitbase(input, output); case 0x9: return MapBuffer(input, output); - case 0xa: { - if (command.length == 0x1c) { - Tegra::ChCommandHeaderList cmdlist{{0xDEADB33F}}; - system.GPU().PushCommandBuffer(cmdlist); - } + case 0xa: return UnmapBuffer(input, output); - } default: break; } @@ -70,6 +65,9 @@ NvResult nvhost_vic::Ioctl3(DeviceFD fd, Ioctl command, const std::vector& i } void nvhost_vic::OnOpen(DeviceFD fd) {} -void nvhost_vic::OnClose(DeviceFD fd) {} + +void nvhost_vic::OnClose(DeviceFD fd) { + system.GPU().ClearCdmaInstance(); +} } // namespace Service::Nvidia::Devices diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 7c42f1177..a38024242 100755 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -492,10 +492,8 @@ void GPU::PushCommandBuffer(Tegra::ChCommandHeaderList& entries) { cdma_pusher->ProcessEntries(std::move(entries)); } -void GPU::ClearCommandBuffer() { - // This condition fires when a video stream ends, clear all intermediary data +void GPU::ClearCdmaInstance() { cdma_pusher.reset(); - LOG_INFO(Service_NVDRV, "NVDEC video stream ended"); } void GPU::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index b1960ea86..8669e9940 100755 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -324,8 +324,8 @@ public: /// Push GPU command buffer entries to be processed void PushCommandBuffer(Tegra::ChCommandHeaderList& entries); - /// Frees the CDMAPusher to free up resources - void ClearCommandBuffer(); + /// Frees the CDMAPusher instance to free up resources + void ClearCdmaInstance(); /// Swap buffers (render frame) void SwapBuffers(const Tegra::FramebufferConfig* framebuffer); diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 50f332cf1..d1b8c4fc9 100755 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -29,9 +29,10 @@ Config::~Config() { } const std::array Config::default_buttons = { - Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_3, Qt::Key_4, Qt::Key_Q, - Qt::Key_W, Qt::Key_1, Qt::Key_2, Qt::Key_N, Qt::Key_M, Qt::Key_F, Qt::Key_T, - Qt::Key_H, Qt::Key_G, Qt::Key_D, Qt::Key_C, Qt::Key_B, Qt::Key_V, + Qt::Key_C, Qt::Key_X, Qt::Key_V, Qt::Key_Z, Qt::Key_F, + Qt::Key_G, Qt::Key_Q, Qt::Key_E, Qt::Key_R, Qt::Key_T, + Qt::Key_M, Qt::Key_N, Qt::Key_Left, Qt::Key_Up, Qt::Key_Right, + Qt::Key_Down, Qt::Key_Q, Qt::Key_E, 0, 0, }; const std::array Config::default_motions = { @@ -41,10 +42,10 @@ const std::array Config::default_motion const std::array, Settings::NativeAnalog::NumAnalogs> Config::default_analogs{{ { - Qt::Key_Up, - Qt::Key_Down, - Qt::Key_Left, - Qt::Key_Right, + Qt::Key_W, + Qt::Key_S, + Qt::Key_A, + Qt::Key_D, }, { Qt::Key_I, @@ -55,8 +56,8 @@ const std::array, Settings::NativeAnalog::NumAnalogs> Config: }}; const std::array Config::default_stick_mod = { - Qt::Key_E, - Qt::Key_R, + Qt::Key_Shift, + 0, }; const std::array Config::default_mouse_buttons =