mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 12:50:04 +00:00
core: Eliminate more uses of Core::System::GetInstance(). (#7313)
This commit is contained in:
parent
8e2037b3ff
commit
f2ee9baec7
47 changed files with 416 additions and 387 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace Frontend {
|
||||
void RegisterDefaultApplets(Core::System& system) {
|
||||
system.RegisterSoftwareKeyboard(std::make_shared<DefaultKeyboard>());
|
||||
system.RegisterSoftwareKeyboard(std::make_shared<DefaultKeyboard>(system));
|
||||
system.RegisterMiiSelector(std::make_shared<DefaultMiiSelector>());
|
||||
}
|
||||
} // namespace Frontend
|
||||
|
|
|
@ -144,10 +144,12 @@ const KeyboardData& SoftwareKeyboard::ReceiveData() {
|
|||
return data;
|
||||
}
|
||||
|
||||
DefaultKeyboard::DefaultKeyboard(Core::System& system_) : system(system_) {}
|
||||
|
||||
void DefaultKeyboard::Execute(const Frontend::KeyboardConfig& config_) {
|
||||
SoftwareKeyboard::Execute(config_);
|
||||
|
||||
auto cfg = Service::CFG::GetModule(Core::System::GetInstance());
|
||||
auto cfg = Service::CFG::GetModule(system);
|
||||
std::string username = Common::UTF16ToUTF8(cfg->GetUsername());
|
||||
switch (this->config.button_config) {
|
||||
case ButtonConfig::None:
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
#include <vector>
|
||||
#include "common/assert.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Frontend {
|
||||
|
||||
enum class AcceptedInput {
|
||||
|
@ -137,8 +141,12 @@ protected:
|
|||
|
||||
class DefaultKeyboard final : public SoftwareKeyboard {
|
||||
public:
|
||||
explicit DefaultKeyboard(Core::System& system_);
|
||||
void Execute(const KeyboardConfig& config) override;
|
||||
void ShowError(const std::string& error) override;
|
||||
|
||||
private:
|
||||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Frontend
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue