mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Split PTM services
This commit is contained in:
parent
1332488326
commit
712be4ce72
4 changed files with 62 additions and 16 deletions
|
@ -7,7 +7,6 @@
|
|||
#include "result/result.hpp"
|
||||
|
||||
class PTMService {
|
||||
Handle handle = KernelHandles::PTM;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, ptmLogger)
|
||||
|
||||
|
@ -19,12 +18,19 @@ class PTMService {
|
|||
void getBatteryChargeState(u32 messagePointer);
|
||||
void getBatteryLevel(u32 messagePointer);
|
||||
void getStepHistory(u32 messagePointer);
|
||||
void getStepHistoryAll(u32 messagePointer);
|
||||
void getTotalStepCount(u32 messagePointer);
|
||||
|
||||
public:
|
||||
enum class Type {
|
||||
U, // ptm:u
|
||||
SYSM, // ptm:sysm
|
||||
PLAY, // ptm:play
|
||||
};
|
||||
|
||||
PTMService(Memory& mem, const EmulatorConfig& config) : mem(mem), config(config) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
void handleSyncRequest(u32 messagePointer, Type type);
|
||||
|
||||
// 0% -> 0 (shutting down)
|
||||
// 1-5% -> 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue