aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/ptm/ts.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-10-14 17:30:11 -0400
committerGitHub <noreply@github.com>2022-10-14 17:30:11 -0400
commit1d3810971453df275ccd0fcdfb9c480a070c30c3 (patch)
treed55dcc3f619ea075f55b4085648ffafb7717eed9 /src/core/hle/service/ptm/ts.cpp
parent6a9bbb012830d440f049667977c91e14bb925ac8 (diff)
parent61a8696510b3bca120f1f0289a3829e3db14834e (diff)
Merge pull request #9055 from liamwhite/hbl
Preliminary support for nx-hbloader
Diffstat (limited to 'src/core/hle/service/ptm/ts.cpp')
-rw-r--r--src/core/hle/service/ptm/ts.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/hle/service/ptm/ts.cpp b/src/core/hle/service/ptm/ts.cpp
index 65c3f135f..b1a0a5544 100644
--- a/src/core/hle/service/ptm/ts.cpp
+++ b/src/core/hle/service/ptm/ts.cpp
@@ -15,7 +15,7 @@ TS::TS(Core::System& system_) : ServiceFramework{system_, "ts"} {
{0, nullptr, "GetTemperatureRange"},
{1, &TS::GetTemperature, "GetTemperature"},
{2, nullptr, "SetMeasurementMode"},
- {3, nullptr, "GetTemperatureMilliC"},
+ {3, &TS::GetTemperatureMilliC, "GetTemperatureMilliC"},
{4, nullptr, "OpenSession"},
};
// clang-format on
@@ -29,8 +29,6 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto location{rp.PopEnum<Location>()};
- LOG_WARNING(Service_HID, "(STUBBED) called. location={}", location);
-
const s32 temperature = location == Location::Internal ? 35 : 20;
IPC::ResponseBuilder rb{ctx, 3};
@@ -38,4 +36,15 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) {
rb.Push(temperature);
}
+void TS::GetTemperatureMilliC(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const auto location{rp.PopEnum<Location>()};
+
+ const s32 temperature = location == Location::Internal ? 35000 : 20000;
+
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(ResultSuccess);
+ rb.Push(temperature);
+}
+
} // namespace Service::PTM