shared_page: stub battery state
This commit is contained in:
parent
1db4afd4f4
commit
f7a0328a6e
2 changed files with 16 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue