diff options
| author | 2017-03-21 13:25:56 +0200 | |
|---|---|---|
| committer | 2017-03-21 13:25:56 +0200 | |
| commit | f7a0328a6e577b60861ff25c8558c6e591633564 (patch) | |
| tree | 5d4ecec860a63a2a5f382b9c94f4d759df56cff6 /src/core/hle/shared_page.cpp | |
| parent | Removed a linebreak from the README. (diff) | |
| download | yuzu-f7a0328a6e577b60861ff25c8558c6e591633564.tar.gz yuzu-f7a0328a6e577b60861ff25c8558c6e591633564.tar.xz yuzu-f7a0328a6e577b60861ff25c8558c6e591633564.zip | |
shared_page: stub battery state
Diffstat (limited to 'src/core/hle/shared_page.cpp')
| -rw-r--r-- | src/core/hle/shared_page.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/shared_page.cpp b/src/core/hle/shared_page.cpp index d0d92487d..5978ccdd4 100644 --- a/src/core/hle/shared_page.cpp +++ b/src/core/hle/shared_page.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <cstring> | 6 | #include <cstring> |
| 7 | #include <ctime> | 7 | #include <ctime> |
| 8 | #include "core/core_timing.h" | 8 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/ptm/ptm.h" | ||
| 9 | #include "core/hle/shared_page.h" | 10 | #include "core/hle/shared_page.h" |
| 10 | 11 | ||
| 11 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 12 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| @@ -73,6 +74,12 @@ void Init() { | |||
| 73 | // Some games wait until this value becomes 0x1, before asking running_hw | 74 | // Some games wait until this value becomes 0x1, before asking running_hw |
| 74 | shared_page.unknown_value = 0x1; | 75 | shared_page.unknown_value = 0x1; |
| 75 | 76 | ||
| 77 | // Set to a completely full battery | ||
| 78 | shared_page.battery_state.charge_level.Assign( | ||
| 79 | static_cast<u8>(Service::PTM::ChargeLevels::CompletelyFull)); | ||
| 80 | shared_page.battery_state.is_adapter_connected.Assign(1); | ||
| 81 | shared_page.battery_state.is_charging.Assign(1); | ||
| 82 | |||
| 76 | update_time_event = | 83 | update_time_event = |
| 77 | CoreTiming::RegisterEvent("SharedPage::UpdateTimeCallback", UpdateTimeCallback); | 84 | CoreTiming::RegisterEvent("SharedPage::UpdateTimeCallback", UpdateTimeCallback); |
| 78 | CoreTiming::ScheduleEvent(0, update_time_event); | 85 | CoreTiming::ScheduleEvent(0, update_time_event); |