mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 14:15:41 +12:00
[Applets] Properly expose nextParameter
This commit is contained in:
parent
135c8cb508
commit
60b565273e
5 changed files with 15 additions and 4 deletions
|
@ -72,7 +72,9 @@ namespace Applets {
|
|||
};
|
||||
|
||||
class AppletBase {
|
||||
protected:
|
||||
Memory& mem;
|
||||
std::optional<Parameter>& nextParameter;
|
||||
|
||||
public:
|
||||
virtual const char* name() = 0;
|
||||
|
@ -83,6 +85,6 @@ namespace Applets {
|
|||
virtual Result::HorizonResult receiveParameter() = 0;
|
||||
virtual void reset() = 0;
|
||||
|
||||
AppletBase(Memory& mem) : mem(mem) {}
|
||||
AppletBase(Memory& mem, std::optional<Parameter>& nextParam) : mem(mem), nextParameter(nextParam) {}
|
||||
};
|
||||
} // namespace Applets
|
|
@ -8,6 +8,6 @@ namespace Applets {
|
|||
virtual Result::HorizonResult receiveParameter() override;
|
||||
virtual void reset() override;
|
||||
|
||||
MiiSelectorApplet(Memory& memory) : AppletBase(memory) {}
|
||||
MiiSelectorApplet(Memory& memory, std::optional<Parameter>& nextParam) : AppletBase(memory, nextParam) {}
|
||||
};
|
||||
} // namespace Applets
|
|
@ -8,6 +8,6 @@ namespace Applets {
|
|||
virtual Result::HorizonResult receiveParameter() override;
|
||||
virtual void reset() override;
|
||||
|
||||
SoftwareKeyboardApplet(Memory& memory) : AppletBase(memory) {}
|
||||
SoftwareKeyboardApplet(Memory& memory, std::optional<Parameter>& nextParam) : AppletBase(memory, nextParam) {}
|
||||
};
|
||||
} // namespace Applets
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
using namespace Applets;
|
||||
|
||||
AppletManager::AppletManager(Memory& mem) : miiSelector(mem), swkbd(mem) {}
|
||||
AppletManager::AppletManager(Memory& mem) : miiSelector(mem, nextParameter), swkbd(mem, nextParameter) {}
|
||||
|
||||
void AppletManager::reset() {
|
||||
miiSelector.reset();
|
||||
|
|
|
@ -7,5 +7,14 @@ Result::HorizonResult SoftwareKeyboardApplet::start() { return Result::Success;
|
|||
|
||||
Result::HorizonResult SoftwareKeyboardApplet::receiveParameter() {
|
||||
Helpers::warn("Software keyboard: Unimplemented ReceiveParameter");
|
||||
|
||||
Applets::Parameter param = Applets::Parameter{
|
||||
.senderID = AppletIDs::SoftwareKeyboard,
|
||||
.destID = AppletIDs::Application,
|
||||
.signal = APTSignal::Response,
|
||||
.data = {},
|
||||
};
|
||||
|
||||
nextParameter = param;
|
||||
return Result::Success;
|
||||
}
|
Loading…
Add table
Reference in a new issue