diff options
| author | 2022-10-11 18:15:30 -0400 | |
|---|---|---|
| committer | 2022-10-11 18:15:30 -0400 | |
| commit | 6bcd676b610773727f446a8c81bcca1c64a95b10 (patch) | |
| tree | cbf54dcfae491b57034fcc6841f6eaa5f3ab29c2 /src/core/hle/service/ptm | |
| parent | Merge pull request #9048 from Kelebek1/regs (diff) | |
| download | yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.gz yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.tar.xz yuzu-6bcd676b610773727f446a8c81bcca1c64a95b10.zip | |
general: preliminary support for hbl
Diffstat (limited to 'src/core/hle/service/ptm')
| -rw-r--r-- | src/core/hle/service/ptm/ts.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/ptm/ts.h | 1 |
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"} { | |||
| 15 | {0, nullptr, "GetTemperatureRange"}, | 15 | {0, nullptr, "GetTemperatureRange"}, |
| 16 | {1, &TS::GetTemperature, "GetTemperature"}, | 16 | {1, &TS::GetTemperature, "GetTemperature"}, |
| 17 | {2, nullptr, "SetMeasurementMode"}, | 17 | {2, nullptr, "SetMeasurementMode"}, |
| 18 | {3, nullptr, "GetTemperatureMilliC"}, | 18 | {3, &TS::GetTemperatureMilliC, "GetTemperatureMilliC"}, |
| 19 | {4, nullptr, "OpenSession"}, | 19 | {4, nullptr, "OpenSession"}, |
| 20 | }; | 20 | }; |
| 21 | // clang-format on | 21 | // clang-format on |
| @@ -29,8 +29,6 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) { | |||
| 29 | IPC::RequestParser rp{ctx}; | 29 | IPC::RequestParser rp{ctx}; |
| 30 | const auto location{rp.PopEnum<Location>()}; | 30 | const auto location{rp.PopEnum<Location>()}; |
| 31 | 31 | ||
| 32 | LOG_WARNING(Service_HID, "(STUBBED) called. location={}", location); | ||
| 33 | |||
| 34 | const s32 temperature = location == Location::Internal ? 35 : 20; | 32 | const s32 temperature = location == Location::Internal ? 35 : 20; |
| 35 | 33 | ||
| 36 | IPC::ResponseBuilder rb{ctx, 3}; | 34 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -38,4 +36,15 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) { | |||
| 38 | rb.Push(temperature); | 36 | rb.Push(temperature); |
| 39 | } | 37 | } |
| 40 | 38 | ||
| 39 | void TS::GetTemperatureMilliC(Kernel::HLERequestContext& ctx) { | ||
| 40 | IPC::RequestParser rp{ctx}; | ||
| 41 | const auto location{rp.PopEnum<Location>()}; | ||
| 42 | |||
| 43 | const s32 temperature = location == Location::Internal ? 35000 : 20000; | ||
| 44 | |||
| 45 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 46 | rb.Push(ResultSuccess); | ||
| 47 | rb.Push(temperature); | ||
| 48 | } | ||
| 49 | |||
| 41 | } // namespace Service::PTM | 50 | } // 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: | |||
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | void GetTemperature(Kernel::HLERequestContext& ctx); | 22 | void GetTemperature(Kernel::HLERequestContext& ctx); |
| 23 | void GetTemperatureMilliC(Kernel::HLERequestContext& ctx); | ||
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | } // namespace Service::PTM | 26 | } // namespace Service::PTM |