diff options
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/sm/controller.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/service/sm/controller.h | 1 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index e8f5d0e4a..7b1c8ee37 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -32,6 +32,12 @@ void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service, "called"); } +void Controller::DuplicateSessionEx(Kernel::HLERequestContext& ctx) { + DuplicateSession(ctx); + + LOG_WARNING(Service, "(STUBBED) called, using DuplicateSession"); +} + void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) { IPC::RequestBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); @@ -46,7 +52,7 @@ Controller::Controller() : ServiceFramework("IpcController") { {0x00000001, nullptr, "ConvertDomainToSession"}, {0x00000002, &Controller::DuplicateSession, "DuplicateSession"}, {0x00000003, &Controller::QueryPointerBufferSize, "QueryPointerBufferSize"}, - {0x00000004, nullptr, "DuplicateSessionEx"}, + {0x00000004, &Controller::DuplicateSessionEx, "DuplicateSessionEx"}, }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/sm/controller.h b/src/core/hle/service/sm/controller.h index 0b873b492..7b4bc4b75 100644 --- a/src/core/hle/service/sm/controller.h +++ b/src/core/hle/service/sm/controller.h @@ -17,6 +17,7 @@ public: private: void ConvertSessionToDomain(Kernel::HLERequestContext& ctx); void DuplicateSession(Kernel::HLERequestContext& ctx); + void DuplicateSessionEx(Kernel::HLERequestContext& ctx); void QueryPointerBufferSize(Kernel::HLERequestContext& ctx); }; diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 02aab6df1..108a635d7 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -47,8 +47,9 @@ public: } std::vector<u8> ReadBlock(size_t length) { - std::vector<u8> data(length); - std::memcpy(data.data(), buffer.data() + read_index, length); + const u8* const begin = buffer.data() + read_index; + const u8* const end = begin + length; + std::vector<u8> data(begin, end); read_index += length; read_index = Common::AlignUp(read_index, 4); return data; |