summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ptm
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-10-12 00:15:30 +0200
committerLiam <byteslice@airmail.cc>2022-10-12 00:15:30 +0200
commit6bcd676b610773727f446a8c81bcca1c64a95b10 (patch)
treecbf54dcfae491b57034fcc6841f6eaa5f3ab29c2 /src/core/hle/service/ptm
parentMerge pull request #9048 from Kelebek1/regs (diff)
downloadyuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar
yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.gz
yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.bz2
yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.lz
yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.xz
yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.zst
yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.zip
Diffstat (limited to 'src/core/hle/service/ptm')
-rw-r--r--src/core/hle/service/ptm/ts.cpp15
-rw-r--r--src/core/hle/service/ptm/ts.h1
2 files changed, 13 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
diff --git a/src/core/hle/service/ptm/ts.h b/src/core/hle/service/ptm/ts.h
index 39a734ef7..39d51847e 100644
--- a/src/core/hle/service/ptm/ts.h
+++ b/src/core/hle/service/ptm/ts.h
@@ -20,6 +20,7 @@ private:
};
void GetTemperature(Kernel::HLERequestContext& ctx);
+ void GetTemperatureMilliC(Kernel::HLERequestContext& ctx);
};
} // namespace Service::PTM