diff options
| author | 2018-12-23 14:35:13 -0500 | |
|---|---|---|
| committer | 2018-12-23 14:35:13 -0500 | |
| commit | f95f6c7d86af9857cb737a741fc847bf2c5d8413 (patch) | |
| tree | b5c02a35cdb18b78c648bc3a6f98b87e68d2e651 /src/core/core.cpp | |
| parent | Merge pull request #1780 from DarkLordZach/controller-profiles (diff) | |
| parent | applets: Correct event ResetTypes from OneShot to Sticky (diff) | |
| download | yuzu-f95f6c7d86af9857cb737a741fc847bf2c5d8413.tar.gz yuzu-f95f6c7d86af9857cb737a741fc847bf2c5d8413.tar.xz yuzu-f95f6c7d86af9857cb737a741fc847bf2c5d8413.zip | |
Merge pull request #1781 from DarkLordZach/applet-profile-select
am: Implement HLE profile selector applet
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index ce7851538..fd10199ec 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -99,6 +99,8 @@ struct System::Impl { | |||
| 99 | virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); | 99 | virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); |
| 100 | 100 | ||
| 101 | /// Create default implementations of applets if one is not provided. | 101 | /// Create default implementations of applets if one is not provided. |
| 102 | if (profile_selector == nullptr) | ||
| 103 | profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>(); | ||
| 102 | if (software_keyboard == nullptr) | 104 | if (software_keyboard == nullptr) |
| 103 | software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>(); | 105 | software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>(); |
| 104 | 106 | ||
| @@ -229,6 +231,7 @@ struct System::Impl { | |||
| 229 | bool is_powered_on = false; | 231 | bool is_powered_on = false; |
| 230 | 232 | ||
| 231 | /// Frontend applets | 233 | /// Frontend applets |
| 234 | std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector; | ||
| 232 | std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; | 235 | std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; |
| 233 | 236 | ||
| 234 | /// Service manager | 237 | /// Service manager |
| @@ -424,6 +427,14 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const { | |||
| 424 | return impl->virtual_filesystem; | 427 | return impl->virtual_filesystem; |
| 425 | } | 428 | } |
| 426 | 429 | ||
| 430 | void System::SetProfileSelector(std::unique_ptr<Core::Frontend::ProfileSelectApplet> applet) { | ||
| 431 | impl->profile_selector = std::move(applet); | ||
| 432 | } | ||
| 433 | |||
| 434 | const Core::Frontend::ProfileSelectApplet& System::GetProfileSelector() const { | ||
| 435 | return *impl->profile_selector; | ||
| 436 | } | ||
| 437 | |||
| 427 | void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) { | 438 | void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) { |
| 428 | impl->software_keyboard = std::move(applet); | 439 | impl->software_keyboard = std::move(applet); |
| 429 | } | 440 | } |