diff options
author | Subv <subv2112@gmail.com> | 2016-05-09 00:10:53 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-05-13 03:01:59 +0200 |
commit | ac2de12ed8a7cc2759e25325f388db92b3f356a6 (patch) | |
tree | f679398a60a1d330b6ac38bfffa051631f99d6e7 /src/core/hle/applets/mii_selector.cpp | |
parent | Kernel: Account for automatically-allocated shared memories in the amount of used linear heap memory. (diff) | |
download | yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.tar yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.tar.gz yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.tar.bz2 yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.tar.lz yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.tar.xz yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.tar.zst yuzu-ac2de12ed8a7cc2759e25325f388db92b3f356a6.zip |
Diffstat (limited to 'src/core/hle/applets/mii_selector.cpp')
-rw-r--r-- | src/core/hle/applets/mii_selector.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/applets/mii_selector.cpp b/src/core/hle/applets/mii_selector.cpp index 7f174f3e6..bf39eca22 100644 --- a/src/core/hle/applets/mii_selector.cpp +++ b/src/core/hle/applets/mii_selector.cpp @@ -35,9 +35,14 @@ ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& p ASSERT(sizeof(capture_info) == parameter.buffer_size); memcpy(&capture_info, parameter.data, sizeof(capture_info)); + using Kernel::MemoryPermission; - framebuffer_memory = Kernel::SharedMemory::Create(nullptr, capture_info.size, MemoryPermission::ReadWrite, - MemoryPermission::ReadWrite, 0, Kernel::MemoryRegion::BASE, "MiiSelector Memory"); + // Allocate a heap block of the required size for this applet. + heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); + // Create a SharedMemory that directly points to this heap block. + framebuffer_memory = Kernel::SharedMemory::CreateForApplet(heap_memory, 0, heap_memory->size(), + MemoryPermission::ReadWrite, MemoryPermission::ReadWrite, + "MiiSelector Memory"); // Send the response message with the newly created SharedMemory Service::APT::MessageParameter result; |