summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-27 04:24:31 +0200
committerbunnei <bunneidev@gmail.com>2018-03-27 05:02:35 +0200
commit12b05c719eac7ed289a1d3d2acfb94704326fac1 (patch)
treebc325f8b272ee36157eb8f06c1fae89bb6d8151d /src/core/hle/service
parentMerge pull request #279 from bunnei/tegra-progress-3 (diff)
downloadyuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.tar
yuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.tar.gz
yuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.tar.bz2
yuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.tar.lz
yuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.tar.xz
yuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.tar.zst
yuzu-12b05c719eac7ed289a1d3d2acfb94704326fac1.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/am/am.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index d9f003ed4..07522e730 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -12,6 +12,7 @@
#include "core/hle/service/apm/apm.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/nvflinger/nvflinger.h"
+#include "core/settings.h"
namespace Service {
namespace AM {
@@ -241,17 +242,20 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) {
}
void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) {
+ const bool is_docked{Settings::values.is_docked};
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push(static_cast<u8>(OperationMode::Handheld));
+ rb.Push(static_cast<u8>(is_docked ? OperationMode::Docked : OperationMode::Handheld));
LOG_WARNING(Service_AM, "(STUBBED) called");
}
void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) {
+ const bool is_docked{Settings::values.is_docked};
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push(static_cast<u32>(APM::PerformanceMode::Handheld));
+ rb.Push(static_cast<u32>(is_docked ? APM::PerformanceMode::Docked
+ : APM::PerformanceMode::Handheld));
LOG_WARNING(Service_AM, "(STUBBED) called");
}