From 58fd0a1c50912f28457eae974dfe928463ceb0c2 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Thu, 22 Nov 2018 21:00:04 -0500 Subject: [PATCH] core: Add getter/setter for ProfileSelector in System --- src/core/core.cpp | 11 +++++++++++ src/core/core.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/core/core.cpp b/src/core/core.cpp index 795fabc652..19b4b97c53 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -97,6 +97,8 @@ struct System::Impl { virtual_filesystem = std::make_shared(); /// Create default implementations of applets if one is not provided. + if (profile_selector == nullptr) + profile_selector = std::make_unique(); if (software_keyboard == nullptr) software_keyboard = std::make_unique(); @@ -227,6 +229,7 @@ struct System::Impl { bool is_powered_on = false; /// Frontend applets + std::unique_ptr profile_selector; std::unique_ptr software_keyboard; /// Service manager @@ -422,6 +425,14 @@ std::shared_ptr System::GetFilesystem() const { return impl->virtual_filesystem; } +void System::SetProfileSelector(std::unique_ptr applet) { + impl->profile_selector = std::move(applet); +} + +const Core::Frontend::ProfileSelectApplet& System::GetProfileSelector() const { + return *impl->profile_selector; +} + void System::SetSoftwareKeyboard(std::unique_ptr applet) { impl->software_keyboard = std::move(applet); } diff --git a/src/core/core.h b/src/core/core.h index be71bd4378..21dea051ba 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -10,6 +10,7 @@ #include "common/common_types.h" #include "core/hle/kernel/object.h" +#include "frontend/applets/profile_select.h" namespace Core::Frontend { class EmuWindow; @@ -237,6 +238,10 @@ public: std::shared_ptr GetFilesystem() const; + void SetProfileSelector(std::unique_ptr applet); + + const Core::Frontend::ProfileSelectApplet& GetProfileSelector() const; + void SetSoftwareKeyboard(std::unique_ptr applet); const Core::Frontend::SoftwareKeyboardApplet& GetSoftwareKeyboard() const;