From 92e3f842424b8332f6b5be13b02e6a58e3fa5858 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 9 Jul 2020 14:09:21 +0100 Subject: [PATCH] Stub SetGraphicsFirmwareMemoryMarginEnabled This is used by most retail games released after 3.0. --- app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.cpp | 5 ++++- app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.cpp b/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.cpp index 0dfcec6a..29bafe33 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.cpp +++ b/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.cpp @@ -60,7 +60,8 @@ namespace skyline::service::nvdrv { {0x2, SFUNC(INvDrvServices::Close)}, {0x3, SFUNC(INvDrvServices::Initialize)}, {0x4, SFUNC(INvDrvServices::QueryEvent)}, - {0x8, SFUNC(INvDrvServices::SetAruidByPID)} + {0x8, SFUNC(INvDrvServices::SetAruidByPID)}, + {0xd, SFUNC(INvDrvServices::SetGraphicsFirmwareMemoryMarginEnabled)} }) {} void INvDrvServices::Open(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { @@ -134,4 +135,6 @@ namespace skyline::service::nvdrv { void INvDrvServices::SetAruidByPID(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { response.Push(constant::status::Success); } + + void INvDrvServices::SetGraphicsFirmwareMemoryMarginEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {} } diff --git a/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.h b/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.h index 367827af..299de948 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.h +++ b/app/src/main/cpp/skyline/services/nvdrv/INvDrvServices.h @@ -90,5 +90,10 @@ namespace skyline::service::nvdrv { * @brief This sets the AppletResourceUserId which matches the PID (https://switchbrew.org/wiki/NV_services#SetAruidByPID) */ void SetAruidByPID(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @brief This enables the graphics firmware memory margin (https://switchbrew.org/wiki/NV_services#SetGraphicsFirmwareMemoryMarginEnabled) + */ + void SetGraphicsFirmwareMemoryMarginEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); }; }