diff options
| author | 2016-05-13 15:33:44 -0400 | |
|---|---|---|
| committer | 2016-05-13 15:33:44 -0400 | |
| commit | 18b517e236b7f6710567e57dab6a7c5329db948f (patch) | |
| tree | 5257e9ace394fa6062768c27b95e807df87c61b2 /src/core/hle/applets/swkbd.cpp | |
| parent | Merge pull request #1788 from MerryMage/ext-soundtouch (diff) | |
| parent | HLE/Applets: Give each applet its own block of heap memory, and use that when... (diff) | |
| download | yuzu-18b517e236b7f6710567e57dab6a7c5329db948f.tar.gz yuzu-18b517e236b7f6710567e57dab6a7c5329db948f.tar.xz yuzu-18b517e236b7f6710567e57dab6a7c5329db948f.zip | |
Merge pull request #1689 from Subv/shmem
Kernel: Implemented shared memory.
Diffstat (limited to 'src/core/hle/applets/swkbd.cpp')
| -rw-r--r-- | src/core/hle/applets/swkbd.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/applets/swkbd.cpp b/src/core/hle/applets/swkbd.cpp index 87238aa1c..90c6adc65 100644 --- a/src/core/hle/applets/swkbd.cpp +++ b/src/core/hle/applets/swkbd.cpp | |||
| @@ -40,8 +40,12 @@ ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter con | |||
| 40 | memcpy(&capture_info, parameter.data, sizeof(capture_info)); | 40 | memcpy(&capture_info, parameter.data, sizeof(capture_info)); |
| 41 | 41 | ||
| 42 | using Kernel::MemoryPermission; | 42 | using Kernel::MemoryPermission; |
| 43 | framebuffer_memory = Kernel::SharedMemory::Create(capture_info.size, MemoryPermission::ReadWrite, | 43 | // Allocate a heap block of the required size for this applet. |
| 44 | MemoryPermission::ReadWrite, "SoftwareKeyboard Memory"); | 44 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); |
| 45 | // Create a SharedMemory that directly points to this heap block. | ||
| 46 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet(heap_memory, 0, heap_memory->size(), | ||
| 47 | MemoryPermission::ReadWrite, MemoryPermission::ReadWrite, | ||
| 48 | "SoftwareKeyboard Memory"); | ||
| 45 | 49 | ||
| 46 | // Send the response message with the newly created SharedMemory | 50 | // Send the response message with the newly created SharedMemory |
| 47 | Service::APT::MessageParameter result; | 51 | Service::APT::MessageParameter result; |