diff options
author | bunnei <bunneidev@gmail.com> | 2019-01-10 23:04:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-10 23:04:38 +0100 |
commit | 83e8ad23310937bb72f4412c15f45231a19202f7 (patch) | |
tree | 80301af69b14a701f16e21d41ced436850085031 /src/core/hle/service/am/am.cpp | |
parent | Merge pull request #2010 from ReinUsesLisp/gmem (diff) | |
parent | build: Copy web engine resources to correct location (diff) | |
download | yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.gz yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.bz2 yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.lz yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.xz yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.zst yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.zip |
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 7a5e9d216..d1cbe0e44 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -23,6 +23,7 @@ #include "core/hle/service/am/applets/profile_select.h" #include "core/hle/service/am/applets/software_keyboard.h" #include "core/hle/service/am/applets/stub_applet.h" +#include "core/hle/service/am/applets/web_browser.h" #include "core/hle/service/am/idle.h" #include "core/hle/service/am/omm.h" #include "core/hle/service/am/spsm.h" @@ -44,6 +45,7 @@ constexpr ResultCode ERR_SIZE_OUT_OF_BOUNDS{ErrorModule::AM, 0x1F7}; enum class AppletId : u32 { ProfileSelect = 0x10, SoftwareKeyboard = 0x11, + LibAppletOff = 0x17, }; constexpr u32 POP_LAUNCH_PARAMETER_MAGIC = 0xC79497CA; @@ -730,10 +732,10 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 offset{rp.Pop<u64>()}; - LOG_DEBUG(Service_AM, "called, offset={}", offset); - const std::vector<u8> data{ctx.ReadBuffer()}; + LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, data.size()); + if (data.size() > backing.buffer.size() - offset) { LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, data_size={}, offset={}", @@ -753,10 +755,10 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 offset{rp.Pop<u64>()}; - LOG_DEBUG(Service_AM, "called, offset={}", offset); - const std::size_t size{ctx.GetWriteBufferSize()}; + LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size); + if (size > backing.buffer.size() - offset) { LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, size={}, offset={}", backing.buffer.size(), size, offset); @@ -791,6 +793,8 @@ static std::shared_ptr<Applets::Applet> GetAppletFromId(AppletId id) { return std::make_shared<Applets::ProfileSelect>(); case AppletId::SoftwareKeyboard: return std::make_shared<Applets::SoftwareKeyboard>(); + case AppletId::LibAppletOff: + return std::make_shared<Applets::WebBrowser>(); default: LOG_ERROR(Service_AM, "Unimplemented AppletId [{:08X}]! -- Falling back to stub!", static_cast<u32>(id)); |