diff options
| author | 2018-11-20 08:24:11 -0800 | |
|---|---|---|
| committer | 2018-11-20 08:24:11 -0800 | |
| commit | b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401 (patch) | |
| tree | b75fde22327ac851821d58078614e62cc1c29916 /src/core/core.cpp | |
| parent | Merge pull request #1739 from lioncash/lm (diff) | |
| parent | software_keyboard: Fix erroneous extra PushNormalData (diff) | |
| download | yuzu-b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401.tar.gz yuzu-b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401.tar.xz yuzu-b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401.zip | |
Merge pull request #1667 from DarkLordZach/swkbd
am: Implement HLE software keyboard applet
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 17 |
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 @@ | |||
| 23 | #include "core/hle/kernel/process.h" | 23 | #include "core/hle/kernel/process.h" |
| 24 | #include "core/hle/kernel/scheduler.h" | 24 | #include "core/hle/kernel/scheduler.h" |
| 25 | #include "core/hle/kernel/thread.h" | 25 | #include "core/hle/kernel/thread.h" |
| 26 | #include "core/hle/service/am/applets/software_keyboard.h" | ||
| 26 | #include "core/hle/service/service.h" | 27 | #include "core/hle/service/service.h" |
| 27 | #include "core/hle/service/sm/sm.h" | 28 | #include "core/hle/service/sm/sm.h" |
| 28 | #include "core/loader/loader.h" | 29 | #include "core/loader/loader.h" |
| 29 | #include "core/perf_stats.h" | 30 | #include "core/perf_stats.h" |
| 30 | #include "core/settings.h" | 31 | #include "core/settings.h" |
| 31 | #include "core/telemetry_session.h" | 32 | #include "core/telemetry_session.h" |
| 33 | #include "frontend/applets/software_keyboard.h" | ||
| 32 | #include "video_core/debug_utils/debug_utils.h" | 34 | #include "video_core/debug_utils/debug_utils.h" |
| 33 | #include "video_core/gpu.h" | 35 | #include "video_core/gpu.h" |
| 34 | #include "video_core/renderer_base.h" | 36 | #include "video_core/renderer_base.h" |
| @@ -136,6 +138,10 @@ struct System::Impl { | |||
| 136 | if (virtual_filesystem == nullptr) | 138 | if (virtual_filesystem == nullptr) |
| 137 | virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); | 139 | virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); |
| 138 | 140 | ||
| 141 | /// Create default implementations of applets if one is not provided. | ||
| 142 | if (software_keyboard == nullptr) | ||
| 143 | software_keyboard = std::make_unique<Core::Frontend::DefaultSoftwareKeyboardApplet>(); | ||
| 144 | |||
| 139 | auto main_process = Kernel::Process::Create(kernel, "main"); | 145 | auto main_process = Kernel::Process::Create(kernel, "main"); |
| 140 | kernel.MakeCurrentProcess(main_process.get()); | 146 | kernel.MakeCurrentProcess(main_process.get()); |
| 141 | 147 | ||
| @@ -289,6 +295,9 @@ struct System::Impl { | |||
| 289 | std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; | 295 | std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; |
| 290 | std::size_t active_core{}; ///< Active core, only used in single thread mode | 296 | std::size_t active_core{}; ///< Active core, only used in single thread mode |
| 291 | 297 | ||
| 298 | /// Frontend applets | ||
| 299 | std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> software_keyboard; | ||
| 300 | |||
| 292 | /// Service manager | 301 | /// Service manager |
| 293 | std::shared_ptr<Service::SM::ServiceManager> service_manager; | 302 | std::shared_ptr<Service::SM::ServiceManager> service_manager; |
| 294 | 303 | ||
| @@ -488,6 +497,14 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const { | |||
| 488 | return impl->virtual_filesystem; | 497 | return impl->virtual_filesystem; |
| 489 | } | 498 | } |
| 490 | 499 | ||
| 500 | void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) { | ||
| 501 | impl->software_keyboard = std::move(applet); | ||
| 502 | } | ||
| 503 | |||
| 504 | const Core::Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() const { | ||
| 505 | return *impl->software_keyboard; | ||
| 506 | } | ||
| 507 | |||
| 491 | System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { | 508 | System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { |
| 492 | return impl->Init(emu_window); | 509 | return impl->Init(emu_window); |
| 493 | } | 510 | } |