mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-24 06:25:51 +01:00
core: Add getter/setter for ProfileSelector in System
This commit is contained in:
parent
d17f38494b
commit
58fd0a1c50
@ -97,6 +97,8 @@ struct System::Impl {
|
|||||||
virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();
|
virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();
|
||||||
|
|
||||||
/// Create default implementations of applets if one is not provided.
|
/// Create default implementations of applets if one is not provided.
|
||||||
|
if (profile_selector == nullptr)
|
||||||
|
profile_selector = std::make_unique<Core::Frontend::DefaultProfileSelectApplet>();
|
||||||
if (software_keyboard == nullptr)
|
if (software_keyboard == nullptr)
|
||||||
software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
|
software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
|
||||||
|
|
||||||
@ -227,6 +229,7 @@ struct System::Impl {
|
|||||||
bool is_powered_on = false;
|
bool is_powered_on = false;
|
||||||
|
|
||||||
/// Frontend applets
|
/// Frontend applets
|
||||||
|
std::unique_ptr<Core::Frontend::ProfileSelectApplet> profile_selector;
|
||||||
std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
|
std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
|
||||||
|
|
||||||
/// Service manager
|
/// Service manager
|
||||||
@ -422,6 +425,14 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const {
|
|||||||
return impl->virtual_filesystem;
|
return impl->virtual_filesystem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void System::SetProfileSelector(std::unique_ptr<Core::Frontend::ProfileSelectApplet> applet) {
|
||||||
|
impl->profile_selector = std::move(applet);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Core::Frontend::ProfileSelectApplet& System::GetProfileSelector() const {
|
||||||
|
return *impl->profile_selector;
|
||||||
|
}
|
||||||
|
|
||||||
void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) {
|
void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) {
|
||||||
impl->software_keyboard = std::move(applet);
|
impl->software_keyboard = std::move(applet);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/hle/kernel/object.h"
|
#include "core/hle/kernel/object.h"
|
||||||
|
#include "frontend/applets/profile_select.h"
|
||||||
|
|
||||||
namespace Core::Frontend {
|
namespace Core::Frontend {
|
||||||
class EmuWindow;
|
class EmuWindow;
|
||||||
@ -237,6 +238,10 @@ public:
|
|||||||
|
|
||||||
std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const;
|
std::shared_ptr<FileSys::VfsFilesystem> GetFilesystem() const;
|
||||||
|
|
||||||
|
void SetProfileSelector(std::unique_ptr<Core::Frontend::ProfileSelectApplet> applet);
|
||||||
|
|
||||||
|
const Core::Frontend::ProfileSelectApplet& GetProfileSelector() const;
|
||||||
|
|
||||||
void SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet);
|
void SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet);
|
||||||
|
|
||||||
const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;
|
const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user