remove GetCurrentModule() functions in HLE Services

This commit is contained in:
B3n30 2018-10-11 11:12:07 +02:00
parent 4ee914c7a8
commit 9d53136f20
14 changed files with 99 additions and 69 deletions

View file

@ -135,7 +135,14 @@ ValidationError SoftwareKeyboard::Finalize(const std::string& text, u8 button) {
void DefaultKeyboard::Setup(const Frontend::KeyboardConfig* config) {
SoftwareKeyboard::Setup(config);
std::string username = Common::UTF16ToUTF8(Service::CFG::GetCurrentModule()->GetUsername());
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());
switch (this->config.button_config) {
case ButtonConfig::None:
case ButtonConfig::Single: