summaryrefslogtreecommitdiffstats
path: root/src/core/hle/shared_page.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-04-06 20:43:29 +0200
committerGitHub <noreply@github.com>2017-04-06 20:43:29 +0200
commit37b7df9c59caa9245129171dbeeb5434e0191966 (patch)
tree1b488d973580419db01bda76f663253788366cfe /src/core/hle/shared_page.cpp
parentMerge pull request #2651 from jroweboy/configmoved (diff)
parentshared_page: stub battery state (diff)
downloadyuzu-37b7df9c59caa9245129171dbeeb5434e0191966.tar
yuzu-37b7df9c59caa9245129171dbeeb5434e0191966.tar.gz
yuzu-37b7df9c59caa9245129171dbeeb5434e0191966.tar.bz2
yuzu-37b7df9c59caa9245129171dbeeb5434e0191966.tar.lz
yuzu-37b7df9c59caa9245129171dbeeb5434e0191966.tar.xz
yuzu-37b7df9c59caa9245129171dbeeb5434e0191966.tar.zst
yuzu-37b7df9c59caa9245129171dbeeb5434e0191966.zip
Diffstat (limited to 'src/core/hle/shared_page.cpp')
-rw-r--r--src/core/hle/shared_page.cpp7
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 @@
#include <cstring>
#include <ctime>
#include "core/core_timing.h"
+#include "core/hle/service/ptm/ptm.h"
#include "core/hle/shared_page.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -73,6 +74,12 @@ void Init() {
// Some games wait until this value becomes 0x1, before asking running_hw
shared_page.unknown_value = 0x1;
+ // Set to a completely full battery
+ shared_page.battery_state.charge_level.Assign(
+ static_cast<u8>(Service::PTM::ChargeLevels::CompletelyFull));
+ shared_page.battery_state.is_adapter_connected.Assign(1);
+ shared_page.battery_state.is_charging.Assign(1);
+
update_time_event =
CoreTiming::RegisterEvent("SharedPage::UpdateTimeCallback", UpdateTimeCallback);
CoreTiming::ScheduleEvent(0, update_time_event);