mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-22 05:15:51 +12:00
Stub GSP::GPU::RestoreVramSysArea
This commit is contained in:
parent
d09254a8ae
commit
29494efd94
3 changed files with 25 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "applets/software_keyboard.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include "kernel/handles.hpp"
|
||||
|
||||
|
@ -38,8 +39,19 @@ Result::HorizonResult SoftwareKeyboardApplet::start(const MemoryBlock& sharedMem
|
|||
return Result::Success;
|
||||
}
|
||||
|
||||
// Get keyboard configuration from the application
|
||||
std::memcpy(&config, ¶meters[0], sizeof(config));
|
||||
|
||||
const std::u16string text = u"Pander";
|
||||
u32 textAddress = sharedMem.addr;
|
||||
|
||||
// Copy text to shared memory the app gave us
|
||||
for (u32 i = 0; i < text.size(); i++) {
|
||||
mem.write16(textAddress, u16(text[i]));
|
||||
textAddress += sizeof(u16);
|
||||
}
|
||||
mem.write16(textAddress, 0); // Write UTF-16 null terminator
|
||||
|
||||
// Temporarily hardcode the pressed button to be the firs tone
|
||||
switch (config.numButtonsM1) {
|
||||
case SoftwareKeyboardButtonConfig::SingleButton: config.returnCode = SoftwareKeyboardResult::D0Click; break;
|
||||
|
@ -48,6 +60,9 @@ Result::HorizonResult SoftwareKeyboardApplet::start(const MemoryBlock& sharedMem
|
|||
case SoftwareKeyboardButtonConfig::NoButton: config.returnCode = SoftwareKeyboardResult::None; break;
|
||||
}
|
||||
|
||||
config.textOffset = 0;
|
||||
config.textLength = static_cast<u16>(text.size());
|
||||
|
||||
if (config.filterFlags & SoftwareKeyboardFilter::Callback) {
|
||||
Helpers::warn("Unimplemented software keyboard profanity callback");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue