Make battery stuff configurable

This commit is contained in:
wheremyfoodat 2023-08-18 22:17:33 +03:00
parent 950e5da03a
commit 51b2b8eee5
9 changed files with 36 additions and 12 deletions

View file

@ -1,4 +1,5 @@
#pragma once
#include "config.hpp"
#include "helpers.hpp"
#include "kernel_types.hpp"
#include "logger.hpp"
@ -10,6 +11,8 @@ class PTMService {
Memory& mem;
MAKE_LOG_FUNCTION(log, ptmLogger)
const EmulatorConfig& config;
// Service commands
void configureNew3DSCPU(u32 messagePointer);
void getAdapterState(u32 messagePointer);
@ -18,7 +21,7 @@ class PTMService {
void getTotalStepCount(u32 messagePointer);
public:
PTMService(Memory& mem) : mem(mem) {}
PTMService(Memory& mem, const EmulatorConfig& config) : mem(mem), config(config) {}
void reset();
void handleSyncRequest(u32 messagePointer);

View file

@ -33,6 +33,7 @@
#include "services/ssl.hpp"
#include "services/y2r.hpp"
class EmulatorConfig;
// More circular dependencies!!
class Kernel;
@ -80,7 +81,7 @@ class ServiceManager {
void subscribe(u32 messagePointer);
public:
ServiceManager(std::span<u32, 16> regs, Memory& mem, GPU& gpu, u32& currentPID, Kernel& kernel);
ServiceManager(std::span<u32, 16> regs, Memory& mem, GPU& gpu, u32& currentPID, Kernel& kernel, const EmulatorConfig& config);
void reset();
void initializeFS() { fs.initializeFilesystem(); }
void handleSyncRequest(u32 messagePointer);