More appleting

This commit is contained in:
wheremyfoodat 2023-08-04 19:26:12 +03:00
parent 412fba079e
commit 17724e77ca
4 changed files with 18 additions and 7 deletions

View file

@ -1,8 +1,11 @@
#include "applets/applet.hpp"
class MiiSelectorApplet final : public AppletBase {
virtual Result::HorizonResult start() override;
virtual void reset() override;
namespace Applets {
class MiiSelectorApplet final : public AppletBase {
public:
virtual Result::HorizonResult start() override;
virtual void reset() override;
MiiSelectorApplet(Memory& memory) : AppletBase(memory) {}
};
MiiSelectorApplet(Memory& memory) : AppletBase(memory) {}
};
} // namespace Applets

View file

@ -6,6 +6,8 @@
#include "memory.hpp"
#include "result/result.hpp"
#include "applets/mii_selector.hpp"
// Yay, more circular dependencies
class Kernel;
@ -24,6 +26,9 @@ class APTService {
ConsoleModel model = ConsoleModel::Old3DS;
// Applets here
Applets::MiiSelectorApplet miiSelector;
MAKE_LOG_FUNCTION(log, aptLogger)
// Service commands
@ -67,7 +72,7 @@ class APTService {
u32 screencapPostPermission;
public:
APTService(Memory& mem, Kernel& kernel) : mem(mem), kernel(kernel) {}
APTService(Memory& mem, Kernel& kernel) : mem(mem), kernel(kernel), miiSelector(mem) {}
void reset();
void handleSyncRequest(u32 messagePointer);
};

View file

@ -1,5 +1,6 @@
#include "applets/mii_selector.hpp"
void MiiSelectorApplet::reset() {}
using namespace Applets;
void MiiSelectorApplet::reset() {}
Result::HorizonResult MiiSelectorApplet::start() { return Result::Success; }

View file

@ -58,6 +58,8 @@ void APTService::reset() {
lockHandle = std::nullopt;
notificationEvent = std::nullopt;
resumeEvent = std::nullopt;
miiSelector.reset();
}
void APTService::handleSyncRequest(u32 messagePointer) {