Add GetModule() helper functions, for HID, CAM, and CFG
This commit is contained in:
parent
1b1de23a98
commit
eb3af0f16a
12 changed files with 49 additions and 51 deletions
|
@ -136,13 +136,9 @@ ValidationError SoftwareKeyboard::Finalize(const std::string& text, u8 button) {
|
|||
void DefaultKeyboard::Setup(const Frontend::KeyboardConfig* config) {
|
||||
SoftwareKeyboard::Setup(config);
|
||||
|
||||
auto cfg =
|
||||
Core::System::GetInstance().ServiceManager().GetService<Service::CFG::Module::Interface>(
|
||||
"cfg:u");
|
||||
ASSERT_MSG(cfg, "cfg:u not started!");
|
||||
auto cfg_module = cfg->GetModule();
|
||||
ASSERT_MSG(cfg_module, "CFG Module missing!");
|
||||
std::string username = Common::UTF16ToUTF8(cfg_module->GetUsername());
|
||||
auto cfg = Service::CFG::GetModule(Core::System::GetInstance());
|
||||
ASSERT_MSG(cfg, "CFG Module missing!");
|
||||
std::string username = Common::UTF16ToUTF8(cfg->GetUsername());
|
||||
switch (this->config.button_config) {
|
||||
case ButtonConfig::None:
|
||||
case ButtonConfig::Single:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue