summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-11-22 21:00:04 -0500
committerGravatar Zach Hilman2018-12-03 17:26:26 -0500
commit58fd0a1c50912f28457eae974dfe928463ceb0c2 (patch)
tree60b676b14a42195010f6125e09205556ffee873a /src
parentfrontend: Add frontend applet for ProfileSelect (diff)
downloadyuzu-58fd0a1c50912f28457eae974dfe928463ceb0c2.tar.gz
yuzu-58fd0a1c50912f28457eae974dfe928463ceb0c2.tar.xz
yuzu-58fd0a1c50912f28457eae974dfe928463ceb0c2.zip
core: Add getter/setter for ProfileSelector in System
Diffstat (limited to 'src')
-rw-r--r--src/core/core.cpp11
-rw-r--r--src/core/core.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 795fabc65..19b4b97c5 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -97,6 +97,8 @@ struct System::Impl {
97 virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); 97 virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();
98 98
99 /// Create default implementations of applets if one is not provided. 99 /// Create default implementations of applets if one is not provided.
100 if (profile_selector == nullptr)
101 profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>();
100 if (software_keyboard == nullptr) 102 if (software_keyboard == nullptr)
101 software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>(); 103 software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
102 104
@@ -227,6 +229,7 @@ struct System::Impl {
227 bool is_powered_on = false; 229 bool is_powered_on = false;
228 230
229 /// Frontend applets 231 /// Frontend applets
232 std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector;
230 std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; 233 std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
231 234
232 /// Service manager 235 /// Service manager
@@ -422,6 +425,14 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const {
422 return impl->virtual_filesystem; 425 return impl->virtual_filesystem;
423} 426}
424 427
428void System::SetProfileSelector(std::unique_ptr<Core::Frontend::ProfileSelectApplet> applet) {
429 impl->profile_selector = std::move(applet);
430}
431
432const Core::Frontend::ProfileSelectApplet& System::GetProfileSelector() const {
433 return *impl->profile_selector;
434}
435
425void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) { 436void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) {
426 impl->software_keyboard = std::move(applet); 437 impl->software_keyboard = std::move(applet);
427} 438}
diff --git a/src/core/core.h b/src/core/core.h
index be71bd437..21dea051b 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -10,6 +10,7 @@
10 10
11#include "common/common_types.h" 11#include "common/common_types.h"
12#include "core/hle/kernel/object.h" 12#include "core/hle/kernel/object.h"
13#include "frontend/applets/profile_select.h"
13 14
14namespace Core::Frontend { 15namespace Core::Frontend {
15class EmuWindow; 16class EmuWindow;
@@ -237,6 +238,10 @@ public:
237 238
238 std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const; 239 std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const;
239 240
241 void SetProfileSelector(std::unique_ptr<Core::Frontend::ProfileSelectApplet> applet);
242
243 const Core::Frontend::ProfileSelectApplet& GetProfileSelector() const;
244
240 void SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet); 245 void SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet);
241 246
242 const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const; 247 const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;