diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 4fe77c25b..bc9e887b6 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include "core/core_timing.h" | 17 | #include "core/core_timing.h" |
| 18 | #include "core/cpu_core_manager.h" | 18 | #include "core/cpu_core_manager.h" |
| 19 | #include "core/file_sys/mode.h" | 19 | #include "core/file_sys/mode.h" |
| 20 | #include "core/file_sys/registered_cache.h" | ||
| 20 | #include "core/file_sys/vfs_concat.h" | 21 | #include "core/file_sys/vfs_concat.h" |
| 21 | #include "core/file_sys/vfs_real.h" | 22 | #include "core/file_sys/vfs_real.h" |
| 22 | #include "core/gdbstub/gdbstub.h" | 23 | #include "core/gdbstub/gdbstub.h" |
| @@ -108,6 +109,8 @@ struct System::Impl { | |||
| 108 | // Create a default fs if one doesn't already exist. | 109 | // Create a default fs if one doesn't already exist. |
| 109 | if (virtual_filesystem == nullptr) | 110 | if (virtual_filesystem == nullptr) |
| 110 | virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); | 111 | virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); |
| 112 | if (content_provider == nullptr) | ||
| 113 | content_provider = std::make_unique<FileSys::ContentProviderUnion>(); | ||
| 111 | 114 | ||
| 112 | /// Create default implementations of applets if one is not provided. | 115 | /// Create default implementations of applets if one is not provided. |
| 113 | if (profile_selector == nullptr) | 116 | if (profile_selector == nullptr) |
| @@ -249,6 +252,8 @@ struct System::Impl { | |||
| 249 | Kernel::KernelCore kernel; | 252 | Kernel::KernelCore kernel; |
| 250 | /// RealVfsFilesystem instance | 253 | /// RealVfsFilesystem instance |
| 251 | FileSys::VirtualFilesystem virtual_filesystem; | 254 | FileSys::VirtualFilesystem virtual_filesystem; |
| 255 | /// ContentProviderUnion instance | ||
| 256 | std::unique_ptr<FileSys::ContentProviderUnion> content_provider; | ||
| 252 | /// AppLoader used to load the current executing application | 257 | /// AppLoader used to load the current executing application |
| 253 | std::unique_ptr<Loader::AppLoader> app_loader; | 258 | std::unique_ptr<Loader::AppLoader> app_loader; |
| 254 | std::unique_ptr<VideoCore::RendererBase> renderer; | 259 | std::unique_ptr<VideoCore::RendererBase> renderer; |
| @@ -488,6 +493,27 @@ const Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() const { | |||
| 488 | return *impl->software_keyboard; | 493 | return *impl->software_keyboard; |
| 489 | } | 494 | } |
| 490 | 495 | ||
| 496 | void System::SetContentProvider(std::unique_ptr<FileSys::ContentProviderUnion> provider) { | ||
| 497 | impl->content_provider = std::move(provider); | ||
| 498 | } | ||
| 499 | |||
| 500 | FileSys::ContentProvider& System::GetContentProvider() { | ||
| 501 | return *impl->content_provider; | ||
| 502 | } | ||
| 503 | |||
| 504 | const FileSys::ContentProvider& System::GetContentProvider() const { | ||
| 505 | return *impl->content_provider; | ||
| 506 | } | ||
| 507 | |||
| 508 | void System::RegisterContentProvider(FileSys::ContentProviderUnionSlot slot, | ||
| 509 | FileSys::ContentProvider* provider) { | ||
| 510 | impl->content_provider->SetSlot(slot, provider); | ||
| 511 | } | ||
| 512 | |||
| 513 | void System::ClearContentProvider(FileSys::ContentProviderUnionSlot slot) { | ||
| 514 | impl->content_provider->ClearSlot(slot); | ||
| 515 | } | ||
| 516 | |||
| 491 | void System::SetWebBrowser(std::unique_ptr<Frontend::WebBrowserApplet> applet) { | 517 | void System::SetWebBrowser(std::unique_ptr<Frontend::WebBrowserApplet> applet) { |
| 492 | impl->web_browser = std::move(applet); | 518 | impl->web_browser = std::move(applet); |
| 493 | } | 519 | } |