From 7d518cba2b23d37301643d80ec9c99fcd11d0ce4 Mon Sep 17 00:00:00 2001 From: lynxnb Date: Wed, 23 Mar 2022 16:41:40 +0100 Subject: [PATCH] Stub `am::ICommonStateGetter::IsVrModeEnabled` --- .../skyline/services/am/controller/ICommonStateGetter.cpp | 5 +++++ .../skyline/services/am/controller/ICommonStateGetter.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.cpp b/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.cpp index 0571aed5..6f51e19c 100644 --- a/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.cpp @@ -52,6 +52,11 @@ namespace skyline::service::am { return {}; } + Result ICommonStateGetter::IsVrModeEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(false); + return {}; + } + Result ICommonStateGetter::GetDefaultDisplayResolution(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { if (operationMode == OperationMode::Handheld) { constexpr u16 HandheldResolutionW{1280}; diff --git a/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.h b/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.h index 3df05bef..2d8fc1e3 100644 --- a/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.h +++ b/app/src/main/cpp/skyline/services/am/controller/ICommonStateGetter.h @@ -83,6 +83,12 @@ namespace skyline::service::am { */ Result GetPerformanceMode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @brief Returns the state of VR mode + * @url https://switchbrew.org/wiki/Applet_Manager_services#IsVrModeEnabled + */ + Result IsVrModeEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief Returns the current display width and height in two u32s * @url https://switchbrew.org/wiki/Applet_Manager_services#GetDefaultDisplayResolution @@ -95,6 +101,7 @@ namespace skyline::service::am { SFUNC(0x5, ICommonStateGetter, GetOperationMode), SFUNC(0x6, ICommonStateGetter, GetPerformanceMode), SFUNC(0x9, ICommonStateGetter, GetCurrentFocusState), + SFUNC(0x32, ICommonStateGetter, IsVrModeEnabled), SFUNC(0x3C, ICommonStateGetter, GetDefaultDisplayResolution) ) };