summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-11 22:39:25 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-18 16:53:47 +0100
commite696ed1f4d20f28f8b26c637498962938df7d96f (patch)
tree79222d795725ba7b19f0aa9326041e236f9a22d8 /src/core/core.cpp
parentqt/main: Register Qt Software Keyboard frontend with AM (diff)
downloadyuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.gz
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.bz2
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.lz
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.xz
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.zst
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.zip
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 6d5b5a2d0..6c72fdf4a 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -23,12 +23,14 @@
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/scheduler.h"
#include "core/hle/kernel/thread.h"
+#include "core/hle/service/am/applets/software_keyboard.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
#include "core/loader/loader.h"
#include "core/perf_stats.h"
#include "core/settings.h"
#include "core/telemetry_session.h"
+#include "frontend/applets/software_keyboard.h"
#include "video_core/debug_utils/debug_utils.h"
#include "video_core/gpu.h"
#include "video_core/renderer_base.h"
@@ -136,6 +138,10 @@ struct System::Impl {
if (virtual_filesystem == nullptr)
virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();
+ /// Create default implementations of applets if one is not provided.
+ if (software_keyboard == nullptr)
+ software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>();
+
auto main_process = Kernel::Process::Create(kernel, "main");
kernel.MakeCurrentProcess(main_process.get());
@@ -289,6 +295,9 @@ struct System::Impl {
std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads;
std::size_t active_core{}; ///< Active core, only used in single thread mode
+ /// Frontend applets
+ std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard;
+
/// Service manager
std::shared_ptr<Service::SM::ServiceManager> service_manager;
@@ -488,6 +497,14 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const {
return impl->virtual_filesystem;
}
+void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) {
+ impl->software_keyboard = std::move(applet);
+}
+
+const Core::Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() const {
+ return *impl->software_keyboard;
+}
+
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
return impl->Init(emu_window);
}