diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-30 19:11:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 19:11:11 +0200 |
commit | 96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a (patch) | |
tree | aee3965fba62e5af9dbfa346b7b88bd01a526857 | |
parent | Merge pull request #3807 from ReinUsesLisp/fix-depth-clamp (diff) | |
parent | psm: Mark as debug instead of warning (diff) | |
download | yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.tar yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.tar.gz yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.tar.bz2 yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.tar.lz yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.tar.xz yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.tar.zst yuzu-96cd5dce8524ad1b83652aed6c1d5c0857a4cf5a.zip |
-rw-r--r-- | src/core/hle/service/ptm/psm.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/core/hle/service/ptm/psm.cpp b/src/core/hle/service/ptm/psm.cpp index c2d5fda94..12d154ecf 100644 --- a/src/core/hle/service/ptm/psm.cpp +++ b/src/core/hle/service/ptm/psm.cpp @@ -12,9 +12,6 @@ namespace Service::PSM { -constexpr u32 BATTERY_FULLY_CHARGED = 100; // 100% Full -constexpr u32 BATTERY_CURRENTLY_CHARGING = 1; // Plugged into an official dock - class PSM final : public ServiceFramework<PSM> { public: explicit PSM() : ServiceFramework{"psm"} { @@ -48,20 +45,30 @@ public: private: void GetBatteryChargePercentage(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_PSM, "(STUBBED) called"); + LOG_DEBUG(Service_PSM, "called"); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); - rb.Push<u32>(BATTERY_FULLY_CHARGED); + rb.Push<u32>(battery_charge_percentage); } void GetChargerType(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_PSM, "(STUBBED) called"); + LOG_DEBUG(Service_PSM, "called"); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); - rb.Push<u32>(BATTERY_CURRENTLY_CHARGING); + rb.PushEnum(charger_type); } + + enum class ChargerType : u32 { + Unplugged = 0, + RegularCharger = 1, + LowPowerCharger = 2, + Unknown = 3, + }; + + u32 battery_charge_percentage{100}; // 100% + ChargerType charger_type{ChargerType::RegularCharger}; }; void InstallInterfaces(SM::ServiceManager& sm) { |