Merge pull request #6308 from Morph1984/result
general: Replace RESULT_NAME with ResultName
This commit is contained in:
commit
4ea171fa5e
116 changed files with 975 additions and 978 deletions
|
@ -197,7 +197,7 @@ ResultCode AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_param
|
||||||
|
|
||||||
ReleaseAndQueueBuffers();
|
ReleaseAndQueueBuffers();
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioRenderer::QueueMixedBuffer(Buffer::Tag tag) {
|
void AudioRenderer::QueueMixedBuffer(Buffer::Tag tag) {
|
||||||
|
|
|
@ -407,7 +407,7 @@ ResultCode InfoUpdater::UpdateMixes(MixContext& mix_context, std::size_t mix_buf
|
||||||
|
|
||||||
// TODO(ogniK): Sort when splitter is suppoorted
|
// TODO(ogniK): Sort when splitter is suppoorted
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InfoUpdater::UpdateSinks(SinkContext& sink_context) {
|
bool InfoUpdater::UpdateSinks(SinkContext& sink_context) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ ResultVal<VirtualFile> RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecor
|
||||||
|
|
||||||
if (nca == nullptr) {
|
if (nca == nullptr) {
|
||||||
// TODO: Find the right error code to use here
|
// TODO: Find the right error code to use here
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PatchManager patch_manager{title_id, filesystem_controller, content_provider};
|
const PatchManager patch_manager{title_id, filesystem_controller, content_provider};
|
||||||
|
@ -74,13 +74,13 @@ ResultVal<VirtualFile> RomFSFactory::Open(u64 title_id, StorageId storage,
|
||||||
const std::shared_ptr<NCA> res = GetEntry(title_id, storage, type);
|
const std::shared_ptr<NCA> res = GetEntry(title_id, storage, type);
|
||||||
if (res == nullptr) {
|
if (res == nullptr) {
|
||||||
// TODO(DarkLordZach): Find the right error code to use here
|
// TODO(DarkLordZach): Find the right error code to use here
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto romfs = res->GetRomFS();
|
const auto romfs = res->GetRomFS();
|
||||||
if (romfs == nullptr) {
|
if (romfs == nullptr) {
|
||||||
// TODO(DarkLordZach): Find the right error code to use here
|
// TODO(DarkLordZach): Find the right error code to use here
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MakeResult<VirtualFile>(romfs);
|
return MakeResult<VirtualFile>(romfs);
|
||||||
|
|
|
@ -91,7 +91,7 @@ ResultVal<VirtualDir> SaveDataFactory::Create(SaveDataSpaceId space,
|
||||||
// Return an error if the save data doesn't actually exist.
|
// Return an error if the save data doesn't actually exist.
|
||||||
if (out == nullptr) {
|
if (out == nullptr) {
|
||||||
// TODO(DarkLordZach): Find out correct error code.
|
// TODO(DarkLordZach): Find out correct error code.
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MakeResult<VirtualDir>(std::move(out));
|
return MakeResult<VirtualDir>(std::move(out));
|
||||||
|
@ -112,7 +112,7 @@ ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space,
|
||||||
// Return an error if the save data doesn't actually exist.
|
// Return an error if the save data doesn't actually exist.
|
||||||
if (out == nullptr) {
|
if (out == nullptr) {
|
||||||
// TODO(Subv): Find out correct error code.
|
// TODO(Subv): Find out correct error code.
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MakeResult<VirtualDir>(std::move(out));
|
return MakeResult<VirtualDir>(std::move(out));
|
||||||
|
|
|
@ -169,12 +169,12 @@ ResultCode HLERequestContext::PopulateFromIncomingCommandBuffer(const KHandleTab
|
||||||
|
|
||||||
if (command_header->IsCloseCommand()) {
|
if (command_header->IsCloseCommand()) {
|
||||||
// Close does not populate the rest of the IPC header
|
// Close does not populate the rest of the IPC header
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::copy_n(src_cmdbuf, IPC::COMMAND_BUFFER_LENGTH, cmd_buf.begin());
|
std::copy_n(src_cmdbuf, IPC::COMMAND_BUFFER_LENGTH, cmd_buf.begin());
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_thread) {
|
ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_thread) {
|
||||||
|
@ -216,7 +216,7 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_t
|
||||||
memory.WriteBlock(owner_process, requesting_thread.GetTLSAddress(), cmd_buf.data(),
|
memory.WriteBlock(owner_process, requesting_thread.GetTLSAddress(), cmd_buf.data(),
|
||||||
write_size * sizeof(u32));
|
write_size * sizeof(u32));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
|
std::vector<u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
|
||||||
|
|
|
@ -97,7 +97,7 @@ ResultCode KAddressArbiter::Signal(VAddr addr, s32 count) {
|
||||||
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&
|
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&
|
||||||
(it->GetAddressArbiterKey() == addr)) {
|
(it->GetAddressArbiterKey() == addr)) {
|
||||||
KThread* target_thread = std::addressof(*it);
|
KThread* target_thread = std::addressof(*it);
|
||||||
target_thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
target_thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
|
|
||||||
ASSERT(target_thread->IsWaitingForAddressArbiter());
|
ASSERT(target_thread->IsWaitingForAddressArbiter());
|
||||||
target_thread->Wakeup();
|
target_thread->Wakeup();
|
||||||
|
@ -107,7 +107,7 @@ ResultCode KAddressArbiter::Signal(VAddr addr, s32 count) {
|
||||||
++num_waiters;
|
++num_waiters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 count) {
|
ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 count) {
|
||||||
|
@ -130,7 +130,7 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32
|
||||||
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&
|
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&
|
||||||
(it->GetAddressArbiterKey() == addr)) {
|
(it->GetAddressArbiterKey() == addr)) {
|
||||||
KThread* target_thread = std::addressof(*it);
|
KThread* target_thread = std::addressof(*it);
|
||||||
target_thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
target_thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
|
|
||||||
ASSERT(target_thread->IsWaitingForAddressArbiter());
|
ASSERT(target_thread->IsWaitingForAddressArbiter());
|
||||||
target_thread->Wakeup();
|
target_thread->Wakeup();
|
||||||
|
@ -140,7 +140,7 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32
|
||||||
++num_waiters;
|
++num_waiters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 value, s32 count) {
|
ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 value, s32 count) {
|
||||||
|
@ -198,7 +198,7 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32
|
||||||
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&
|
while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) &&
|
||||||
(it->GetAddressArbiterKey() == addr)) {
|
(it->GetAddressArbiterKey() == addr)) {
|
||||||
KThread* target_thread = std::addressof(*it);
|
KThread* target_thread = std::addressof(*it);
|
||||||
target_thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
target_thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
|
|
||||||
ASSERT(target_thread->IsWaitingForAddressArbiter());
|
ASSERT(target_thread->IsWaitingForAddressArbiter());
|
||||||
target_thread->Wakeup();
|
target_thread->Wakeup();
|
||||||
|
@ -208,7 +208,7 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32
|
||||||
++num_waiters;
|
++num_waiters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KAddressArbiter::WaitIfLessThan(VAddr addr, s32 value, bool decrement, s64 timeout) {
|
ResultCode KAddressArbiter::WaitIfLessThan(VAddr addr, s32 value, bool decrement, s64 timeout) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
return SignalAndModifyByWaitingCountIfEqual(addr, value, count);
|
return SignalAndModifyByWaitingCountIfEqual(addr, value, count);
|
||||||
}
|
}
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] ResultCode WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value,
|
[[nodiscard]] ResultCode WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value,
|
||||||
|
@ -51,7 +51,7 @@ public:
|
||||||
return WaitIfEqual(addr, value, timeout);
|
return WaitIfEqual(addr, value, timeout);
|
||||||
}
|
}
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -119,7 +119,7 @@ ResultCode KClientPort::CreateSession(KClientSession** out) {
|
||||||
// We succeeded, so set the output.
|
// We succeeded, so set the output.
|
||||||
session_guard.Cancel();
|
session_guard.Cancel();
|
||||||
*out = std::addressof(session->GetClientSession());
|
*out = std::addressof(session->GetClientSession());
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
|
@ -86,7 +86,7 @@ ResultCode KConditionVariable::SignalToAddress(VAddr addr) {
|
||||||
next_value |= Svc::HandleWaitMask;
|
next_value |= Svc::HandleWaitMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
next_owner_thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
next_owner_thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
next_owner_thread->Wakeup();
|
next_owner_thread->Wakeup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ ResultCode KConditionVariable::SignalToAddress(VAddr addr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 value) {
|
ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 value) {
|
||||||
|
@ -112,7 +112,7 @@ ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 val
|
||||||
ASSERT(owner_thread.IsNull());
|
ASSERT(owner_thread.IsNull());
|
||||||
{
|
{
|
||||||
KScopedSchedulerLock sl(kernel);
|
KScopedSchedulerLock sl(kernel);
|
||||||
cur_thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
cur_thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
|
|
||||||
// Check if the thread should terminate.
|
// Check if the thread should terminate.
|
||||||
R_UNLESS(!cur_thread->IsTerminationRequested(), ResultTerminationRequested);
|
R_UNLESS(!cur_thread->IsTerminationRequested(), ResultTerminationRequested);
|
||||||
|
@ -124,7 +124,7 @@ ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 val
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// If the tag isn't the handle (with wait mask), we're done.
|
// If the tag isn't the handle (with wait mask), we're done.
|
||||||
R_UNLESS(test_tag == (handle | Svc::HandleWaitMask), RESULT_SUCCESS);
|
R_UNLESS(test_tag == (handle | Svc::HandleWaitMask), ResultSuccess);
|
||||||
|
|
||||||
// Get the lock owner thread.
|
// Get the lock owner thread.
|
||||||
owner_thread =
|
owner_thread =
|
||||||
|
@ -181,7 +181,7 @@ KThread* KConditionVariable::SignalImpl(KThread* thread) {
|
||||||
if (can_access) {
|
if (can_access) {
|
||||||
if (prev_tag == Svc::InvalidHandle) {
|
if (prev_tag == Svc::InvalidHandle) {
|
||||||
// If nobody held the lock previously, we're all good.
|
// If nobody held the lock previously, we're all good.
|
||||||
thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
thread->Wakeup();
|
thread->Wakeup();
|
||||||
} else {
|
} else {
|
||||||
// Get the previous owner.
|
// Get the previous owner.
|
||||||
|
@ -292,7 +292,7 @@ ResultCode KConditionVariable::Wait(VAddr addr, u64 key, u32 value, s64 timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wake up the next owner.
|
// Wake up the next owner.
|
||||||
next_owner_thread->SetSyncedObject(nullptr, RESULT_SUCCESS);
|
next_owner_thread->SetSyncedObject(nullptr, ResultSuccess);
|
||||||
next_owner_thread->Wakeup();
|
next_owner_thread->Wakeup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ ResultCode KHandleTable::Finalize() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KHandleTable::Remove(Handle handle) {
|
bool KHandleTable::Remove(Handle handle) {
|
||||||
|
@ -79,7 +79,7 @@ ResultCode KHandleTable::Add(Handle* out_handle, KAutoObject* obj, u16 type) {
|
||||||
*out_handle = EncodeHandle(static_cast<u16>(index), linear_id);
|
*out_handle = EncodeHandle(static_cast<u16>(index), linear_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KHandleTable::Reserve(Handle* out_handle) {
|
ResultCode KHandleTable::Reserve(Handle* out_handle) {
|
||||||
|
@ -89,7 +89,7 @@ ResultCode KHandleTable::Reserve(Handle* out_handle) {
|
||||||
R_UNLESS(m_count < m_table_size, ResultOutOfHandles);
|
R_UNLESS(m_count < m_table_size, ResultOutOfHandles);
|
||||||
|
|
||||||
*out_handle = EncodeHandle(static_cast<u16>(this->AllocateEntry()), this->AllocateLinearId());
|
*out_handle = EncodeHandle(static_cast<u16>(this->AllocateEntry()), this->AllocateLinearId());
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KHandleTable::Unreserve(Handle handle) {
|
void KHandleTable::Unreserve(Handle handle) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
m_free_head_index = i;
|
m_free_head_index = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t GetTableSize() const {
|
size_t GetTableSize() const {
|
||||||
|
|
|
@ -86,7 +86,7 @@ ResultCode KMemoryManager::Allocate(KPageLinkedList& page_list, std::size_t num_
|
||||||
|
|
||||||
// Early return if we're allocating no pages
|
// Early return if we're allocating no pages
|
||||||
if (num_pages == 0) {
|
if (num_pages == 0) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lock the pool that we're allocating from
|
// Lock the pool that we're allocating from
|
||||||
|
@ -146,14 +146,14 @@ ResultCode KMemoryManager::Allocate(KPageLinkedList& page_list, std::size_t num_
|
||||||
|
|
||||||
// We succeeded!
|
// We succeeded!
|
||||||
group_guard.Cancel();
|
group_guard.Cancel();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KMemoryManager::Free(KPageLinkedList& page_list, std::size_t num_pages, Pool pool,
|
ResultCode KMemoryManager::Free(KPageLinkedList& page_list, std::size_t num_pages, Pool pool,
|
||||||
Direction dir) {
|
Direction dir) {
|
||||||
// Early return if we're freeing no pages
|
// Early return if we're freeing no pages
|
||||||
if (!num_pages) {
|
if (!num_pages) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lock the pool that we're freeing from
|
// Lock the pool that we're freeing from
|
||||||
|
@ -170,7 +170,7 @@ ResultCode KMemoryManager::Free(KPageLinkedList& page_list, std::size_t num_page
|
||||||
chosen_manager.Free(it.GetAddress(), min_num_pages);
|
chosen_manager.Free(it.GetAddress(), min_num_pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t KMemoryManager::Impl::CalculateManagementOverheadSize(std::size_t region_size) {
|
std::size_t KMemoryManager::Impl::CalculateManagementOverheadSize(std::size_t region_size) {
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
|
|
||||||
ResultCode AddBlock(u64 address, u64 num_pages) {
|
ResultCode AddBlock(u64 address, u64 num_pages) {
|
||||||
if (!num_pages) {
|
if (!num_pages) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
if (!nodes.empty()) {
|
if (!nodes.empty()) {
|
||||||
const auto node = nodes.back();
|
const auto node = nodes.back();
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nodes.push_back({address, num_pages});
|
nodes.push_back({address, num_pages});
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -292,7 +292,7 @@ ResultCode KPageTable::MapProcessCode(VAddr addr, std::size_t num_pages, KMemory
|
||||||
|
|
||||||
block_manager->Update(addr, num_pages, state, perm);
|
block_manager->Update(addr, num_pages, state, perm);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::MapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
ResultCode KPageTable::MapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
||||||
|
@ -329,14 +329,14 @@ ResultCode KPageTable::MapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std:
|
||||||
KMemoryAttribute::Locked);
|
KMemoryAttribute::Locked);
|
||||||
block_manager->Update(dst_addr, num_pages, KMemoryState::AliasCode);
|
block_manager->Update(dst_addr, num_pages, KMemoryState::AliasCode);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::UnmapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
ResultCode KPageTable::UnmapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
||||||
std::lock_guard lock{page_table_lock};
|
std::lock_guard lock{page_table_lock};
|
||||||
|
|
||||||
if (!size) {
|
if (!size) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::size_t num_pages{size / PageSize};
|
const std::size_t num_pages{size / PageSize};
|
||||||
|
@ -360,7 +360,7 @@ ResultCode KPageTable::UnmapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, st
|
||||||
block_manager->Update(src_addr, num_pages, KMemoryState::Normal,
|
block_manager->Update(src_addr, num_pages, KMemoryState::Normal,
|
||||||
KMemoryPermission::ReadAndWrite);
|
KMemoryPermission::ReadAndWrite);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KPageTable::MapPhysicalMemory(KPageLinkedList& page_linked_list, VAddr start, VAddr end) {
|
void KPageTable::MapPhysicalMemory(KPageLinkedList& page_linked_list, VAddr start, VAddr end) {
|
||||||
|
@ -408,7 +408,7 @@ ResultCode KPageTable::MapPhysicalMemory(VAddr addr, std::size_t size) {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (mapped_size == size) {
|
if (mapped_size == size) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::size_t remaining_size{size - mapped_size};
|
const std::size_t remaining_size{size - mapped_size};
|
||||||
|
@ -440,14 +440,14 @@ ResultCode KPageTable::MapPhysicalMemory(VAddr addr, std::size_t size) {
|
||||||
KMemoryAttribute::None, KMemoryState::Normal,
|
KMemoryAttribute::None, KMemoryState::Normal,
|
||||||
KMemoryPermission::ReadAndWrite, KMemoryAttribute::None);
|
KMemoryPermission::ReadAndWrite, KMemoryAttribute::None);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) {
|
ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) {
|
||||||
std::lock_guard lock{page_table_lock};
|
std::lock_guard lock{page_table_lock};
|
||||||
|
|
||||||
const VAddr end_addr{addr + size};
|
const VAddr end_addr{addr + size};
|
||||||
ResultCode result{RESULT_SUCCESS};
|
ResultCode result{ResultSuccess};
|
||||||
std::size_t mapped_size{};
|
std::size_t mapped_size{};
|
||||||
|
|
||||||
// Verify that the region can be unmapped
|
// Verify that the region can be unmapped
|
||||||
|
@ -468,7 +468,7 @@ ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mapped_size) {
|
if (!mapped_size) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
CASCADE_CODE(UnmapMemory(addr, size));
|
CASCADE_CODE(UnmapMemory(addr, size));
|
||||||
|
@ -477,14 +477,14 @@ ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) {
|
||||||
process->GetResourceLimit()->Release(LimitableResource::PhysicalMemory, mapped_size);
|
process->GetResourceLimit()->Release(LimitableResource::PhysicalMemory, mapped_size);
|
||||||
physical_memory_usage -= mapped_size;
|
physical_memory_usage -= mapped_size;
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::UnmapMemory(VAddr addr, std::size_t size) {
|
ResultCode KPageTable::UnmapMemory(VAddr addr, std::size_t size) {
|
||||||
std::lock_guard lock{page_table_lock};
|
std::lock_guard lock{page_table_lock};
|
||||||
|
|
||||||
const VAddr end_addr{addr + size};
|
const VAddr end_addr{addr + size};
|
||||||
ResultCode result{RESULT_SUCCESS};
|
ResultCode result{ResultSuccess};
|
||||||
KPageLinkedList page_linked_list;
|
KPageLinkedList page_linked_list;
|
||||||
|
|
||||||
// Unmap each region within the range
|
// Unmap each region within the range
|
||||||
|
@ -513,7 +513,7 @@ ResultCode KPageTable::UnmapMemory(VAddr addr, std::size_t size) {
|
||||||
|
|
||||||
block_manager->Update(addr, num_pages, KMemoryState::Free);
|
block_manager->Update(addr, num_pages, KMemoryState::Free);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::Map(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
ResultCode KPageTable::Map(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
||||||
|
@ -552,7 +552,7 @@ ResultCode KPageTable::Map(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
||||||
block_manager->Update(dst_addr, num_pages, KMemoryState::Stack,
|
block_manager->Update(dst_addr, num_pages, KMemoryState::Stack,
|
||||||
KMemoryPermission::ReadAndWrite);
|
KMemoryPermission::ReadAndWrite);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::Unmap(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
ResultCode KPageTable::Unmap(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
||||||
|
@ -594,7 +594,7 @@ ResultCode KPageTable::Unmap(VAddr dst_addr, VAddr src_addr, std::size_t size) {
|
||||||
block_manager->Update(src_addr, num_pages, src_state, KMemoryPermission::ReadAndWrite);
|
block_manager->Update(src_addr, num_pages, src_state, KMemoryPermission::ReadAndWrite);
|
||||||
block_manager->Update(dst_addr, num_pages, KMemoryState::Free);
|
block_manager->Update(dst_addr, num_pages, KMemoryState::Free);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::MapPages(VAddr addr, const KPageLinkedList& page_linked_list,
|
ResultCode KPageTable::MapPages(VAddr addr, const KPageLinkedList& page_linked_list,
|
||||||
|
@ -616,7 +616,7 @@ ResultCode KPageTable::MapPages(VAddr addr, const KPageLinkedList& page_linked_l
|
||||||
cur_addr += node.GetNumPages() * PageSize;
|
cur_addr += node.GetNumPages() * PageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::MapPages(VAddr addr, KPageLinkedList& page_linked_list, KMemoryState state,
|
ResultCode KPageTable::MapPages(VAddr addr, KPageLinkedList& page_linked_list, KMemoryState state,
|
||||||
|
@ -638,7 +638,7 @@ ResultCode KPageTable::MapPages(VAddr addr, KPageLinkedList& page_linked_list, K
|
||||||
|
|
||||||
block_manager->Update(addr, num_pages, state, perm);
|
block_manager->Update(addr, num_pages, state, perm);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked_list) {
|
ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked_list) {
|
||||||
|
@ -655,7 +655,7 @@ ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked
|
||||||
cur_addr += node.GetNumPages() * PageSize;
|
cur_addr += node.GetNumPages() * PageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::UnmapPages(VAddr addr, KPageLinkedList& page_linked_list,
|
ResultCode KPageTable::UnmapPages(VAddr addr, KPageLinkedList& page_linked_list,
|
||||||
|
@ -677,7 +677,7 @@ ResultCode KPageTable::UnmapPages(VAddr addr, KPageLinkedList& page_linked_list,
|
||||||
|
|
||||||
block_manager->Update(addr, num_pages, state, KMemoryPermission::None);
|
block_manager->Update(addr, num_pages, state, KMemoryPermission::None);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size,
|
ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size,
|
||||||
|
@ -708,7 +708,7 @@ ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size,
|
||||||
|
|
||||||
// Return early if there is nothing to change
|
// Return early if there is nothing to change
|
||||||
if (state == prev_state && perm == prev_perm) {
|
if (state == prev_state && perm == prev_perm) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prev_perm & KMemoryPermission::Execute) != (perm & KMemoryPermission::Execute)) {
|
if ((prev_perm & KMemoryPermission::Execute) != (perm & KMemoryPermission::Execute)) {
|
||||||
|
@ -725,7 +725,7 @@ ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size,
|
||||||
|
|
||||||
block_manager->Update(addr, num_pages, state, perm);
|
block_manager->Update(addr, num_pages, state, perm);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
KMemoryInfo KPageTable::QueryInfoImpl(VAddr addr) {
|
KMemoryInfo KPageTable::QueryInfoImpl(VAddr addr) {
|
||||||
|
@ -758,7 +758,7 @@ ResultCode KPageTable::ReserveTransferMemory(VAddr addr, std::size_t size, KMemo
|
||||||
|
|
||||||
block_manager->Update(addr, size / PageSize, state, perm, attribute | KMemoryAttribute::Locked);
|
block_manager->Update(addr, size / PageSize, state, perm, attribute | KMemoryAttribute::Locked);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::ResetTransferMemory(VAddr addr, std::size_t size) {
|
ResultCode KPageTable::ResetTransferMemory(VAddr addr, std::size_t size) {
|
||||||
|
@ -775,7 +775,7 @@ ResultCode KPageTable::ResetTransferMemory(VAddr addr, std::size_t size) {
|
||||||
|
|
||||||
block_manager->Update(addr, size / PageSize, state, KMemoryPermission::ReadAndWrite);
|
block_manager->Update(addr, size / PageSize, state, KMemoryPermission::ReadAndWrite);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, KMemoryAttribute mask,
|
ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, KMemoryAttribute mask,
|
||||||
|
@ -797,13 +797,13 @@ ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, KMemoryA
|
||||||
|
|
||||||
block_manager->Update(addr, size / PageSize, state, perm, attribute);
|
block_manager->Update(addr, size / PageSize, state, perm, attribute);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::SetHeapCapacity(std::size_t new_heap_capacity) {
|
ResultCode KPageTable::SetHeapCapacity(std::size_t new_heap_capacity) {
|
||||||
std::lock_guard lock{page_table_lock};
|
std::lock_guard lock{page_table_lock};
|
||||||
heap_capacity = new_heap_capacity;
|
heap_capacity = new_heap_capacity;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultVal<VAddr> KPageTable::SetHeapSize(std::size_t size) {
|
ResultVal<VAddr> KPageTable::SetHeapSize(std::size_t size) {
|
||||||
|
@ -911,7 +911,7 @@ ResultCode KPageTable::LockForDeviceAddressSpace(VAddr addr, std::size_t size) {
|
||||||
},
|
},
|
||||||
perm);
|
perm);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size) {
|
ResultCode KPageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size) {
|
||||||
|
@ -934,13 +934,13 @@ ResultCode KPageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size)
|
||||||
},
|
},
|
||||||
perm);
|
perm);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::InitializeMemoryLayout(VAddr start, VAddr end) {
|
ResultCode KPageTable::InitializeMemoryLayout(VAddr start, VAddr end) {
|
||||||
block_manager = std::make_unique<KMemoryBlockManager>(start, end);
|
block_manager = std::make_unique<KMemoryBlockManager>(start, end);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KPageTable::IsRegionMapped(VAddr address, u64 size) {
|
bool KPageTable::IsRegionMapped(VAddr address, u64 size) {
|
||||||
|
@ -1006,7 +1006,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLin
|
||||||
addr += size;
|
addr += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermission perm,
|
ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermission perm,
|
||||||
|
@ -1033,7 +1033,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermiss
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr VAddr KPageTable::GetRegionAddress(KMemoryState state) const {
|
constexpr VAddr KPageTable::GetRegionAddress(KMemoryState state) const {
|
||||||
|
@ -1164,7 +1164,7 @@ constexpr ResultCode KPageTable::CheckMemoryState(const KMemoryInfo& info, KMemo
|
||||||
return ResultInvalidCurrentMemory;
|
return ResultInvalidCurrentMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm,
|
ResultCode KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm,
|
||||||
|
@ -1223,7 +1223,7 @@ ResultCode KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermissi
|
||||||
*out_attr = first_attr & static_cast<KMemoryAttribute>(~ignore_attr);
|
*out_attr = first_attr & static_cast<KMemoryAttribute>(~ignore_attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
|
@ -59,7 +59,7 @@ ResultCode KPort::EnqueueSession(KServerSession* session) {
|
||||||
server.EnqueueSession(session);
|
server.EnqueueSession(session);
|
||||||
server.GetSessionRequestHandler()->ClientConnected(server.AcceptSession());
|
server.GetSessionRequestHandler()->ClientConnected(server.AcceptSession());
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
|
@ -142,7 +142,7 @@ ResultCode KProcess::Initialize(KProcess* process, Core::System& system, std::st
|
||||||
// Open a reference to the resource limit.
|
// Open a reference to the resource limit.
|
||||||
process->resource_limit->Open();
|
process->resource_limit->Open();
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
KResourceLimit* KProcess::GetResourceLimit() const {
|
KResourceLimit* KProcess::GetResourceLimit() const {
|
||||||
|
@ -258,7 +258,7 @@ ResultCode KProcess::AddSharedMemory(KSharedMemory* shmem, [[maybe_unused]] VAdd
|
||||||
// Open a reference to the shared memory.
|
// Open a reference to the shared memory.
|
||||||
shmem->Open();
|
shmem->Open();
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KProcess::RemoveSharedMemory(KSharedMemory* shmem, [[maybe_unused]] VAddr address,
|
void KProcess::RemoveSharedMemory(KSharedMemory* shmem, [[maybe_unused]] VAddr address,
|
||||||
|
@ -291,7 +291,7 @@ ResultCode KProcess::Reset() {
|
||||||
|
|
||||||
// Clear signaled.
|
// Clear signaled.
|
||||||
is_signaled = false;
|
is_signaled = false;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata,
|
ResultCode KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata,
|
||||||
|
@ -524,7 +524,7 @@ ResultCode KProcess::AllocateMainThreadStack(std::size_t stack_size) {
|
||||||
|
|
||||||
main_thread_stack_top += main_thread_stack_size;
|
main_thread_stack_top += main_thread_stack_size;
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
|
@ -310,7 +310,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param metadata The provided metadata to load process specific info from.
|
* @param metadata The provided metadata to load process specific info from.
|
||||||
*
|
*
|
||||||
* @returns RESULT_SUCCESS if all relevant metadata was able to be
|
* @returns ResultSuccess if all relevant metadata was able to be
|
||||||
* loaded and parsed. Otherwise, an error code is returned.
|
* loaded and parsed. Otherwise, an error code is returned.
|
||||||
*/
|
*/
|
||||||
ResultCode LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size);
|
ResultCode LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size);
|
||||||
|
|
|
@ -36,13 +36,13 @@ ResultCode KReadableEvent::Signal() {
|
||||||
NotifyAvailable();
|
NotifyAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KReadableEvent::Clear() {
|
ResultCode KReadableEvent::Clear() {
|
||||||
Reset();
|
Reset();
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KReadableEvent::Reset() {
|
ResultCode KReadableEvent::Reset() {
|
||||||
|
@ -53,7 +53,7 @@ ResultCode KReadableEvent::Reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
is_signaled = false;
|
is_signaled = false;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
|
@ -80,7 +80,7 @@ ResultCode KResourceLimit::SetLimitValue(LimitableResource which, s64 value) {
|
||||||
|
|
||||||
limit_values[index] = value;
|
limit_values[index] = value;
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KResourceLimit::Reserve(LimitableResource which, s64 value) {
|
bool KResourceLimit::Reserve(LimitableResource which, s64 value) {
|
||||||
|
|
|
@ -71,7 +71,7 @@ std::size_t KServerSession::NumDomainRequestHandlers() const {
|
||||||
|
|
||||||
ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& context) {
|
ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& context) {
|
||||||
if (!context.HasDomainMessageHeader()) {
|
if (!context.HasDomainMessageHeader()) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set domain handlers in HLE context, used for domain objects (IPC interfaces) as inputs
|
// Set domain handlers in HLE context, used for domain objects (IPC interfaces) as inputs
|
||||||
|
@ -88,7 +88,7 @@ ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& co
|
||||||
"to {} needed to return a new interface!",
|
"to {} needed to return a new interface!",
|
||||||
object_id, name);
|
object_id, name);
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return RESULT_SUCCESS; // Ignore error if asserts are off
|
return ResultSuccess; // Ignore error if asserts are off
|
||||||
}
|
}
|
||||||
return manager->DomainHandler(object_id - 1)->HandleSyncRequest(*this, context);
|
return manager->DomainHandler(object_id - 1)->HandleSyncRequest(*this, context);
|
||||||
|
|
||||||
|
@ -98,14 +98,14 @@ ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& co
|
||||||
manager->CloseDomainHandler(object_id - 1);
|
manager->CloseDomainHandler(object_id - 1);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{context, 2};
|
IPC::ResponseBuilder rb{context, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_CRITICAL(IPC, "Unknown domain command={}", domain_message_header.command.Value());
|
LOG_CRITICAL(IPC, "Unknown domain command={}", domain_message_header.command.Value());
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memory& memory) {
|
ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memory& memory) {
|
||||||
|
@ -116,14 +116,14 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor
|
||||||
|
|
||||||
if (auto strong_ptr = service_thread.lock()) {
|
if (auto strong_ptr = service_thread.lock()) {
|
||||||
strong_ptr->QueueSyncRequest(*parent, std::move(context));
|
strong_ptr->QueueSyncRequest(*parent, std::move(context));
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KServerSession::CompleteSyncRequest(HLERequestContext& context) {
|
ResultCode KServerSession::CompleteSyncRequest(HLERequestContext& context) {
|
||||||
ResultCode result = RESULT_SUCCESS;
|
ResultCode result = ResultSuccess;
|
||||||
// If the session has been converted to a domain, handle the domain request
|
// If the session has been converted to a domain, handle the domain request
|
||||||
if (IsDomain() && context.HasDomainMessageHeader()) {
|
if (IsDomain() && context.HasDomainMessageHeader()) {
|
||||||
result = HandleDomainSyncRequest(context);
|
result = HandleDomainSyncRequest(context);
|
||||||
|
|
|
@ -55,7 +55,7 @@ ResultCode KSharedMemory::Initialize(Core::DeviceMemory& device_memory_, KProces
|
||||||
// Clear all pages in the memory.
|
// Clear all pages in the memory.
|
||||||
std::memset(device_memory_.GetPointer(physical_address_), 0, size_);
|
std::memset(device_memory_.GetPointer(physical_address_), 0, size_);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KSharedMemory::Finalize() {
|
void KSharedMemory::Finalize() {
|
||||||
|
|
|
@ -38,7 +38,7 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index,
|
||||||
if (objects[i]->IsSignaled()) {
|
if (objects[i]->IsSignaled()) {
|
||||||
*out_index = i;
|
*out_index = i;
|
||||||
slp.CancelSleep();
|
slp.CancelSleep();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index,
|
||||||
kernel_ctx.TimeManager().UnscheduleTimeEvent(thread);
|
kernel_ctx.TimeManager().UnscheduleTimeEvent(thread);
|
||||||
|
|
||||||
// Get the wait result.
|
// Get the wait result.
|
||||||
ResultCode wait_result{RESULT_SUCCESS};
|
ResultCode wait_result{ResultSuccess};
|
||||||
s32 sync_index = -1;
|
s32 sync_index = -1;
|
||||||
{
|
{
|
||||||
KScopedSchedulerLock lock(kernel_ctx);
|
KScopedSchedulerLock lock(kernel_ctx);
|
||||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
||||||
|
|
||||||
void NotifyAvailable(ResultCode result);
|
void NotifyAvailable(ResultCode result);
|
||||||
void NotifyAvailable() {
|
void NotifyAvailable() {
|
||||||
return this->NotifyAvailable(RESULT_SUCCESS);
|
return this->NotifyAvailable(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -205,7 +205,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uintptr_t arg,
|
ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uintptr_t arg,
|
||||||
|
@ -219,7 +219,7 @@ ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uint
|
||||||
thread->host_context =
|
thread->host_context =
|
||||||
std::make_shared<Common::Fiber>(std::move(init_func), init_func_parameter);
|
std::make_shared<Common::Fiber>(std::move(init_func), init_func_parameter);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KThread::InitializeDummyThread(KThread* thread) {
|
ResultCode KThread::InitializeDummyThread(KThread* thread) {
|
||||||
|
@ -460,7 +460,7 @@ ResultCode KThread::GetCoreMask(s32* out_ideal_core, u64* out_affinity_mask) {
|
||||||
*out_ideal_core = virtual_ideal_core_id;
|
*out_ideal_core = virtual_ideal_core_id;
|
||||||
*out_affinity_mask = virtual_affinity_mask;
|
*out_affinity_mask = virtual_affinity_mask;
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KThread::GetPhysicalCoreMask(s32* out_ideal_core, u64* out_affinity_mask) {
|
ResultCode KThread::GetPhysicalCoreMask(s32* out_ideal_core, u64* out_affinity_mask) {
|
||||||
|
@ -476,7 +476,7 @@ ResultCode KThread::GetPhysicalCoreMask(s32* out_ideal_core, u64* out_affinity_m
|
||||||
*out_affinity_mask = original_physical_affinity_mask.GetAffinityMask();
|
*out_affinity_mask = original_physical_affinity_mask.GetAffinityMask();
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KThread::SetCoreMask(s32 cpu_core_id, u64 v_affinity_mask) {
|
ResultCode KThread::SetCoreMask(s32 cpu_core_id, u64 v_affinity_mask) {
|
||||||
|
@ -599,7 +599,7 @@ ResultCode KThread::SetCoreMask(s32 cpu_core_id, u64 v_affinity_mask) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KThread::SetBasePriority(s32 value) {
|
void KThread::SetBasePriority(s32 value) {
|
||||||
|
@ -778,7 +778,7 @@ ResultCode KThread::SetActivity(Svc::ThreadActivity activity) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KThread::GetThreadContext3(std::vector<u8>& out) {
|
ResultCode KThread::GetThreadContext3(std::vector<u8>& out) {
|
||||||
|
@ -813,7 +813,7 @@ ResultCode KThread::GetThreadContext3(std::vector<u8>& out) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KThread::AddWaiterImpl(KThread* thread) {
|
void KThread::AddWaiterImpl(KThread* thread) {
|
||||||
|
@ -970,7 +970,7 @@ ResultCode KThread::Run() {
|
||||||
|
|
||||||
// Set our state and finish.
|
// Set our state and finish.
|
||||||
SetState(ThreadState::Runnable);
|
SetState(ThreadState::Runnable);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1020,7 +1020,7 @@ ResultCode KThread::Sleep(s64 timeout) {
|
||||||
// Cancel the timer.
|
// Cancel the timer.
|
||||||
kernel.TimeManager().UnscheduleTimeEvent(this);
|
kernel.TimeManager().UnscheduleTimeEvent(this);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KThread::SetState(ThreadState state) {
|
void KThread::SetState(ThreadState state) {
|
||||||
|
|
|
@ -684,7 +684,7 @@ private:
|
||||||
u32 address_key_value{};
|
u32 address_key_value{};
|
||||||
u32 suspend_request_flags{};
|
u32 suspend_request_flags{};
|
||||||
u32 suspend_allowed_flags{};
|
u32 suspend_allowed_flags{};
|
||||||
ResultCode wait_result{RESULT_SUCCESS};
|
ResultCode wait_result{ResultSuccess};
|
||||||
s32 base_priority{};
|
s32 base_priority{};
|
||||||
s32 physical_ideal_core_id{};
|
s32 physical_ideal_core_id{};
|
||||||
s32 virtual_ideal_core_id{};
|
s32 virtual_ideal_core_id{};
|
||||||
|
|
|
@ -28,7 +28,7 @@ ResultCode KTransferMemory::Initialize(VAddr address_, std::size_t size_,
|
||||||
size = size_;
|
size = size_;
|
||||||
is_initialized = true;
|
is_initialized = true;
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KTransferMemory::Finalize() {
|
void KTransferMemory::Finalize() {
|
||||||
|
|
|
@ -153,7 +153,7 @@ ResultCode ProcessCapabilities::ParseCapabilities(const u32* capabilities,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits,
|
ResultCode ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits,
|
||||||
|
@ -167,7 +167,7 @@ ResultCode ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& s
|
||||||
// Bail early on ignorable entries, as one would expect,
|
// Bail early on ignorable entries, as one would expect,
|
||||||
// ignorable descriptors can be ignored.
|
// ignorable descriptors can be ignored.
|
||||||
if (type == CapabilityType::Ignorable) {
|
if (type == CapabilityType::Ignorable) {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that the give flag hasn't already been initialized before.
|
// Ensure that the give flag hasn't already been initialized before.
|
||||||
|
@ -264,7 +264,7 @@ ResultCode ProcessCapabilities::HandlePriorityCoreNumFlags(u32 flags) {
|
||||||
|
|
||||||
core_mask = make_mask(core_num_min, core_num_max);
|
core_mask = make_mask(core_num_min, core_num_max);
|
||||||
priority_mask = make_mask(priority_min, priority_max);
|
priority_mask = make_mask(priority_min, priority_max);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) {
|
ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) {
|
||||||
|
@ -288,23 +288,23 @@ ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags)
|
||||||
svc_capabilities[svc_number] = true;
|
svc_capabilities[svc_number] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleMapPhysicalFlags(u32 flags, u32 size_flags,
|
ResultCode ProcessCapabilities::HandleMapPhysicalFlags(u32 flags, u32 size_flags,
|
||||||
KPageTable& page_table) {
|
KPageTable& page_table) {
|
||||||
// TODO(Lioncache): Implement once the memory manager can handle this.
|
// TODO(Lioncache): Implement once the memory manager can handle this.
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleMapIOFlags(u32 flags, KPageTable& page_table) {
|
ResultCode ProcessCapabilities::HandleMapIOFlags(u32 flags, KPageTable& page_table) {
|
||||||
// TODO(Lioncache): Implement once the memory manager can handle this.
|
// TODO(Lioncache): Implement once the memory manager can handle this.
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleMapRegionFlags(u32 flags, KPageTable& page_table) {
|
ResultCode ProcessCapabilities::HandleMapRegionFlags(u32 flags, KPageTable& page_table) {
|
||||||
// TODO(Lioncache): Implement once the memory manager can handle this.
|
// TODO(Lioncache): Implement once the memory manager can handle this.
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) {
|
ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) {
|
||||||
|
@ -331,7 +331,7 @@ ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) {
|
||||||
interrupt_capabilities[interrupt] = true;
|
interrupt_capabilities[interrupt] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) {
|
ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) {
|
||||||
|
@ -342,7 +342,7 @@ ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
program_type = static_cast<ProgramType>((flags >> 14) & 0b111);
|
program_type = static_cast<ProgramType>((flags >> 14) & 0b111);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) {
|
ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) {
|
||||||
|
@ -362,7 +362,7 @@ ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel_version = flags;
|
kernel_version = flags;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) {
|
ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) {
|
||||||
|
@ -373,7 +373,7 @@ ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_table_size = static_cast<s32>((flags >> 16) & 0x3FF);
|
handle_table_size = static_cast<s32>((flags >> 16) & 0x3FF);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) {
|
ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) {
|
||||||
|
@ -385,7 +385,7 @@ ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) {
|
||||||
|
|
||||||
is_debuggable = (flags & 0x20000) != 0;
|
is_debuggable = (flags & 0x20000) != 0;
|
||||||
can_force_debug = (flags & 0x40000) != 0;
|
can_force_debug = (flags & 0x40000) != 0;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
/// @param page_table The memory manager to use for handling any mapping-related
|
/// @param page_table The memory manager to use for handling any mapping-related
|
||||||
/// operations (such as mapping IO memory, etc).
|
/// operations (such as mapping IO memory, etc).
|
||||||
///
|
///
|
||||||
/// @returns RESULT_SUCCESS if this capabilities instance was able to be initialized,
|
/// @returns ResultSuccess if this capabilities instance was able to be initialized,
|
||||||
/// otherwise, an error code upon failure.
|
/// otherwise, an error code upon failure.
|
||||||
///
|
///
|
||||||
ResultCode InitializeForKernelProcess(const u32* capabilities, std::size_t num_capabilities,
|
ResultCode InitializeForKernelProcess(const u32* capabilities, std::size_t num_capabilities,
|
||||||
|
@ -97,7 +97,7 @@ public:
|
||||||
/// @param page_table The memory manager to use for handling any mapping-related
|
/// @param page_table The memory manager to use for handling any mapping-related
|
||||||
/// operations (such as mapping IO memory, etc).
|
/// operations (such as mapping IO memory, etc).
|
||||||
///
|
///
|
||||||
/// @returns RESULT_SUCCESS if this capabilities instance was able to be initialized,
|
/// @returns ResultSuccess if this capabilities instance was able to be initialized,
|
||||||
/// otherwise, an error code upon failure.
|
/// otherwise, an error code upon failure.
|
||||||
///
|
///
|
||||||
ResultCode InitializeForUserProcess(const u32* capabilities, std::size_t num_capabilities,
|
ResultCode InitializeForUserProcess(const u32* capabilities, std::size_t num_capabilities,
|
||||||
|
@ -184,7 +184,7 @@ private:
|
||||||
/// @param page_table The memory manager that will perform any memory
|
/// @param page_table The memory manager that will perform any memory
|
||||||
/// mapping if necessary.
|
/// mapping if necessary.
|
||||||
///
|
///
|
||||||
/// @return RESULT_SUCCESS if no errors occur, otherwise an error code.
|
/// @return ResultSuccess if no errors occur, otherwise an error code.
|
||||||
///
|
///
|
||||||
ResultCode ParseCapabilities(const u32* capabilities, std::size_t num_capabilities,
|
ResultCode ParseCapabilities(const u32* capabilities, std::size_t num_capabilities,
|
||||||
KPageTable& page_table);
|
KPageTable& page_table);
|
||||||
|
@ -199,7 +199,7 @@ private:
|
||||||
/// @param page_table The memory manager that will perform any memory
|
/// @param page_table The memory manager that will perform any memory
|
||||||
/// mapping if necessary.
|
/// mapping if necessary.
|
||||||
///
|
///
|
||||||
/// @return RESULT_SUCCESS if no errors occurred, otherwise an error code.
|
/// @return ResultSuccess if no errors occurred, otherwise an error code.
|
||||||
///
|
///
|
||||||
ResultCode ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, u32 flag,
|
ResultCode ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, u32 flag,
|
||||||
KPageTable& page_table);
|
KPageTable& page_table);
|
||||||
|
|
|
@ -132,7 +132,7 @@ ResultCode MapUnmapMemorySanityChecks(const KPageTable& manager, VAddr dst_addr,
|
||||||
return ResultInvalidMemoryRegion;
|
return ResultInvalidMemoryRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class ResourceLimitValueType {
|
enum class ResourceLimitValueType {
|
||||||
|
@ -164,7 +164,7 @@ static ResultCode SetHeapSize(Core::System& system, VAddr* heap_addr, u64 heap_s
|
||||||
|
|
||||||
CASCADE_RESULT(*heap_addr, page_table.SetHeapSize(heap_size));
|
CASCADE_RESULT(*heap_addr, page_table.SetHeapSize(heap_size));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode SetHeapSize32(Core::System& system, u32* heap_addr, u32 heap_size) {
|
static ResultCode SetHeapSize32(Core::System& system, u32* heap_addr, u32 heap_size) {
|
||||||
|
@ -305,7 +305,7 @@ static ResultCode ConnectToNamedPort(Core::System& system, Handle* out, VAddr po
|
||||||
|
|
||||||
// We succeeded.
|
// We succeeded.
|
||||||
handle_guard.Cancel();
|
handle_guard.Cancel();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode ConnectToNamedPort32(Core::System& system, Handle* out_handle,
|
static ResultCode ConnectToNamedPort32(Core::System& system, Handle* out_handle,
|
||||||
|
@ -349,7 +349,7 @@ static ResultCode GetThreadId(Core::System& system, u64* out_thread_id, Handle t
|
||||||
|
|
||||||
// Get the thread's id.
|
// Get the thread's id.
|
||||||
*out_thread_id = thread->GetId();
|
*out_thread_id = thread->GetId();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetThreadId32(Core::System& system, u32* out_thread_id_low,
|
static ResultCode GetThreadId32(Core::System& system, u32* out_thread_id_low,
|
||||||
|
@ -454,7 +454,7 @@ static ResultCode CancelSynchronization(Core::System& system, Handle handle) {
|
||||||
|
|
||||||
// Cancel the thread's wait.
|
// Cancel the thread's wait.
|
||||||
thread->WaitCancel();
|
thread->WaitCancel();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode CancelSynchronization32(Core::System& system, Handle handle) {
|
static ResultCode CancelSynchronization32(Core::System& system, Handle handle) {
|
||||||
|
@ -715,76 +715,76 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
|
||||||
switch (info_id_type) {
|
switch (info_id_type) {
|
||||||
case GetInfoType::AllowedCPUCoreMask:
|
case GetInfoType::AllowedCPUCoreMask:
|
||||||
*result = process->GetCoreMask();
|
*result = process->GetCoreMask();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::AllowedThreadPriorityMask:
|
case GetInfoType::AllowedThreadPriorityMask:
|
||||||
*result = process->GetPriorityMask();
|
*result = process->GetPriorityMask();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::MapRegionBaseAddr:
|
case GetInfoType::MapRegionBaseAddr:
|
||||||
*result = process->PageTable().GetAliasRegionStart();
|
*result = process->PageTable().GetAliasRegionStart();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::MapRegionSize:
|
case GetInfoType::MapRegionSize:
|
||||||
*result = process->PageTable().GetAliasRegionSize();
|
*result = process->PageTable().GetAliasRegionSize();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::HeapRegionBaseAddr:
|
case GetInfoType::HeapRegionBaseAddr:
|
||||||
*result = process->PageTable().GetHeapRegionStart();
|
*result = process->PageTable().GetHeapRegionStart();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::HeapRegionSize:
|
case GetInfoType::HeapRegionSize:
|
||||||
*result = process->PageTable().GetHeapRegionSize();
|
*result = process->PageTable().GetHeapRegionSize();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::ASLRRegionBaseAddr:
|
case GetInfoType::ASLRRegionBaseAddr:
|
||||||
*result = process->PageTable().GetAliasCodeRegionStart();
|
*result = process->PageTable().GetAliasCodeRegionStart();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::ASLRRegionSize:
|
case GetInfoType::ASLRRegionSize:
|
||||||
*result = process->PageTable().GetAliasCodeRegionSize();
|
*result = process->PageTable().GetAliasCodeRegionSize();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::StackRegionBaseAddr:
|
case GetInfoType::StackRegionBaseAddr:
|
||||||
*result = process->PageTable().GetStackRegionStart();
|
*result = process->PageTable().GetStackRegionStart();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::StackRegionSize:
|
case GetInfoType::StackRegionSize:
|
||||||
*result = process->PageTable().GetStackRegionSize();
|
*result = process->PageTable().GetStackRegionSize();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::TotalPhysicalMemoryAvailable:
|
case GetInfoType::TotalPhysicalMemoryAvailable:
|
||||||
*result = process->GetTotalPhysicalMemoryAvailable();
|
*result = process->GetTotalPhysicalMemoryAvailable();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::TotalPhysicalMemoryUsed:
|
case GetInfoType::TotalPhysicalMemoryUsed:
|
||||||
*result = process->GetTotalPhysicalMemoryUsed();
|
*result = process->GetTotalPhysicalMemoryUsed();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::SystemResourceSize:
|
case GetInfoType::SystemResourceSize:
|
||||||
*result = process->GetSystemResourceSize();
|
*result = process->GetSystemResourceSize();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::SystemResourceUsage:
|
case GetInfoType::SystemResourceUsage:
|
||||||
LOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query system resource usage");
|
LOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query system resource usage");
|
||||||
*result = process->GetSystemResourceUsage();
|
*result = process->GetSystemResourceUsage();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::TitleId:
|
case GetInfoType::TitleId:
|
||||||
*result = process->GetTitleID();
|
*result = process->GetTitleID();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::UserExceptionContextAddr:
|
case GetInfoType::UserExceptionContextAddr:
|
||||||
*result = process->GetTLSRegionAddress();
|
*result = process->GetTLSRegionAddress();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::TotalPhysicalMemoryAvailableWithoutSystemResource:
|
case GetInfoType::TotalPhysicalMemoryAvailableWithoutSystemResource:
|
||||||
*result = process->GetTotalPhysicalMemoryAvailableWithoutSystemResource();
|
*result = process->GetTotalPhysicalMemoryAvailableWithoutSystemResource();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::TotalPhysicalMemoryUsedWithoutSystemResource:
|
case GetInfoType::TotalPhysicalMemoryUsedWithoutSystemResource:
|
||||||
*result = process->GetTotalPhysicalMemoryUsedWithoutSystemResource();
|
*result = process->GetTotalPhysicalMemoryUsedWithoutSystemResource();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -796,7 +796,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
|
||||||
|
|
||||||
case GetInfoType::IsCurrentProcessBeingDebugged:
|
case GetInfoType::IsCurrentProcessBeingDebugged:
|
||||||
*result = 0;
|
*result = 0;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::RegisterResourceLimit: {
|
case GetInfoType::RegisterResourceLimit: {
|
||||||
if (handle != 0) {
|
if (handle != 0) {
|
||||||
|
@ -816,14 +816,14 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
|
||||||
if (!resource_limit) {
|
if (!resource_limit) {
|
||||||
*result = Svc::InvalidHandle;
|
*result = Svc::InvalidHandle;
|
||||||
// Yes, the kernel considers this a successful operation.
|
// Yes, the kernel considers this a successful operation.
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle resource_handle{};
|
Handle resource_handle{};
|
||||||
R_TRY(handle_table.Add(&resource_handle, resource_limit));
|
R_TRY(handle_table.Add(&resource_handle, resource_limit));
|
||||||
|
|
||||||
*result = resource_handle;
|
*result = resource_handle;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GetInfoType::RandomEntropy:
|
case GetInfoType::RandomEntropy:
|
||||||
|
@ -840,13 +840,13 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
|
||||||
}
|
}
|
||||||
|
|
||||||
*result = system.Kernel().CurrentProcess()->GetRandomEntropy(info_sub_id);
|
*result = system.Kernel().CurrentProcess()->GetRandomEntropy(info_sub_id);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::PrivilegedProcessId:
|
case GetInfoType::PrivilegedProcessId:
|
||||||
LOG_WARNING(Kernel_SVC,
|
LOG_WARNING(Kernel_SVC,
|
||||||
"(STUBBED) Attempted to query privileged process id bounds, returned 0");
|
"(STUBBED) Attempted to query privileged process id bounds, returned 0");
|
||||||
*result = 0;
|
*result = 0;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
|
|
||||||
case GetInfoType::ThreadTickCount: {
|
case GetInfoType::ThreadTickCount: {
|
||||||
constexpr u64 num_cpus = 4;
|
constexpr u64 num_cpus = 4;
|
||||||
|
@ -881,7 +881,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
|
||||||
}
|
}
|
||||||
|
|
||||||
*result = out_ticks;
|
*result = out_ticks;
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1034,7 +1034,7 @@ static ResultCode SetThreadActivity(Core::System& system, Handle thread_handle,
|
||||||
// Set the activity.
|
// Set the activity.
|
||||||
R_TRY(thread->SetActivity(thread_activity));
|
R_TRY(thread->SetActivity(thread_activity));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode SetThreadActivity32(Core::System& system, Handle thread_handle,
|
static ResultCode SetThreadActivity32(Core::System& system, Handle thread_handle,
|
||||||
|
@ -1094,10 +1094,10 @@ static ResultCode GetThreadContext(Core::System& system, VAddr out_context, Hand
|
||||||
// Copy the thread context to user space.
|
// Copy the thread context to user space.
|
||||||
system.Memory().WriteBlock(out_context, context.data(), context.size());
|
system.Memory().WriteBlock(out_context, context.data(), context.size());
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetThreadContext32(Core::System& system, u32 out_context, Handle thread_handle) {
|
static ResultCode GetThreadContext32(Core::System& system, u32 out_context, Handle thread_handle) {
|
||||||
|
@ -1115,7 +1115,7 @@ static ResultCode GetThreadPriority(Core::System& system, u32* out_priority, Han
|
||||||
|
|
||||||
// Get the thread's priority.
|
// Get the thread's priority.
|
||||||
*out_priority = thread->GetPriority();
|
*out_priority = thread->GetPriority();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetThreadPriority32(Core::System& system, u32* out_priority, Handle handle) {
|
static ResultCode GetThreadPriority32(Core::System& system, u32* out_priority, Handle handle) {
|
||||||
|
@ -1138,7 +1138,7 @@ static ResultCode SetThreadPriority(Core::System& system, Handle thread_handle,
|
||||||
|
|
||||||
// Set the thread priority.
|
// Set the thread priority.
|
||||||
thread->SetBasePriority(priority);
|
thread->SetBasePriority(priority);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode SetThreadPriority32(Core::System& system, Handle thread_handle, u32 priority) {
|
static ResultCode SetThreadPriority32(Core::System& system, Handle thread_handle, u32 priority) {
|
||||||
|
@ -1207,7 +1207,7 @@ static ResultCode MapSharedMemory(Core::System& system, Handle shmem_handle, VAd
|
||||||
|
|
||||||
// We succeeded.
|
// We succeeded.
|
||||||
guard.Cancel();
|
guard.Cancel();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode MapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address,
|
static ResultCode MapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address,
|
||||||
|
@ -1240,7 +1240,7 @@ static ResultCode UnmapSharedMemory(Core::System& system, Handle shmem_handle, V
|
||||||
// Remove the shared memory from the process.
|
// Remove the shared memory from the process.
|
||||||
process.RemoveSharedMemory(shmem.GetPointerUnsafe(), address, size);
|
process.RemoveSharedMemory(shmem.GetPointerUnsafe(), address, size);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode UnmapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address,
|
static ResultCode UnmapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address,
|
||||||
|
@ -1276,7 +1276,7 @@ static ResultCode QueryProcessMemory(Core::System& system, VAddr memory_info_add
|
||||||
// Page info appears to be currently unused by the kernel and is always set to zero.
|
// Page info appears to be currently unused by the kernel and is always set to zero.
|
||||||
memory.Write32(page_info_address, 0);
|
memory.Write32(page_info_address, 0);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode QueryMemory(Core::System& system, VAddr memory_info_address,
|
static ResultCode QueryMemory(Core::System& system, VAddr memory_info_address,
|
||||||
|
@ -1524,7 +1524,7 @@ static ResultCode CreateThread(Core::System& system, Handle* out_handle, VAddr e
|
||||||
// Add the thread to the handle table.
|
// Add the thread to the handle table.
|
||||||
R_TRY(process.GetHandleTable().Add(out_handle, thread));
|
R_TRY(process.GetHandleTable().Add(out_handle, thread));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode CreateThread32(Core::System& system, Handle* out_handle, u32 priority,
|
static ResultCode CreateThread32(Core::System& system, Handle* out_handle, u32 priority,
|
||||||
|
@ -1547,7 +1547,7 @@ static ResultCode StartThread(Core::System& system, Handle thread_handle) {
|
||||||
// If we succeeded, persist a reference to the thread.
|
// If we succeeded, persist a reference to the thread.
|
||||||
thread->Open();
|
thread->Open();
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode StartThread32(Core::System& system, Handle thread_handle) {
|
static ResultCode StartThread32(Core::System& system, Handle thread_handle) {
|
||||||
|
@ -1796,7 +1796,7 @@ static ResultCode CloseHandle(Core::System& system, Handle handle) {
|
||||||
R_UNLESS(system.Kernel().CurrentProcess()->GetHandleTable().Remove(handle),
|
R_UNLESS(system.Kernel().CurrentProcess()->GetHandleTable().Remove(handle),
|
||||||
ResultInvalidHandle);
|
ResultInvalidHandle);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode CloseHandle32(Core::System& system, Handle handle) {
|
static ResultCode CloseHandle32(Core::System& system, Handle handle) {
|
||||||
|
@ -1891,7 +1891,7 @@ static ResultCode CreateTransferMemory(Core::System& system, Handle* out, VAddr
|
||||||
// Add the transfer memory to the handle table.
|
// Add the transfer memory to the handle table.
|
||||||
R_TRY(handle_table.Add(out, trmem));
|
R_TRY(handle_table.Add(out, trmem));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode CreateTransferMemory32(Core::System& system, Handle* out, u32 address, u32 size,
|
static ResultCode CreateTransferMemory32(Core::System& system, Handle* out, u32 address, u32 size,
|
||||||
|
@ -1911,7 +1911,7 @@ static ResultCode GetThreadCoreMask(Core::System& system, Handle thread_handle,
|
||||||
// Get the core mask.
|
// Get the core mask.
|
||||||
R_TRY(thread->GetCoreMask(out_core_id, out_affinity_mask));
|
R_TRY(thread->GetCoreMask(out_core_id, out_affinity_mask));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetThreadCoreMask32(Core::System& system, Handle thread_handle, s32* out_core_id,
|
static ResultCode GetThreadCoreMask32(Core::System& system, Handle thread_handle, s32* out_core_id,
|
||||||
|
@ -1952,7 +1952,7 @@ static ResultCode SetThreadCoreMask(Core::System& system, Handle thread_handle,
|
||||||
// Set the core mask.
|
// Set the core mask.
|
||||||
R_TRY(thread->SetCoreMask(core_id, affinity_mask));
|
R_TRY(thread->SetCoreMask(core_id, affinity_mask));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode SetThreadCoreMask32(Core::System& system, Handle thread_handle, s32 core_id,
|
static ResultCode SetThreadCoreMask32(Core::System& system, Handle thread_handle, s32 core_id,
|
||||||
|
@ -2051,7 +2051,7 @@ static ResultCode CreateEvent(Core::System& system, Handle* out_write, Handle* o
|
||||||
|
|
||||||
// We succeeded.
|
// We succeeded.
|
||||||
handle_guard.Cancel();
|
handle_guard.Cancel();
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode CreateEvent32(Core::System& system, Handle* out_write, Handle* out_read) {
|
static ResultCode CreateEvent32(Core::System& system, Handle* out_write, Handle* out_read) {
|
||||||
|
@ -2081,7 +2081,7 @@ static ResultCode GetProcessInfo(Core::System& system, u64* out, Handle process_
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = static_cast<u64>(process->GetStatus());
|
*out = static_cast<u64>(process->GetStatus());
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle) {
|
static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle) {
|
||||||
|
@ -2104,7 +2104,7 @@ static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle)
|
||||||
// Add the limit to the handle table.
|
// Add the limit to the handle table.
|
||||||
R_TRY(kernel.CurrentProcess()->GetHandleTable().Add(out_handle, resource_limit));
|
R_TRY(kernel.CurrentProcess()->GetHandleTable().Add(out_handle, resource_limit));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetResourceLimitLimitValue(Core::System& system, u64* out_limit_value,
|
static ResultCode GetResourceLimitLimitValue(Core::System& system, u64* out_limit_value,
|
||||||
|
@ -2125,7 +2125,7 @@ static ResultCode GetResourceLimitLimitValue(Core::System& system, u64* out_limi
|
||||||
// Get the limit value.
|
// Get the limit value.
|
||||||
*out_limit_value = resource_limit->GetLimitValue(which);
|
*out_limit_value = resource_limit->GetLimitValue(which);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetResourceLimitCurrentValue(Core::System& system, u64* out_current_value,
|
static ResultCode GetResourceLimitCurrentValue(Core::System& system, u64* out_current_value,
|
||||||
|
@ -2146,7 +2146,7 @@ static ResultCode GetResourceLimitCurrentValue(Core::System& system, u64* out_cu
|
||||||
// Get the current value.
|
// Get the current value.
|
||||||
*out_current_value = resource_limit->GetCurrentValue(which);
|
*out_current_value = resource_limit->GetCurrentValue(which);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_handle,
|
static ResultCode SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_handle,
|
||||||
|
@ -2166,7 +2166,7 @@ static ResultCode SetResourceLimitLimitValue(Core::System& system, Handle resour
|
||||||
// Set the limit value.
|
// Set the limit value.
|
||||||
R_TRY(resource_limit->SetLimitValue(which, limit_value));
|
R_TRY(resource_limit->SetLimitValue(which, limit_value));
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetProcessList(Core::System& system, u32* out_num_processes,
|
static ResultCode GetProcessList(Core::System& system, u32* out_num_processes,
|
||||||
|
@ -2203,7 +2203,7 @@ static ResultCode GetProcessList(Core::System& system, u32* out_num_processes,
|
||||||
}
|
}
|
||||||
|
|
||||||
*out_num_processes = static_cast<u32>(num_processes);
|
*out_num_processes = static_cast<u32>(num_processes);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode GetThreadList(Core::System& system, u32* out_num_threads, VAddr out_thread_ids,
|
static ResultCode GetThreadList(Core::System& system, u32* out_num_threads, VAddr out_thread_ids,
|
||||||
|
@ -2243,7 +2243,7 @@ static ResultCode GetThreadList(Core::System& system, u32* out_num_threads, VAdd
|
||||||
}
|
}
|
||||||
|
|
||||||
*out_num_threads = static_cast<u32>(num_threads);
|
*out_num_threads = static_cast<u32>(num_threads);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ResultCode FlushProcessDataCache32([[maybe_unused]] Core::System& system,
|
static ResultCode FlushProcessDataCache32([[maybe_unused]] Core::System& system,
|
||||||
|
@ -2253,7 +2253,7 @@ static ResultCode FlushProcessDataCache32([[maybe_unused]] Core::System& system,
|
||||||
// as all emulation is done in the same cache level in host architecture, thus data cache
|
// as all emulation is done in the same cache level in host architecture, thus data cache
|
||||||
// does not need flushing.
|
// does not need flushing.
|
||||||
LOG_DEBUG(Kernel_SVC, "called");
|
LOG_DEBUG(Kernel_SVC, "called");
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -144,7 +144,7 @@ constexpr bool operator!=(const ResultCode& a, const ResultCode& b) {
|
||||||
// Convenience functions for creating some common kinds of errors:
|
// Convenience functions for creating some common kinds of errors:
|
||||||
|
|
||||||
/// The default success `ResultCode`.
|
/// The default success `ResultCode`.
|
||||||
constexpr ResultCode RESULT_SUCCESS(0);
|
constexpr ResultCode ResultSuccess(0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder result code used for unknown error codes.
|
* Placeholder result code used for unknown error codes.
|
||||||
|
@ -152,7 +152,7 @@ constexpr ResultCode RESULT_SUCCESS(0);
|
||||||
* @note This should only be used when a particular error code
|
* @note This should only be used when a particular error code
|
||||||
* is not known yet.
|
* is not known yet.
|
||||||
*/
|
*/
|
||||||
constexpr ResultCode RESULT_UNKNOWN(UINT32_MAX);
|
constexpr ResultCode ResultUnknown(UINT32_MAX);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is an optional value type. It holds a `ResultCode` and, if that code is a success code,
|
* This is an optional value type. It holds a `ResultCode` and, if that code is a success code,
|
||||||
|
@ -191,7 +191,7 @@ class ResultVal {
|
||||||
public:
|
public:
|
||||||
/// Constructs an empty `ResultVal` with the given error code. The code must not be a success
|
/// Constructs an empty `ResultVal` with the given error code. The code must not be a success
|
||||||
/// code.
|
/// code.
|
||||||
ResultVal(ResultCode error_code = RESULT_UNKNOWN) : result_code(error_code) {
|
ResultVal(ResultCode error_code = ResultUnknown) : result_code(error_code) {
|
||||||
ASSERT(error_code.IsError());
|
ASSERT(error_code.IsError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ private:
|
||||||
*/
|
*/
|
||||||
template <typename T, typename... Args>
|
template <typename T, typename... Args>
|
||||||
ResultVal<T> MakeResult(Args&&... args) {
|
ResultVal<T> MakeResult(Args&&... args) {
|
||||||
return ResultVal<T>::WithCode(RESULT_SUCCESS, std::forward<Args>(args)...);
|
return ResultVal<T>::WithCode(ResultSuccess, std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -330,8 +330,7 @@ ResultVal<T> MakeResult(Args&&... args) {
|
||||||
*/
|
*/
|
||||||
template <typename Arg>
|
template <typename Arg>
|
||||||
ResultVal<std::remove_reference_t<Arg>> MakeResult(Arg&& arg) {
|
ResultVal<std::remove_reference_t<Arg>> MakeResult(Arg&& arg) {
|
||||||
return ResultVal<std::remove_reference_t<Arg>>::WithCode(RESULT_SUCCESS,
|
return ResultVal<std::remove_reference_t<Arg>>::WithCode(ResultSuccess, std::forward<Arg>(arg));
|
||||||
std::forward<Arg>(arg));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -362,7 +361,7 @@ ResultVal<std::remove_reference_t<Arg>> MakeResult(Arg&& arg) {
|
||||||
#define R_SUCCEEDED(res) (res.IsSuccess())
|
#define R_SUCCEEDED(res) (res.IsSuccess())
|
||||||
|
|
||||||
/// Evaluates a boolean expression, and succeeds if that expression is true.
|
/// Evaluates a boolean expression, and succeeds if that expression is true.
|
||||||
#define R_SUCCEED_IF(expr) R_UNLESS(!(expr), RESULT_SUCCESS)
|
#define R_SUCCEED_IF(expr) R_UNLESS(!(expr), ResultSuccess)
|
||||||
|
|
||||||
/// Evaluates a boolean expression, and returns a result unless that expression is true.
|
/// Evaluates a boolean expression, and returns a result unless that expression is true.
|
||||||
#define R_UNLESS(expr, res) \
|
#define R_UNLESS(expr, res) \
|
||||||
|
|
|
@ -298,13 +298,13 @@ protected:
|
||||||
if (profile_manager.GetProfileBaseAndData(user_id, profile_base, data)) {
|
if (profile_manager.GetProfileBaseAndData(user_id, profile_base, data)) {
|
||||||
ctx.WriteBuffer(data);
|
ctx.WriteBuffer(data);
|
||||||
IPC::ResponseBuilder rb{ctx, 16};
|
IPC::ResponseBuilder rb{ctx, 16};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(profile_base);
|
rb.PushRaw(profile_base);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_ACC, "Failed to get profile base and data for user={}",
|
LOG_ERROR(Service_ACC, "Failed to get profile base and data for user={}",
|
||||||
user_id.Format());
|
user_id.Format());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Get actual error code
|
rb.Push(ResultUnknown); // TODO(ogniK): Get actual error code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,12 +313,12 @@ protected:
|
||||||
ProfileBase profile_base{};
|
ProfileBase profile_base{};
|
||||||
if (profile_manager.GetProfileBase(user_id, profile_base)) {
|
if (profile_manager.GetProfileBase(user_id, profile_base)) {
|
||||||
IPC::ResponseBuilder rb{ctx, 16};
|
IPC::ResponseBuilder rb{ctx, 16};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(profile_base);
|
rb.PushRaw(profile_base);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_ACC, "Failed to get profile base for user={}", user_id.Format());
|
LOG_ERROR(Service_ACC, "Failed to get profile base for user={}", user_id.Format());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Get actual error code
|
rb.Push(ResultUnknown); // TODO(ogniK): Get actual error code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ protected:
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
const Common::FS::IOFile image(GetImagePath(user_id), Common::FS::FileAccessMode::Read,
|
const Common::FS::IOFile image(GetImagePath(user_id), Common::FS::FileAccessMode::Read,
|
||||||
Common::FS::FileType::BinaryFile);
|
Common::FS::FileType::BinaryFile);
|
||||||
|
@ -352,7 +352,7 @@ protected:
|
||||||
void GetImageSize(Kernel::HLERequestContext& ctx) {
|
void GetImageSize(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
const Common::FS::IOFile image(GetImagePath(user_id), Common::FS::FileAccessMode::Read,
|
const Common::FS::IOFile image(GetImagePath(user_id), Common::FS::FileAccessMode::Read,
|
||||||
Common::FS::FileType::BinaryFile);
|
Common::FS::FileType::BinaryFile);
|
||||||
|
@ -395,7 +395,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreWithImage(Kernel::HLERequestContext& ctx) {
|
void StoreWithImage(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -433,7 +433,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileManager& profile_manager;
|
ProfileManager& profile_manager;
|
||||||
|
@ -528,7 +528,7 @@ private:
|
||||||
void CheckAvailability(Kernel::HLERequestContext& ctx) {
|
void CheckAvailability(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(false); // TODO: Check when this is supposed to return true and when not
|
rb.Push(false); // TODO: Check when this is supposed to return true and when not
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ private:
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u64>(user_id.GetNintendoID());
|
rb.PushRaw<u64>(user_id.GetNintendoID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,14 +552,14 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u64>(user_id.GetNintendoID());
|
rb.PushRaw<u64>(user_id.GetNintendoID());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreOpenContext(Kernel::HLERequestContext& ctx) {
|
void StoreOpenContext(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::UUID user_id{Common::INVALID_UUID};
|
Common::UUID user_id{Common::INVALID_UUID};
|
||||||
|
@ -655,7 +655,7 @@ public:
|
||||||
void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount()));
|
rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format());
|
LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(profile_manager->UserExists(user_id));
|
rb.Push(profile_manager->UserExists(user_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,20 +673,20 @@ void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
ctx.WriteBuffer(profile_manager->GetAllUsers());
|
ctx.WriteBuffer(profile_manager->GetAllUsers());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
ctx.WriteBuffer(profile_manager->GetOpenUsers());
|
ctx.WriteBuffer(profile_manager->GetOpenUsers());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser());
|
rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,14 +696,14 @@ void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format());
|
LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IProfile>(system, user_id, *profile_manager);
|
rb.PushIpcInterface<IProfile>(system, user_id, *profile_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(profile_manager->CanSystemRegisterUser());
|
rb.Push(profile_manager->CanSystemRegisterUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,13 +761,13 @@ ResultCode Module::Interface::InitializeApplicationInfoBase() {
|
||||||
LOG_WARNING(Service_ACC, "ApplicationInfo init required");
|
LOG_WARNING(Service_ACC, "ApplicationInfo init required");
|
||||||
// TODO(ogniK): Actual initalization here
|
// TODO(ogniK): Actual initalization here
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IManagerForApplication>(system, profile_manager->GetLastOpenedUser());
|
rb.PushIpcInterface<IManagerForApplication>(system, profile_manager->GetLastOpenedUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -794,7 +794,7 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(is_locked);
|
rb.Push(is_locked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -805,7 +805,7 @@ void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called, user_id={}", user_id.Format());
|
LOG_DEBUG(Service_ACC, "called, user_id={}", user_id.Format());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IProfileEditor>(system, user_id, *profile_manager);
|
rb.PushIpcInterface<IProfileEditor>(system, user_id, *profile_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,7 +817,7 @@ void Module::Interface::ListQualifiedUsers(Kernel::HLERequestContext& ctx) {
|
||||||
// the game regardless of parental control settings.
|
// the game regardless of parental control settings.
|
||||||
ctx.WriteBuffer(profile_manager->GetAllUsers());
|
ctx.WriteBuffer(profile_manager->GetAllUsers());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::LoadOpenContext(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::LoadOpenContext(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -827,7 +827,7 @@ void Module::Interface::LoadOpenContext(Kernel::HLERequestContext& ctx) {
|
||||||
// This command is used concurrently with ListOpenContextStoredUsers
|
// This command is used concurrently with ListOpenContextStoredUsers
|
||||||
// TODO: Find the differences between this and GetBaasAccountManagerForApplication
|
// TODO: Find the differences between this and GetBaasAccountManagerForApplication
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IManagerForApplication>(system, profile_manager->GetLastOpenedUser());
|
rb.PushIpcInterface<IManagerForApplication>(system, profile_manager->GetLastOpenedUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -837,7 +837,7 @@ void Module::Interface::ListOpenContextStoredUsers(Kernel::HLERequestContext& ct
|
||||||
// TODO(ogniK): Handle open contexts
|
// TODO(ogniK): Handle open contexts
|
||||||
ctx.WriteBuffer(profile_manager->GetOpenUsers());
|
ctx.WriteBuffer(profile_manager->GetOpenUsers());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -886,7 +886,7 @@ void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(ogniK): Construct save data thumbnail
|
// TODO(ogniK): Construct save data thumbnail
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -895,7 +895,7 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex
|
||||||
// access to use the network or not by the looks of it
|
// access to use the network or not by the looks of it
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
if (profile_manager->GetUserCount() != 1) {
|
if (profile_manager->GetUserCount() != 1) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u128>(Common::INVALID_UUID);
|
rb.PushRaw<u128>(Common::INVALID_UUID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -903,13 +903,13 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex
|
||||||
const auto user_list = profile_manager->GetAllUsers();
|
const auto user_list = profile_manager->GetAllUsers();
|
||||||
if (std::all_of(user_list.begin(), user_list.end(),
|
if (std::all_of(user_list.begin(), user_list.end(),
|
||||||
[](const auto& user) { return user.uuid == Common::INVALID_UUID; })) {
|
[](const auto& user) { return user.uuid == Common::INVALID_UUID; })) {
|
||||||
rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Find the correct error code
|
rb.Push(ResultUnknown); // TODO(ogniK): Find the correct error code
|
||||||
rb.PushRaw<u128>(Common::INVALID_UUID);
|
rb.PushRaw<u128>(Common::INVALID_UUID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select the first user we have
|
// Select the first user we have
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u128>(profile_manager->GetUser(0)->uuid);
|
rb.PushRaw<u128>(profile_manager->GetUser(0)->uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ ResultCode ProfileManager::AddUser(const ProfileInfo& user) {
|
||||||
if (!AddToProfiles(user)) {
|
if (!AddToProfiles(user)) {
|
||||||
return ERROR_TOO_MANY_USERS;
|
return ERROR_TOO_MANY_USERS;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new user on the system. If the uuid of the user already exists, the user is not
|
/// Create a new user on the system. If the uuid of the user already exists, the user is not
|
||||||
|
|
|
@ -91,14 +91,14 @@ void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx)
|
||||||
LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id);
|
LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(process_id);
|
rb.Push<u64>(process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) {
|
void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
IAudioController::IAudioController(Core::System& system_)
|
IAudioController::IAudioController(Core::System& system_)
|
||||||
|
@ -132,20 +132,20 @@ void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
||||||
std::clamp(library_applet_volume_tmp, min_allowed_volume, max_allowed_volume);
|
std::clamp(library_applet_volume_tmp, min_allowed_volume, max_allowed_volume);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called. main_applet_volume={}", main_applet_volume);
|
LOG_DEBUG(Service_AM, "called. main_applet_volume={}", main_applet_volume);
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(main_applet_volume);
|
rb.Push(main_applet_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called. library_applet_volume={}", library_applet_volume);
|
LOG_DEBUG(Service_AM, "called. library_applet_volume={}", library_applet_volume);
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(library_applet_volume);
|
rb.Push(library_applet_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ void IAudioController::ChangeMainAppletMasterVolume(Kernel::HLERequestContext& c
|
||||||
fade_time_ns = std::chrono::nanoseconds{parameters.fade_time_ns};
|
fade_time_ns = std::chrono::nanoseconds{parameters.fade_time_ns};
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::SetTransparentAudioRate(Kernel::HLERequestContext& ctx) {
|
void IAudioController::SetTransparentAudioRate(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -180,7 +180,7 @@ void IAudioController::SetTransparentAudioRate(Kernel::HLERequestContext& ctx) {
|
||||||
std::clamp(transparent_volume_rate_tmp, min_allowed_volume, max_allowed_volume);
|
std::clamp(transparent_volume_rate_tmp, min_allowed_volume, max_allowed_volume);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
IDisplayController::IDisplayController(Core::System& system_)
|
IDisplayController::IDisplayController(Core::System& system_)
|
||||||
|
@ -332,7 +332,7 @@ void ISelfController::Exit(Kernel::HLERequestContext& ctx) {
|
||||||
system.Shutdown();
|
system.Shutdown();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
|
void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -341,7 +341,7 @@ void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
|
||||||
system.SetExitLock(true);
|
system.SetExitLock(true);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
|
void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -350,7 +350,7 @@ void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
|
||||||
system.SetExitLock(false);
|
system.SetExitLock(false);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) {
|
void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -358,7 +358,7 @@ void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called. Num fatal sections entered: {}", num_fatal_sections_entered);
|
LOG_DEBUG(Service_AM, "called. Num fatal sections entered: {}", num_fatal_sections_entered);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) {
|
void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -374,7 +374,7 @@ void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) {
|
||||||
--num_fatal_sections_entered;
|
--num_fatal_sections_entered;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) {
|
void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -383,7 +383,7 @@ void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext&
|
||||||
launchable_event.GetWritableEvent().Signal();
|
launchable_event.GetWritableEvent().Signal();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(launchable_event.GetReadableEvent());
|
rb.PushCopyObjects(launchable_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) {
|
||||||
screenshot_permission = permission;
|
screenshot_permission = permission;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -405,7 +405,7 @@ void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestCont
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag);
|
LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -415,7 +415,7 @@ void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestCo
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag);
|
LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -434,14 +434,14 @@ void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
|
||||||
flags.unknown0, flags.unknown1, flags.unknown2);
|
flags.unknown0, flags.unknown1, flags.unknown2);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -453,14 +453,14 @@ void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext&
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called enabled={}", enabled);
|
LOG_WARNING(Service_AM, "(STUBBED) called enabled={}", enabled);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetAlbumImageOrientation(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetAlbumImageOrientation(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) {
|
void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -472,7 +472,7 @@ void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx)
|
||||||
const auto layer_id = nvflinger.CreateLayer(*display_id);
|
const auto layer_id = nvflinger.CreateLayer(*display_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*layer_id);
|
rb.Push(*layer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestConte
|
||||||
const auto layer_id = nvflinger.CreateLayer(*display_id);
|
const auto layer_id = nvflinger.CreateLayer(*display_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*layer_id);
|
rb.Push(*layer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx)
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -508,14 +508,14 @@ void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& c
|
||||||
idle_time_detection_extension);
|
idle_time_detection_extension);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
|
void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(idle_time_detection_extension);
|
rb.Push<u32>(idle_time_detection_extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,14 +536,14 @@ void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called. is_auto_sleep_disabled={}", is_auto_sleep_disabled);
|
LOG_DEBUG(Service_AM, "called. is_auto_sleep_disabled={}", is_auto_sleep_disabled);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(is_auto_sleep_disabled);
|
rb.Push(is_auto_sleep_disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext
|
||||||
// where the game was suspended. Since Yuzu doesn't implement game suspension, this command
|
// where the game was suspended. Since Yuzu doesn't implement game suspension, this command
|
||||||
// can just always return 0 ticks.
|
// can just always return 0 ticks.
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ void ISelfController::GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequest
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(accumulated_suspended_tick_changed_event.GetReadableEvent());
|
rb.PushCopyObjects(accumulated_suspended_tick_changed_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ void ISelfController::SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestCo
|
||||||
album_image_taken_notification_enabled);
|
album_image_taken_notification_enabled);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppletMessageQueue::AppletMessageQueue(Kernel::KernelCore& kernel)
|
AppletMessageQueue::AppletMessageQueue(Kernel::KernelCore& kernel)
|
||||||
|
@ -704,7 +704,7 @@ void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode
|
rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(msg_queue->GetMessageReceiveEvent());
|
rb.PushCopyObjects(msg_queue->GetMessageReceiveEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,7 +729,7 @@ void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum<AppletMessageQueue::AppletMessage>(message);
|
rb.PushEnum<AppletMessageQueue::AppletMessage>(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u8>(FocusState::InFocus));
|
rb.Push(static_cast<u8>(FocusState::InFocus));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(vr_mode_state);
|
rb.Push(vr_mode_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "VR Mode is {}", vr_mode_state ? "on" : "off");
|
LOG_WARNING(Service_AM, "VR Mode is {}", vr_mode_state ? "on" : "off");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -767,28 +767,28 @@ void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx
|
||||||
is_lcd_backlight_off_enabled);
|
is_lcd_backlight_off_enabled);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::BeginVrModeEx(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::BeginVrModeEx(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::EndVrModeEx(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::EndVrModeEx(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(msg_queue->GetOperationModeChangedEvent());
|
rb.PushCopyObjects(msg_queue->GetOperationModeChangedEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext&
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
if (Settings::values.use_docked_mode.GetValue()) {
|
if (Settings::values.use_docked_mode.GetValue()) {
|
||||||
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) *
|
rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth) *
|
||||||
|
@ -826,7 +826,7 @@ void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnable
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
IStorageImpl::~IStorageImpl() = default;
|
IStorageImpl::~IStorageImpl() = default;
|
||||||
|
@ -875,7 +875,7 @@ void IStorage::Open(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorageAccessor>(system, *this);
|
rb.PushIpcInterface<IStorageAccessor>(system, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -884,7 +884,7 @@ void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode);
|
LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld));
|
rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -892,7 +892,7 @@ void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(system.GetAPMController().GetCurrentPerformanceMode());
|
rb.PushEnum(system.GetAPMController().GetCurrentPerformanceMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -932,7 +932,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent());
|
rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,7 +940,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(applet->TransactionComplete());
|
rb.Push<u32>(applet->TransactionComplete());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -955,7 +955,7 @@ private:
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(Kernel::HLERequestContext& ctx) {
|
void Start(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -967,7 +967,7 @@ private:
|
||||||
applet->Execute();
|
applet->Execute();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PushInData(Kernel::HLERequestContext& ctx) {
|
void PushInData(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -977,7 +977,7 @@ private:
|
||||||
applet->GetBroker().PushNormalDataFromGame(rp.PopIpcInterface<IStorage>());
|
applet->GetBroker().PushNormalDataFromGame(rp.PopIpcInterface<IStorage>());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopOutData(Kernel::HLERequestContext& ctx) {
|
void PopOutData(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -993,7 +993,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1008,7 +1008,7 @@ private:
|
||||||
applet->Execute();
|
applet->Execute();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopInteractiveOutData(Kernel::HLERequestContext& ctx) {
|
void PopInteractiveOutData(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1024,7 +1024,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1032,7 +1032,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent());
|
rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,7 +1040,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent());
|
rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ private:
|
||||||
constexpr u64 handle = 0xdeadbeef;
|
constexpr u64 handle = 0xdeadbeef;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(handle);
|
rb.Push(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1079,7 +1079,7 @@ void IStorageAccessor::GetSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u64>(backing.GetSize()));
|
rb.Push(static_cast<u64>(backing.GetSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1105,7 +1105,7 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
|
||||||
std::memcpy(backing.GetData().data() + offset, data.data(), size);
|
std::memcpy(backing.GetData().data() + offset, data.data(), size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
|
void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1128,7 +1128,7 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(backing.GetData().data() + offset, size);
|
ctx.WriteBuffer(backing.GetData().data() + offset, size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_)
|
ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_)
|
||||||
|
@ -1162,13 +1162,13 @@ void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx)
|
||||||
LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", applet_id);
|
LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", applet_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet);
|
rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1182,14 +1182,14 @@ void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) {
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
LOG_ERROR(Service_AM, "size is less than or equal to 0");
|
LOG_ERROR(Service_AM, "size is less than or equal to 0");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<u8> buffer(size);
|
std::vector<u8> buffer(size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(system, std::move(buffer));
|
rb.PushIpcInterface<IStorage>(system, std::move(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1210,7 +1210,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex
|
||||||
if (parameters.size <= 0) {
|
if (parameters.size <= 0) {
|
||||||
LOG_ERROR(Service_AM, "size is less than or equal to 0");
|
LOG_ERROR(Service_AM, "size is less than or equal to 0");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1220,7 +1220,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex
|
||||||
if (transfer_mem.IsNull()) {
|
if (transfer_mem.IsNull()) {
|
||||||
LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle);
|
LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1229,7 +1229,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex
|
||||||
std::vector<u8> memory{mem_begin, mem_end};
|
std::vector<u8> memory{mem_begin, mem_end};
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(system, std::move(memory));
|
rb.PushIpcInterface<IStorage>(system, std::move(memory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1244,7 +1244,7 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx)
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
LOG_ERROR(Service_AM, "size is less than or equal to 0");
|
LOG_ERROR(Service_AM, "size is less than or equal to 0");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1254,7 +1254,7 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx)
|
||||||
if (transfer_mem.IsNull()) {
|
if (transfer_mem.IsNull()) {
|
||||||
LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle);
|
LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1263,7 +1263,7 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx)
|
||||||
std::vector<u8> memory{mem_begin, mem_end};
|
std::vector<u8> memory{mem_begin, mem_end};
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(system, std::move(memory));
|
rb.PushIpcInterface<IStorage>(system, std::move(memory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@ void IApplicationFunctions::EnableApplicationCrashReport(Kernel::HLERequestConte
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer(
|
void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer(
|
||||||
|
@ -1363,14 +1363,14 @@ void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer(
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetApplicationCopyrightImage(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetApplicationCopyrightImage(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1380,7 +1380,7 @@ void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequest
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called, is_visible={}", is_visible);
|
LOG_WARNING(Service_AM, "(STUBBED) called, is_visible={}", is_visible);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(
|
void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(
|
||||||
|
@ -1388,7 +1388,7 @@ void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(
|
void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(
|
||||||
|
@ -1396,21 +1396,21 @@ void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::BeginBlockingHomeButton(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::BeginBlockingHomeButton(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1430,7 +1430,7 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
||||||
auto data = backend->GetLaunchParameter({system.CurrentProcess()->GetTitleID(), build_id});
|
auto data = backend->GetLaunchParameter({system.CurrentProcess()->GetTitleID(), build_id});
|
||||||
if (data.has_value()) {
|
if (data.has_value()) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(system, std::move(*data));
|
rb.PushIpcInterface<IStorage>(system, std::move(*data));
|
||||||
launch_popped_application_specific = true;
|
launch_popped_application_specific = true;
|
||||||
return;
|
return;
|
||||||
|
@ -1449,7 +1449,7 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
std::vector<u8> buffer(sizeof(LaunchParameterAccountPreselectedUser));
|
std::vector<u8> buffer(sizeof(LaunchParameterAccountPreselectedUser));
|
||||||
std::memcpy(buffer.data(), ¶ms, buffer.size());
|
std::memcpy(buffer.data(), ¶ms, buffer.size());
|
||||||
|
@ -1469,7 +1469,7 @@ void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest(
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1500,7 +1500,7 @@ void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called, result=0x{:08X}", result);
|
LOG_WARNING(Service_AM, "(STUBBED) called, result=0x{:08X}", result);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1533,7 +1533,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(version_string);
|
rb.PushRaw(version_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1589,7 +1589,7 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "got desired_language={:016X}", *res_code);
|
LOG_DEBUG(Service_AM, "got desired_language={:016X}", *res_code);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*res_code);
|
rb.Push(*res_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1599,7 +1599,7 @@ void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestConte
|
||||||
constexpr bool gameplay_recording_supported = false;
|
constexpr bool gameplay_recording_supported = false;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(gameplay_recording_supported);
|
rb.Push(gameplay_recording_supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1607,21 +1607,21 @@ void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContex
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetGamePlayRecordingState(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetGamePlayRecordingState(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u8>(0); // Unknown, seems to be ignored by official processes
|
rb.Push<u8>(0); // Unknown, seems to be ignored by official processes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1629,7 +1629,7 @@ void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
// Returns a 128-bit UUID
|
// Returns a 128-bit UUID
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
|
@ -1657,7 +1657,7 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
type, system.CurrentProcess()->GetTitleID(), user_id, {new_normal_size, new_journal_size});
|
type, system.CurrentProcess()->GetTitleID(), user_id, {new_normal_size, new_journal_size});
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
// The following value is used upon failure to help the system recover.
|
// The following value is used upon failure to help the system recover.
|
||||||
// Since we always succeed, this should be 0.
|
// Since we always succeed, this should be 0.
|
||||||
|
@ -1681,7 +1681,7 @@ void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) {
|
||||||
type, system.CurrentProcess()->GetTitleID(), user_id);
|
type, system.CurrentProcess()->GetTitleID(), user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(size.normal);
|
rb.Push(size.normal);
|
||||||
rb.Push(size.journal);
|
rb.Push(size.journal);
|
||||||
}
|
}
|
||||||
|
@ -1690,7 +1690,7 @@ void IApplicationFunctions::QueryApplicationPlayStatistics(Kernel::HLERequestCon
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1698,7 +1698,7 @@ void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(Kernel::HLEReque
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1711,7 +1711,7 @@ void IApplicationFunctions::ExecuteProgram(Kernel::HLERequestContext& ctx) {
|
||||||
const auto program_index = rp.Pop<u64>();
|
const auto program_index = rp.Pop<u64>();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
system.ExecuteProgram(program_index);
|
system.ExecuteProgram(program_index);
|
||||||
}
|
}
|
||||||
|
@ -1720,21 +1720,21 @@ void IApplicationFunctions::ClearUserChannel(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::UnpopToUserChannel(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::UnpopToUserChannel(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetPreviousProgramIndex(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetPreviousProgramIndex(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(previous_program_index);
|
rb.Push<s32>(previous_program_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1742,7 +1742,7 @@ void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(Kernel::HLERequestCon
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(gpu_error_detected_event.GetReadableEvent());
|
rb.PushCopyObjects(gpu_error_detected_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1750,7 +1750,7 @@ void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(Kernel::HLERe
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(friend_invitation_storage_channel_event.GetReadableEvent());
|
rb.PushCopyObjects(friend_invitation_storage_channel_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1766,7 +1766,7 @@ void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERe
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(health_warning_disappeared_system_event.GetReadableEvent());
|
rb.PushCopyObjects(health_warning_disappeared_system_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1817,14 +1817,14 @@ void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx)
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) {
|
void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(pop_from_general_channel_event.GetReadableEvent());
|
rb.PushCopyObjects(pop_from_general_channel_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IWindowController>(system);
|
rb.PushIpcInterface<IWindowController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAudioController>(system);
|
rb.PushIpcInterface<IAudioController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDisplayController>(system);
|
rb.PushIpcInterface<IDisplayController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IProcessWindingController>(system);
|
rb.PushIpcInterface<IProcessWindingController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDebugFunctions>(system);
|
rb.PushIpcInterface<IDebugFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IApplicationFunctions>(system);
|
rb.PushIpcInterface<IApplicationFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IWindowController>(system);
|
rb.PushIpcInterface<IWindowController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAudioController>(system);
|
rb.PushIpcInterface<IAudioController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDisplayController>(system);
|
rb.PushIpcInterface<IDisplayController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDebugFunctions>(system);
|
rb.PushIpcInterface<IDebugFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IHomeMenuFunctions>(system);
|
rb.PushIpcInterface<IHomeMenuFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IGlobalStateController>(system);
|
rb.PushIpcInterface<IGlobalStateController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IApplicationCreator>(system);
|
rb.PushIpcInterface<IApplicationCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ void AppletAE::OpenSystemAppletProxy(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISystemAppletProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<ISystemAppletProxy>(nvflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ void AppletAE::OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ void AppletAE::OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAudioController>(system);
|
rb.PushIpcInterface<IAudioController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDisplayController>(system);
|
rb.PushIpcInterface<IDisplayController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDebugFunctions>(system);
|
rb.PushIpcInterface<IDebugFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IWindowController>(system);
|
rb.PushIpcInterface<IWindowController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ private:
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IApplicationFunctions>(system);
|
rb.PushIpcInterface<IApplicationFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IApplicationProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<IApplicationProxy>(nvflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ private:
|
||||||
ControllerSupportArgNew controller_user_arg_new;
|
ControllerSupportArgNew controller_user_arg_new;
|
||||||
ControllerUpdateFirmwareArg controller_update_arg;
|
ControllerUpdateFirmwareArg controller_update_arg;
|
||||||
bool complete{false};
|
bool complete{false};
|
||||||
ResultCode status{RESULT_SUCCESS};
|
ResultCode status{ResultSuccess};
|
||||||
bool is_single_mode{false};
|
bool is_single_mode{false};
|
||||||
std::vector<u8> out_data;
|
std::vector<u8> out_data;
|
||||||
};
|
};
|
||||||
|
|
|
@ -135,7 +135,7 @@ bool Error::TransactionComplete() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode Error::GetStatus() const {
|
ResultCode Error::GetStatus() const {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Error::ExecuteInteractive() {
|
void Error::ExecuteInteractive() {
|
||||||
|
|
|
@ -42,7 +42,7 @@ private:
|
||||||
union ErrorArguments;
|
union ErrorArguments;
|
||||||
|
|
||||||
const Core::Frontend::ErrorApplet& frontend;
|
const Core::Frontend::ErrorApplet& frontend;
|
||||||
ResultCode error_code = RESULT_SUCCESS;
|
ResultCode error_code = ResultSuccess;
|
||||||
ErrorAppletMode mode = ErrorAppletMode::ShowError;
|
ErrorAppletMode mode = ErrorAppletMode::ShowError;
|
||||||
std::unique_ptr<ErrorArguments> args;
|
std::unique_ptr<ErrorArguments> args;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ bool Auth::TransactionComplete() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode Auth::GetStatus() const {
|
ResultCode Auth::GetStatus() const {
|
||||||
return successful ? RESULT_SUCCESS : ERROR_INVALID_PIN;
|
return successful ? ResultSuccess : ERROR_INVALID_PIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Auth::ExecuteInteractive() {
|
void Auth::ExecuteInteractive() {
|
||||||
|
@ -175,7 +175,7 @@ bool PhotoViewer::TransactionComplete() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode PhotoViewer::GetStatus() const {
|
ResultCode PhotoViewer::GetStatus() const {
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoViewer::ExecuteInteractive() {
|
void PhotoViewer::ExecuteInteractive() {
|
||||||
|
@ -229,7 +229,7 @@ bool StubApplet::TransactionComplete() const {
|
||||||
|
|
||||||
ResultCode StubApplet::GetStatus() const {
|
ResultCode StubApplet::GetStatus() const {
|
||||||
LOG_WARNING(Service_AM, "called (STUBBED)");
|
LOG_WARNING(Service_AM, "called (STUBBED)");
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StubApplet::ExecuteInteractive() {
|
void StubApplet::ExecuteInteractive() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ ProfileSelect::~ProfileSelect() = default;
|
||||||
|
|
||||||
void ProfileSelect::Initialize() {
|
void ProfileSelect::Initialize() {
|
||||||
complete = false;
|
complete = false;
|
||||||
status = RESULT_SUCCESS;
|
status = ResultSuccess;
|
||||||
final_data.clear();
|
final_data.clear();
|
||||||
|
|
||||||
Applet::Initialize();
|
Applet::Initialize();
|
||||||
|
|
|
@ -51,7 +51,7 @@ private:
|
||||||
|
|
||||||
UserSelectionConfig config;
|
UserSelectionConfig config;
|
||||||
bool complete = false;
|
bool complete = false;
|
||||||
ResultCode status = RESULT_SUCCESS;
|
ResultCode status = ResultSuccess;
|
||||||
std::vector<u8> final_data;
|
std::vector<u8> final_data;
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -658,7 +658,7 @@ void SoftwareKeyboard::InlineTextChanged() {
|
||||||
|
|
||||||
void SoftwareKeyboard::ExitKeyboard() {
|
void SoftwareKeyboard::ExitKeyboard() {
|
||||||
complete = true;
|
complete = true;
|
||||||
status = RESULT_SUCCESS;
|
status = ResultSuccess;
|
||||||
|
|
||||||
frontend.ExitKeyboard();
|
frontend.ExitKeyboard();
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ private:
|
||||||
bool is_background{false};
|
bool is_background{false};
|
||||||
|
|
||||||
bool complete{false};
|
bool complete{false};
|
||||||
ResultCode status{RESULT_SUCCESS};
|
ResultCode status{ResultSuccess};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::AM::Applets
|
} // namespace Service::AM::Applets
|
||||||
|
|
|
@ -68,7 +68,7 @@ private:
|
||||||
const Core::Frontend::WebBrowserApplet& frontend;
|
const Core::Frontend::WebBrowserApplet& frontend;
|
||||||
|
|
||||||
bool complete{false};
|
bool complete{false};
|
||||||
ResultCode status{RESULT_SUCCESS};
|
ResultCode status{ResultSuccess};
|
||||||
|
|
||||||
WebAppletVersion web_applet_version{};
|
WebAppletVersion web_applet_version{};
|
||||||
WebArgHeader web_arg_header{};
|
WebArgHeader web_arg_header{};
|
||||||
|
|
|
@ -76,7 +76,7 @@ private:
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called, unknown_1={}", unknown_1);
|
LOG_WARNING(Service_AOC, "(STUBBED) called, unknown_1={}", unknown_1);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDeliveryTarget(Kernel::HLERequestContext& ctx) {
|
void SetDeliveryTarget(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -88,14 +88,14 @@ private:
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called, unknown_1={}", unknown_1);
|
LOG_WARNING(Service_AOC, "(STUBBED) called, unknown_1={}", unknown_1);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPurchasedEventReadableHandle(Kernel::HLERequestContext& ctx) {
|
void GetPurchasedEventReadableHandle(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "called");
|
LOG_WARNING(Service_AOC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(purchased_event.GetReadableEvent());
|
rb.PushCopyObjects(purchased_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AOC, "called. process_id={}", params.process_id);
|
LOG_DEBUG(Service_AOC, "called. process_id={}", params.process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
const auto current = system.CurrentProcess()->GetTitleID();
|
const auto current = system.CurrentProcess()->GetTitleID();
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
if (out.size() < offset) {
|
if (out.size() < offset) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
// TODO(DarkLordZach): Find the correct error code.
|
// TODO(DarkLordZach): Find the correct error code.
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(out);
|
ctx.WriteBuffer(out);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(out_count);
|
rb.Push(out_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AOC, "called. process_id={}", params.process_id);
|
LOG_DEBUG(Service_AOC, "called. process_id={}", params.process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
const auto title_id = system.CurrentProcess()->GetTitleID();
|
const auto title_id = system.CurrentProcess()->GetTitleID();
|
||||||
const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
|
const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
|
||||||
|
@ -246,14 +246,14 @@ void AOC_U::PrepareAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
process_id);
|
process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(aoc_change_event.GetReadableEvent());
|
rb.PushCopyObjects(aoc_change_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IPurchaseEventManager>(system);
|
rb.PushIpcInterface<IPurchaseEventManager>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ void AOC_U::CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ct
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IPurchaseEventManager>(system);
|
rb.PushIpcInterface<IPurchaseEventManager>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ private:
|
||||||
controller.SetPerformanceConfiguration(mode, config);
|
controller.SetPerformanceConfiguration(mode, config);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
void GetPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -43,7 +43,7 @@ private:
|
||||||
LOG_DEBUG(Service_APM, "called mode={}", mode);
|
LOG_DEBUG(Service_APM, "called mode={}", mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode));
|
rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void APM::OpenSession(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISession>(system, controller);
|
rb.PushIpcInterface<ISession>(system, controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ void APM::IsCpuOverclockEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_APM, "(STUBBED) called");
|
LOG_WARNING(Service_APM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(false);
|
rb.Push(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISession>(system, controller);
|
rb.PushIpcInterface<ISession>(system, controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,14 +123,14 @@ void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
controller.SetFromCpuBoostMode(mode);
|
controller.SetFromCpuBoostMode(mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(
|
rb.PushEnum(
|
||||||
controller.GetCurrentPerformanceConfiguration(controller.GetCurrentPerformanceMode()));
|
controller.GetCurrentPerformanceConfiguration(controller.GetCurrentPerformanceMode()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) {
|
||||||
constexpr s32 target_min_volume = 0;
|
constexpr s32 target_min_volume = 0;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(target_min_volume);
|
rb.Push(target_min_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) {
|
||||||
constexpr s32 target_max_volume = 15;
|
constexpr s32 target_max_volume = 15;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(target_max_volume);
|
rb.Push(target_max_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(device_names);
|
ctx.WriteBuffer(device_names);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(device_names.size()));
|
rb.Push(static_cast<u32>(device_names.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) {
|
||||||
// device listing just omits the default input device
|
// device listing just omits the default input device
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(device_count));
|
rb.Push(static_cast<u32>(device_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void AudInU::OpenInOutImpl(Kernel::HLERequestContext& ctx) {
|
||||||
params.state = State::Started;
|
params.state = State::Started;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<AudInOutParams>(params);
|
rb.PushRaw<AudInOutParams>(params);
|
||||||
rb.PushIpcInterface<IAudioIn>(system);
|
rb.PushIpcInterface<IAudioIn>(system);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(stream->IsPlaying() ? AudioState::Started : AudioState::Stopped));
|
rb.Push(static_cast<u32>(stream->IsPlaying() ? AudioState::Started : AudioState::Stopped));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ private:
|
||||||
audio_core.StartStream(stream);
|
audio_core.StartStream(stream);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopAudioOut(Kernel::HLERequestContext& ctx) {
|
void StopAudioOut(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -118,14 +118,14 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
|
void RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetReleasedAudioOutBufferImpl(Kernel::HLERequestContext& ctx) {
|
void GetReleasedAudioOutBufferImpl(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -164,7 +164,7 @@ private:
|
||||||
ctx.WriteBuffer(tags);
|
ctx.WriteBuffer(tags);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(released_buffers.size()));
|
rb.Push<u32>(static_cast<u32>(released_buffers.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ private:
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 tag{rp.Pop<u64>()};
|
const u64 tag{rp.Pop<u64>()};
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(stream->ContainsBuffer(tag));
|
rb.Push(stream->ContainsBuffer(tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(stream->GetQueueSize()));
|
rb.Push(static_cast<u32>(stream->GetQueueSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(stream->Flush());
|
rb.Push(stream->Flush());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,14 +202,14 @@ private:
|
||||||
stream->SetVolume(volume);
|
stream->SetVolume(volume);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioOutVolume(Kernel::HLERequestContext& ctx) {
|
void GetAudioOutVolume(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(stream->GetVolume());
|
rb.Push(stream->GetVolume());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ void AudOutU::ListAudioOutsImpl(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(DefaultDevice);
|
ctx.WriteBuffer(DefaultDevice);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(1); // Amount of audio devices
|
rb.Push<u32>(1); // Amount of audio devices
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ void AudOutU::OpenAudioOutImpl(Kernel::HLERequestContext& ctx) {
|
||||||
system, params, *audio_core, std::move(device_name), std::move(unique_name));
|
system, params, *audio_core, std::move(device_name), std::move(unique_name));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(DefaultSampleRate);
|
rb.Push<u32>(DefaultSampleRate);
|
||||||
rb.Push<u32>(params.channel_count);
|
rb.Push<u32>(params.channel_count);
|
||||||
rb.Push<u32>(static_cast<u32>(AudioCore::Codec::PcmFormat::Int16));
|
rb.Push<u32>(static_cast<u32>(AudioCore::Codec::PcmFormat::Int16));
|
||||||
|
|
|
@ -65,7 +65,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(renderer->GetSampleRate());
|
rb.Push<u32>(renderer->GetSampleRate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(renderer->GetSampleCount());
|
rb.Push<u32>(renderer->GetSampleCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(renderer->GetStreamState()));
|
rb.Push<u32>(static_cast<u32>(renderer->GetStreamState()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(renderer->GetMixBufferCount());
|
rb.Push<u32>(renderer->GetMixBufferCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ private:
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop(Kernel::HLERequestContext& ctx) {
|
void Stop(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -120,14 +120,14 @@ private:
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuerySystemEvent(Kernel::HLERequestContext& ctx) {
|
void QuerySystemEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(system_event.GetReadableEvent());
|
rb.PushCopyObjects(system_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,14 +140,14 @@ private:
|
||||||
ASSERT(rendering_time_limit_percent <= 100);
|
ASSERT(rendering_time_limit_percent <= 100);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) {
|
void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(rendering_time_limit_percent);
|
rb.Push(rendering_time_limit_percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ private:
|
||||||
ctx.WriteBuffer(name_buffer);
|
ctx.WriteBuffer(name_buffer);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(name_buffer.size()));
|
rb.Push(static_cast<u32>(name_buffer.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ private:
|
||||||
LOG_WARNING(Service_Audio, "(STUBBED) called. name={}, volume={}", name, volume);
|
LOG_WARNING(Service_Audio, "(STUBBED) called. name={}, volume={}", name, volume);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) {
|
void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -254,7 +254,7 @@ private:
|
||||||
LOG_WARNING(Service_Audio, "(STUBBED) called. name={}", name);
|
LOG_WARNING(Service_Audio, "(STUBBED) called. name={}", name);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(1.0f);
|
rb.Push(1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ private:
|
||||||
ctx.WriteBuffer(out_device_name);
|
ctx.WriteBuffer(out_device_name);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) {
|
void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -279,7 +279,7 @@ private:
|
||||||
buffer_event.GetWritableEvent().Signal();
|
buffer_event.GetWritableEvent().Signal();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ private:
|
||||||
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(1);
|
rb.Push<u32>(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ private:
|
||||||
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ private:
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
rb.PushCopyObjects(buffer_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
||||||
size = Common::AlignUp(size, 4096);
|
size = Common::AlignUp(size, 4096);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(size);
|
rb.Push<u64>(size);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "buffer_size=0x{:X}", size);
|
LOG_DEBUG(Service_Audio, "buffer_size=0x{:X}", size);
|
||||||
|
@ -651,7 +651,7 @@ void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) {
|
||||||
// Revisionless variant of GetAudioDeviceServiceWithRevisionInfo that
|
// Revisionless variant of GetAudioDeviceServiceWithRevisionInfo that
|
||||||
// always assumes the initial release revision (REV1).
|
// always assumes the initial release revision (REV1).
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAudioDevice>(system, buffer_event, Common::MakeMagic('R', 'E', 'V', '1'));
|
rb.PushIpcInterface<IAudioDevice>(system, buffer_event, Common::MakeMagic('R', 'E', 'V', '1'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ void AudRenU::GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& c
|
||||||
LOG_DEBUG(Service_Audio, "called. revision={:08X}, aruid={:016X}", revision, aruid);
|
LOG_DEBUG(Service_Audio, "called. revision={:08X}, aruid={:016X}", revision, aruid);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAudioDevice>(system, buffer_event, revision);
|
rb.PushIpcInterface<IAudioDevice>(system, buffer_event, revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ void AudRenU::OpenAudioRendererImpl(Kernel::HLERequestContext& ctx) {
|
||||||
const auto params = rp.PopRaw<AudioCommon::AudioRendererParameter>();
|
const auto params = rp.PopRaw<AudioCommon::AudioRendererParameter>();
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAudioRenderer>(system, params, audren_instance_count++);
|
rb.PushIpcInterface<IAudioRenderer>(system, params, audren_instance_count++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,13 +80,13 @@ private:
|
||||||
LOG_ERROR(Audio, "Failed to decode opus data");
|
LOG_ERROR(Audio, "Failed to decode opus data");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
// TODO(ogniK): Use correct error code
|
// TODO(ogniK): Use correct error code
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 param_size = performance != nullptr ? 6 : 4;
|
const u32 param_size = performance != nullptr ? 6 : 4;
|
||||||
IPC::ResponseBuilder rb{ctx, param_size};
|
IPC::ResponseBuilder rb{ctx, param_size};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(consumed);
|
rb.Push<u32>(consumed);
|
||||||
rb.Push<u32>(sample_count);
|
rb.Push<u32>(sample_count);
|
||||||
if (performance) {
|
if (performance) {
|
||||||
|
@ -249,7 +249,7 @@ void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Audio, "worker_buffer_sz={}", worker_buffer_sz);
|
LOG_DEBUG(Audio, "worker_buffer_sz={}", worker_buffer_sz);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(worker_buffer_sz);
|
rb.Push<u32>(worker_buffer_sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,12 +281,12 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_ERROR(Audio, "Failed to create Opus decoder (error={}).", error);
|
LOG_ERROR(Audio, "Failed to create Opus decoder (error={}).", error);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
// TODO(ogniK): Use correct error code
|
// TODO(ogniK): Use correct error code
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IHardwareOpusDecoderManager>(
|
rb.PushIpcInterface<IHardwareOpusDecoderManager>(
|
||||||
system, OpusDecoderState{std::move(decoder), sample_rate, channel_count});
|
system, OpusDecoderState{std::move(decoder), sample_rate, channel_count});
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ bool NullBackend::Synchronize(TitleIDVersion title, ProgressServiceBackend& prog
|
||||||
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}", title.title_id,
|
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}", title.title_id,
|
||||||
title.build_id);
|
title.build_id);
|
||||||
|
|
||||||
progress.FinishDownload(RESULT_SUCCESS);
|
progress.FinishDownload(ResultSuccess);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ bool NullBackend::SynchronizeDirectory(TitleIDVersion title, std::string name,
|
||||||
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}, name={}", title.title_id,
|
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}, name={}", title.title_id,
|
||||||
title.build_id, name);
|
title.build_id, name);
|
||||||
|
|
||||||
progress.FinishDownload(RESULT_SUCCESS);
|
progress.FinishDownload(ResultSuccess);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ struct DeliveryCacheProgressImpl {
|
||||||
};
|
};
|
||||||
|
|
||||||
Status status;
|
Status status;
|
||||||
ResultCode result = RESULT_SUCCESS;
|
ResultCode result = ResultSuccess;
|
||||||
DirectoryName current_directory;
|
DirectoryName current_directory;
|
||||||
FileName current_file;
|
FileName current_file;
|
||||||
s64 current_downloaded_bytes; ///< Bytes downloaded on current file.
|
s64 current_downloaded_bytes; ///< Bytes downloaded on current file.
|
||||||
|
|
|
@ -121,7 +121,7 @@ void HandleDownloadDisplayResult(const AM::Applets::AppletManager& applet_manage
|
||||||
|
|
||||||
const auto& frontend{applet_manager.GetAppletFrontendSet()};
|
const auto& frontend{applet_manager.GetAppletFrontendSet()};
|
||||||
frontend.error->ShowCustomErrorText(
|
frontend.error->ShowCustomErrorText(
|
||||||
RESULT_UNKNOWN, "There was an error while attempting to use Boxcat.",
|
ResultUnknown, "There was an error while attempting to use Boxcat.",
|
||||||
DOWNLOAD_RESULT_LOG_MESSAGES[static_cast<std::size_t>(res)], [] {});
|
DOWNLOAD_RESULT_LOG_MESSAGES[static_cast<std::size_t>(res)], [] {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ void SynchronizeInternal(AM::Applets::AppletManager& applet_manager, DirectoryGe
|
||||||
const auto dir = dir_getter(title.title_id);
|
const auto dir = dir_getter(title.title_id);
|
||||||
if (dir)
|
if (dir)
|
||||||
progress.SetTotalSize(dir->GetSize());
|
progress.SetTotalSize(dir->GetSize());
|
||||||
progress.FinishDownload(RESULT_SUCCESS);
|
progress.FinishDownload(ResultSuccess);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ void SynchronizeInternal(AM::Applets::AppletManager& applet_manager, DirectoryGe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
progress.FinishDownload(RESULT_SUCCESS);
|
progress.FinishDownload(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Boxcat::Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) {
|
bool Boxcat::Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) {
|
||||||
|
|
|
@ -106,7 +106,7 @@ private:
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(event);
|
rb.PushCopyObjects(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ private:
|
||||||
ctx.WriteBuffer(impl);
|
ctx.WriteBuffer(impl);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
Kernel::KReadableEvent& event;
|
Kernel::KReadableEvent& event;
|
||||||
|
@ -185,7 +185,7 @@ private:
|
||||||
GetProgressBackend(SyncType::Normal));
|
GetProgressBackend(SyncType::Normal));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface(CreateProgressService(SyncType::Normal));
|
rb.PushIpcInterface(CreateProgressService(SyncType::Normal));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ private:
|
||||||
name, GetProgressBackend(SyncType::Directory));
|
name, GetProgressBackend(SyncType::Directory));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface(CreateProgressService(SyncType::Directory));
|
rb.PushIpcInterface(CreateProgressService(SyncType::Directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ private:
|
||||||
backend.SetPassphrase(title_id, passphrase);
|
backend.SetPassphrase(title_id, passphrase);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearDeliveryCacheStorage(Kernel::HLERequestContext& ctx) {
|
void ClearDeliveryCacheStorage(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -259,7 +259,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressServiceBackend& GetProgressBackend(SyncType type) {
|
ProgressServiceBackend& GetProgressBackend(SyncType type) {
|
||||||
|
@ -278,7 +278,7 @@ void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IBcatService>(system, *backend);
|
rb.PushIpcInterface<IBcatService>(system, *backend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -362,7 +362,7 @@ private:
|
||||||
ctx.WriteBuffer(buffer);
|
ctx.WriteBuffer(buffer);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(buffer.size());
|
rb.Push<u64>(buffer.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(current_file->GetSize());
|
rb.Push<u64>(current_file->GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(DigestFile(current_file));
|
rb.PushRaw(DigestFile(current_file));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -472,7 +472,7 @@ private:
|
||||||
ctx.WriteBuffer(entries);
|
ctx.WriteBuffer(entries);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry)));
|
rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ private:
|
||||||
const auto files = current_dir->GetFiles();
|
const auto files = current_dir->GetFiles();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(files.size()));
|
rb.Push(static_cast<u32>(files.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ private:
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDeliveryCacheFileService>(system, root);
|
rb.PushIpcInterface<IDeliveryCacheFileService>(system, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ private:
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDeliveryCacheDirectoryService>(system, root);
|
rb.PushIpcInterface<IDeliveryCacheDirectoryService>(system, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ private:
|
||||||
next_read_index += size;
|
next_read_index += size;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(size));
|
rb.Push(static_cast<u32>(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestCont
|
||||||
|
|
||||||
const auto title_id = system.CurrentProcess()->GetTitleID();
|
const auto title_id = system.CurrentProcess()->GetTitleID();
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
|
rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId(
|
||||||
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}", title_id);
|
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}", title_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
|
rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ private:
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(register_event.GetReadableEvent());
|
rb.PushCopyObjects(register_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ private:
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(scan_event.GetReadableEvent());
|
rb.PushCopyObjects(scan_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ private:
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(connection_event.GetReadableEvent());
|
rb.PushCopyObjects(connection_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(service_discovery.GetReadableEvent());
|
rb.PushCopyObjects(service_discovery.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ private:
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(config_event.GetReadableEvent());
|
rb.PushCopyObjects(config_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ private:
|
||||||
LOG_DEBUG(Service_BTM, "called");
|
LOG_DEBUG(Service_BTM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IBtmUserCore>(system);
|
rb.PushIpcInterface<IBtmUserCore>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -273,7 +273,7 @@ private:
|
||||||
LOG_DEBUG(Service_BTM, "called");
|
LOG_DEBUG(Service_BTM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IBtmSystemCore>(system);
|
rb.PushIpcInterface<IBtmSystemCore>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,7 +84,7 @@ void CAPS_C::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
||||||
library_version, applet_resource_user_id);
|
library_version, applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::Capture
|
} // namespace Service::Capture
|
||||||
|
|
|
@ -33,7 +33,7 @@ void CAPS_SU::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
||||||
library_version, applet_resource_user_id);
|
library_version, applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::Capture
|
} // namespace Service::Capture
|
||||||
|
|
|
@ -62,7 +62,7 @@ void CAPS_U::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
||||||
library_version, applet_resource_user_id);
|
library_version, applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx) {
|
void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -89,7 +89,7 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c
|
||||||
total_entries_1, total_entries_2);
|
total_entries_1, total_entries_2);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(total_entries_1);
|
rb.Push(total_entries_1);
|
||||||
rb.Push(total_entries_2);
|
rb.Push(total_entries_2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTitleKey(Kernel::HLERequestContext& ctx) {
|
void GetTitleKey(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -163,7 +163,7 @@ private:
|
||||||
ctx.WriteBuffer(key);
|
ctx.WriteBuffer(key);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CountCommonTicket(Kernel::HLERequestContext& ctx) {
|
void CountCommonTicket(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -172,7 +172,7 @@ private:
|
||||||
const u32 count = static_cast<u32>(keys.GetCommonTickets().size());
|
const u32 count = static_cast<u32>(keys.GetCommonTickets().size());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(count);
|
rb.Push<u32>(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ private:
|
||||||
const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size());
|
const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(count);
|
rb.Push<u32>(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ private:
|
||||||
ctx.WriteBuffer(ids.data(), out_entries * sizeof(u128));
|
ctx.WriteBuffer(ids.data(), out_entries * sizeof(u128));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(out_entries);
|
rb.Push<u32>(out_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ private:
|
||||||
ctx.WriteBuffer(ids.data(), out_entries * sizeof(u128));
|
ctx.WriteBuffer(ids.data(), out_entries * sizeof(u128));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(out_entries);
|
rb.Push<u32>(out_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ private:
|
||||||
const auto ticket = keys.GetCommonTickets().at(rights_id);
|
const auto ticket = keys.GetCommonTickets().at(rights_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(ticket.GetSize());
|
rb.Push<u64>(ticket.GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ private:
|
||||||
const auto ticket = keys.GetPersonalizedTickets().at(rights_id);
|
const auto ticket = keys.GetPersonalizedTickets().at(rights_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(ticket.GetSize());
|
rb.Push<u64>(ticket.GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ private:
|
||||||
ctx.WriteBuffer(&ticket, write_size);
|
ctx.WriteBuffer(&ticket, write_size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(write_size);
|
rb.Push<u64>(write_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ private:
|
||||||
ctx.WriteBuffer(&ticket, write_size);
|
ctx.WriteBuffer(&ticket, write_size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(write_size);
|
rb.Push<u64>(write_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
ThrowFatalError(system, error_code, FatalType::ErrorScreen, {});
|
ThrowFatalError(system, error_code, FatalType::ErrorScreen, {});
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -147,7 +147,7 @@ void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
||||||
ThrowFatalError(system, error_code, fatal_type,
|
ThrowFatalError(system, error_code, fatal_type,
|
||||||
{}); // No info is passed with ThrowFatalWithPolicy
|
{}); // No info is passed with ThrowFatalWithPolicy
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -163,7 +163,7 @@ void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx)
|
||||||
|
|
||||||
ThrowFatalError(system, error_code, fatal_type, info);
|
ThrowFatalError(system, error_code, fatal_type, info);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ private:
|
||||||
LOG_DEBUG(Service_FGM, "called");
|
LOG_DEBUG(Service_FGM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IRequest>(system);
|
rb.PushIpcInterface<IRequest>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,27 +60,27 @@ ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto entry_type = GetEntryType(path);
|
const auto entry_type = GetEntryType(path);
|
||||||
if (entry_type.Code() == RESULT_SUCCESS) {
|
if (entry_type.Code() == ResultSuccess) {
|
||||||
return FileSys::ERROR_PATH_ALREADY_EXISTS;
|
return FileSys::ERROR_PATH_ALREADY_EXISTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto file = dir->CreateFile(Common::FS::GetFilename(path));
|
auto file = dir->CreateFile(Common::FS::GetFilename(path));
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
if (!file->Resize(size)) {
|
if (!file->Resize(size)) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) const {
|
ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) const {
|
||||||
std::string path(Common::FS::SanitizePath(path_));
|
std::string path(Common::FS::SanitizePath(path_));
|
||||||
if (path.empty()) {
|
if (path.empty()) {
|
||||||
// TODO(DarkLordZach): Why do games call this and what should it do? Works as is but...
|
// TODO(DarkLordZach): Why do games call this and what should it do? Works as is but...
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
|
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
|
||||||
|
@ -89,10 +89,10 @@ ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) cons
|
||||||
}
|
}
|
||||||
if (!dir->DeleteFile(Common::FS::GetFilename(path))) {
|
if (!dir->DeleteFile(Common::FS::GetFilename(path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) const {
|
ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) const {
|
||||||
|
@ -104,9 +104,9 @@ ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_)
|
||||||
auto new_dir = dir->CreateSubdirectory(Common::FS::GetFilename(path));
|
auto new_dir = dir->CreateSubdirectory(Common::FS::GetFilename(path));
|
||||||
if (new_dir == nullptr) {
|
if (new_dir == nullptr) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_) const {
|
ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_) const {
|
||||||
|
@ -114,9 +114,9 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_)
|
||||||
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
|
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
|
||||||
if (!dir->DeleteSubdirectory(Common::FS::GetFilename(path))) {
|
if (!dir->DeleteSubdirectory(Common::FS::GetFilename(path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::string& path_) const {
|
ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::string& path_) const {
|
||||||
|
@ -124,9 +124,9 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::str
|
||||||
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
|
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
|
||||||
if (!dir->DeleteSubdirectoryRecursive(Common::FS::GetFilename(path))) {
|
if (!dir->DeleteSubdirectoryRecursive(Common::FS::GetFilename(path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::string& path) const {
|
ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::string& path) const {
|
||||||
|
@ -135,10 +135,10 @@ ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::stri
|
||||||
|
|
||||||
if (!dir->CleanSubdirectoryRecursive(Common::FS::GetFilename(sanitized_path))) {
|
if (!dir->CleanSubdirectoryRecursive(Common::FS::GetFilename(sanitized_path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
|
ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
|
||||||
|
@ -152,14 +152,14 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
|
||||||
return FileSys::ERROR_PATH_NOT_FOUND;
|
return FileSys::ERROR_PATH_NOT_FOUND;
|
||||||
if (!src->Rename(Common::FS::GetFilename(dest_path))) {
|
if (!src->Rename(Common::FS::GetFilename(dest_path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move by hand -- TODO(DarkLordZach): Optimize
|
// Move by hand -- TODO(DarkLordZach): Optimize
|
||||||
auto c_res = CreateFile(dest_path, src->GetSize());
|
auto c_res = CreateFile(dest_path, src->GetSize());
|
||||||
if (c_res != RESULT_SUCCESS)
|
if (c_res != ResultSuccess)
|
||||||
return c_res;
|
return c_res;
|
||||||
|
|
||||||
auto dest = backing->GetFileRelative(dest_path);
|
auto dest = backing->GetFileRelative(dest_path);
|
||||||
|
@ -170,10 +170,10 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
|
||||||
|
|
||||||
if (!src->GetContainingDirectory()->DeleteFile(Common::FS::GetFilename(src_path))) {
|
if (!src->GetContainingDirectory()->DeleteFile(Common::FS::GetFilename(src_path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_path_,
|
ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_path_,
|
||||||
|
@ -187,9 +187,9 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa
|
||||||
return FileSys::ERROR_PATH_NOT_FOUND;
|
return FileSys::ERROR_PATH_NOT_FOUND;
|
||||||
if (!src->Rename(Common::FS::GetFilename(dest_path))) {
|
if (!src->Rename(Common::FS::GetFilename(dest_path))) {
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(DarkLordZach): Implement renaming across the tree (move).
|
// TODO(DarkLordZach): Implement renaming across the tree (move).
|
||||||
|
@ -199,7 +199,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa
|
||||||
src_path, dest_path);
|
src_path, dest_path);
|
||||||
|
|
||||||
// TODO(DarkLordZach): Find a better error code for this
|
// TODO(DarkLordZach): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultVal<FileSys::VirtualFile> VfsDirectoryServiceWrapper::OpenFile(const std::string& path_,
|
ResultVal<FileSys::VirtualFile> VfsDirectoryServiceWrapper::OpenFile(const std::string& path_,
|
||||||
|
@ -258,7 +258,7 @@ FileSystemController::~FileSystemController() = default;
|
||||||
ResultCode FileSystemController::RegisterRomFS(std::unique_ptr<FileSys::RomFSFactory>&& factory) {
|
ResultCode FileSystemController::RegisterRomFS(std::unique_ptr<FileSys::RomFSFactory>&& factory) {
|
||||||
romfs_factory = std::move(factory);
|
romfs_factory = std::move(factory);
|
||||||
LOG_DEBUG(Service_FS, "Registered RomFS");
|
LOG_DEBUG(Service_FS, "Registered RomFS");
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode FileSystemController::RegisterSaveData(
|
ResultCode FileSystemController::RegisterSaveData(
|
||||||
|
@ -266,21 +266,21 @@ ResultCode FileSystemController::RegisterSaveData(
|
||||||
ASSERT_MSG(save_data_factory == nullptr, "Tried to register a second save data");
|
ASSERT_MSG(save_data_factory == nullptr, "Tried to register a second save data");
|
||||||
save_data_factory = std::move(factory);
|
save_data_factory = std::move(factory);
|
||||||
LOG_DEBUG(Service_FS, "Registered save data");
|
LOG_DEBUG(Service_FS, "Registered save data");
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode FileSystemController::RegisterSDMC(std::unique_ptr<FileSys::SDMCFactory>&& factory) {
|
ResultCode FileSystemController::RegisterSDMC(std::unique_ptr<FileSys::SDMCFactory>&& factory) {
|
||||||
ASSERT_MSG(sdmc_factory == nullptr, "Tried to register a second SDMC");
|
ASSERT_MSG(sdmc_factory == nullptr, "Tried to register a second SDMC");
|
||||||
sdmc_factory = std::move(factory);
|
sdmc_factory = std::move(factory);
|
||||||
LOG_DEBUG(Service_FS, "Registered SDMC");
|
LOG_DEBUG(Service_FS, "Registered SDMC");
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode FileSystemController::RegisterBIS(std::unique_ptr<FileSys::BISFactory>&& factory) {
|
ResultCode FileSystemController::RegisterBIS(std::unique_ptr<FileSys::BISFactory>&& factory) {
|
||||||
ASSERT_MSG(bis_factory == nullptr, "Tried to register a second BIS");
|
ASSERT_MSG(bis_factory == nullptr, "Tried to register a second BIS");
|
||||||
bis_factory = std::move(factory);
|
bis_factory = std::move(factory);
|
||||||
LOG_DEBUG(Service_FS, "Registered BIS");
|
LOG_DEBUG(Service_FS, "Registered BIS");
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystemController::SetPackedUpdate(FileSys::VirtualFile update_raw) {
|
void FileSystemController::SetPackedUpdate(FileSys::VirtualFile update_raw) {
|
||||||
|
@ -297,7 +297,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess()
|
||||||
|
|
||||||
if (romfs_factory == nullptr) {
|
if (romfs_factory == nullptr) {
|
||||||
// TODO(bunnei): Find a better error code for this
|
// TODO(bunnei): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID());
|
return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID());
|
||||||
|
@ -309,7 +309,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS(
|
||||||
|
|
||||||
if (romfs_factory == nullptr) {
|
if (romfs_factory == nullptr) {
|
||||||
// TODO: Find a better error code for this
|
// TODO: Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return romfs_factory->OpenPatchedRomFS(title_id, type);
|
return romfs_factory->OpenPatchedRomFS(title_id, type);
|
||||||
|
@ -322,7 +322,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFSWithProgra
|
||||||
|
|
||||||
if (romfs_factory == nullptr) {
|
if (romfs_factory == nullptr) {
|
||||||
// TODO: Find a better error code for this
|
// TODO: Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return romfs_factory->OpenPatchedRomFSWithProgramIndex(title_id, program_index, type);
|
return romfs_factory->OpenPatchedRomFSWithProgramIndex(title_id, program_index, type);
|
||||||
|
@ -335,7 +335,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFS(
|
||||||
|
|
||||||
if (romfs_factory == nullptr) {
|
if (romfs_factory == nullptr) {
|
||||||
// TODO(bunnei): Find a better error code for this
|
// TODO(bunnei): Find a better error code for this
|
||||||
return RESULT_UNKNOWN;
|
return ResultUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
return romfs_factory->Open(title_id, storage_id, type);
|
return romfs_factory->Open(title_id, storage_id, type);
|
||||||
|
|
|
@ -100,7 +100,7 @@ private:
|
||||||
ctx.WriteBuffer(output);
|
ctx.WriteBuffer(output);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSize(Kernel::HLERequestContext& ctx) {
|
void GetSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -108,7 +108,7 @@ private:
|
||||||
LOG_DEBUG(Service_FS, "called, size={}", size);
|
LOG_DEBUG(Service_FS, "called, size={}", size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(size);
|
rb.Push<u64>(size);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -162,7 +162,7 @@ private:
|
||||||
ctx.WriteBuffer(output);
|
ctx.WriteBuffer(output);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u64>(output.size()));
|
rb.Push(static_cast<u64>(output.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ private:
|
||||||
written);
|
written);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Flush(Kernel::HLERequestContext& ctx) {
|
void Flush(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -215,7 +215,7 @@ private:
|
||||||
// Exists for SDK compatibiltity -- No need to flush file.
|
// Exists for SDK compatibiltity -- No need to flush file.
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSize(Kernel::HLERequestContext& ctx) {
|
void SetSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -226,7 +226,7 @@ private:
|
||||||
backend->Resize(size);
|
backend->Resize(size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSize(Kernel::HLERequestContext& ctx) {
|
void GetSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -234,7 +234,7 @@ private:
|
||||||
LOG_DEBUG(Service_FS, "called, size={}", size);
|
LOG_DEBUG(Service_FS, "called, size={}", size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(size);
|
rb.Push<u64>(size);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -290,7 +290,7 @@ private:
|
||||||
ctx.WriteBuffer(begin, range_size);
|
ctx.WriteBuffer(begin, range_size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(actual_entries);
|
rb.Push(actual_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ private:
|
||||||
u64 count = entries.size() - next_entry_index;
|
u64 count = entries.size() - next_entry_index;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(count);
|
rb.Push(count);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -430,7 +430,7 @@ public:
|
||||||
auto file = std::make_shared<IFile>(system, result.Unwrap());
|
auto file = std::make_shared<IFile>(system, result.Unwrap());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IFile>(std::move(file));
|
rb.PushIpcInterface<IFile>(std::move(file));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ public:
|
||||||
auto directory = std::make_shared<IDirectory>(system, result.Unwrap());
|
auto directory = std::make_shared<IDirectory>(system, result.Unwrap());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDirectory>(std::move(directory));
|
rb.PushIpcInterface<IDirectory>(std::move(directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(*result));
|
rb.Push<u32>(static_cast<u32>(*result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,14 +481,14 @@ public:
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFreeSpaceSize(Kernel::HLERequestContext& ctx) {
|
void GetFreeSpaceSize(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(size.get_free_size());
|
rb.Push(size.get_free_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ public:
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(size.get_total_size());
|
rb.Push(size.get_total_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ public:
|
||||||
ctx.WriteBuffer(begin, range_size);
|
ctx.WriteBuffer(begin, range_size);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(actual_entries));
|
rb.Push<u32>(static_cast<u32>(actual_entries));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called. current_process_id=0x{:016X}", current_process_id);
|
LOG_DEBUG(Service_FS, "called. current_process_id=0x{:016X}", current_process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -807,7 +807,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called with type={}, title_id={:016X}", type, title_id);
|
LOG_WARNING(Service_FS, "(STUBBED) called with type={}, title_id={:016X}", type, title_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 0};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 0};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -818,7 +818,7 @@ void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard));
|
SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
fsc.CreateSaveData(FileSys::SaveDataSpaceId::NandUser, save_struct);
|
fsc.CreateSaveData(FileSys::SaveDataSpaceId::NandUser, save_struct);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -879,7 +879,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
SizeGetter::FromStorageId(fsc, id));
|
SizeGetter::FromStorageId(fsc, id));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -894,7 +894,7 @@ void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext&
|
||||||
LOG_INFO(Service_FS, "called, space={}", space);
|
LOG_INFO(Service_FS, "called, space={}", space);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISaveDataInfoReader>(
|
rb.PushIpcInterface<ISaveDataInfoReader>(
|
||||||
std::make_shared<ISaveDataInfoReader>(system, space, fsc));
|
std::make_shared<ISaveDataInfoReader>(system, space, fsc));
|
||||||
}
|
}
|
||||||
|
@ -903,7 +903,7 @@ void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLEReq
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
||||||
|
@ -929,7 +929,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
||||||
parameters.attribute.index);
|
parameters.attribute.index);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(flags);
|
rb.Push(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,14 +941,14 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO (bunnei): Find the right error code to use here
|
// TODO (bunnei): Find the right error code to use here
|
||||||
LOG_CRITICAL(Service_FS, "no file system interface available!");
|
LOG_CRITICAL(Service_FS, "no file system interface available!");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
|
auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -968,7 +968,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
if (archive != nullptr) {
|
if (archive != nullptr) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface(std::make_shared<IStorage>(system, archive));
|
rb.PushIpcInterface(std::make_shared<IStorage>(system, archive));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -978,7 +978,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
|
||||||
"could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,
|
"could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,
|
||||||
storage_id);
|
storage_id);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -988,7 +988,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
|
||||||
system, pm.PatchRomFS(std::move(data.Unwrap()), 0, FileSys::ContentRecordType::Data));
|
system, pm.PatchRomFS(std::move(data.Unwrap()), 0, FileSys::ContentRecordType::Data));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1019,14 +1019,14 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index);
|
LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto storage = std::make_shared<IStorage>(system, std::move(patched_romfs.Unwrap()));
|
auto storage = std::make_shared<IStorage>(system, std::move(patched_romfs.Unwrap()));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,14 +1037,14 @@ void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called, log_mode={:08X}", log_mode);
|
LOG_DEBUG(Service_FS, "called, log_mode={:08X}", log_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(log_mode);
|
rb.PushEnum(log_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1058,14 +1058,14 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
|
||||||
reporter.SaveFilesystemAccessReport(log_mode, std::move(log));
|
reporter.SaveFilesystemAccessReport(log_mode, std::move(log));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(AccessLogVersion::Latest);
|
rb.PushEnum(AccessLogVersion::Latest);
|
||||||
rb.Push(access_log_program_index);
|
rb.Push(access_log_program_index);
|
||||||
}
|
}
|
||||||
|
@ -1088,14 +1088,14 @@ private:
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Commit(Kernel::HLERequestContext& ctx) {
|
void Commit(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1103,7 +1103,7 @@ void FSP_SRV::OpenMultiCommitManager(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IMultiCommitManager>(std::make_shared<IMultiCommitManager>(system));
|
rb.PushIpcInterface<IMultiCommitManager>(std::make_shared<IMultiCommitManager>(system));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ private:
|
||||||
// blocked users.
|
// blocked users.
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(0); // Indicates there are no blocked users
|
rb.Push<u32>(0); // Indicates there are no blocked users
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,14 +143,14 @@ private:
|
||||||
// Stub used by Splatoon 2
|
// Stub used by Splatoon 2
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateUserPresence(Kernel::HLERequestContext& ctx) {
|
void UpdateUserPresence(Kernel::HLERequestContext& ctx) {
|
||||||
// Stub used by Retro City Rampage
|
// Stub used by Retro City Rampage
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPlayHistoryRegistrationKey(Kernel::HLERequestContext& ctx) {
|
void GetPlayHistoryRegistrationKey(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -162,7 +162,7 @@ private:
|
||||||
uuid.Format());
|
uuid.Format());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFriendList(Kernel::HLERequestContext& ctx) {
|
void GetFriendList(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -175,7 +175,7 @@ private:
|
||||||
uuid.Format(), pid);
|
uuid.Format(), pid);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
rb.Push<u32>(0); // Friend count
|
rb.Push<u32>(0); // Friend count
|
||||||
// TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId"
|
// TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId"
|
||||||
|
@ -206,7 +206,7 @@ private:
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(notification_event.GetReadableEvent());
|
rb.PushCopyObjects(notification_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ private:
|
||||||
std::memset(&states, 0, sizeof(States));
|
std::memset(&states, 0, sizeof(States));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pop(Kernel::HLERequestContext& ctx) {
|
void Pop(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -249,7 +249,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<SizedNotificationInfo>(notification);
|
rb.PushRaw<SizedNotificationInfo>(notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ private:
|
||||||
|
|
||||||
void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IFriendService>(system);
|
rb.PushIpcInterface<IFriendService>(system);
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ void Module::Interface::CreateNotificationService(Kernel::HLERequestContext& ctx
|
||||||
LOG_DEBUG(Service_Friend, "called, uuid={}", uuid.Format());
|
LOG_DEBUG(Service_Friend, "called, uuid={}", uuid.Format());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<INotificationService>(uuid, system);
|
rb.PushIpcInterface<INotificationService>(uuid, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ void ARP_R::GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(*res);
|
rb.PushRaw(*res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ void ARP_R::GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestCont
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(*res);
|
rb.PushRaw(*res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ void ARP_R::GetApplicationControlProperty(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(*res);
|
ctx.WriteBuffer(*res);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARP_R::GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestContext& ctx) {
|
void ARP_R::GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -150,7 +150,7 @@ void ARP_R::GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestCon
|
||||||
ctx.WriteBuffer(*res);
|
ctx.WriteBuffer(*res);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
class IRegistrar final : public ServiceFramework<IRegistrar> {
|
class IRegistrar final : public ServiceFramework<IRegistrar> {
|
||||||
|
@ -198,7 +198,7 @@ private:
|
||||||
issued = true;
|
issued = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) {
|
void SetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -217,7 +217,7 @@ private:
|
||||||
launch = rp.PopRaw<ApplicationLaunchProperty>();
|
launch = rp.PopRaw<ApplicationLaunchProperty>();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetApplicationControlProperty(Kernel::HLERequestContext& ctx) {
|
void SetApplicationControlProperty(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -235,7 +235,7 @@ private:
|
||||||
control = ctx.ReadBuffer();
|
control = ctx.ReadBuffer();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
IssuerFn issue_process_id;
|
IssuerFn issue_process_id;
|
||||||
|
@ -273,7 +273,7 @@ void ARP_W::AcquireRegistrar(Kernel::HLERequestContext& ctx) {
|
||||||
});
|
});
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface(registrar);
|
rb.PushIpcInterface(registrar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ void BGTC_T::OpenTaskService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BGTC, "called");
|
LOG_DEBUG(Service_BGTC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ITaskService>(system);
|
rb.PushIpcInterface<ITaskService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ ResultCode ARPManager::Register(u64 title_id, ApplicationLaunchProperty launch,
|
||||||
}
|
}
|
||||||
|
|
||||||
entries.insert_or_assign(title_id, MapEntry{launch, std::move(control)});
|
entries.insert_or_assign(title_id, MapEntry{launch, std::move(control)});
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode ARPManager::Unregister(u64 title_id) {
|
ResultCode ARPManager::Unregister(u64 title_id) {
|
||||||
|
@ -68,7 +68,7 @@ ResultCode ARPManager::Unregister(u64 title_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
entries.erase(iter);
|
entries.erase(iter);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARPManager::ResetAll() {
|
void ARPManager::ResetAll() {
|
||||||
|
|
|
@ -114,7 +114,7 @@ void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(&system.Kernel().GetHidSharedMem());
|
rb.PushCopyObjects(&system.Kernel().GetHidSharedMem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ private:
|
||||||
vibration_device_handle.device_index);
|
vibration_device_handle.device_index);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<IAppletResource> applet_resource;
|
std::shared_ptr<IAppletResource> applet_resource;
|
||||||
|
@ -351,7 +351,7 @@ void Hid::CreateAppletResource(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAppletResource>(applet_resource);
|
rb.PushIpcInterface<IAppletResource>(applet_resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ void Hid::ActivateDebugPad(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -376,7 +376,7 @@ void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -388,7 +388,7 @@ void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -400,7 +400,7 @@ void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -410,7 +410,7 @@ void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called. flags={}", flags);
|
LOG_WARNING(Service_HID, "(STUBBED) called. flags={}", flags);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -429,7 +429,7 @@ void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.basic_xpad_id, parameters.applet_resource_user_id);
|
parameters.basic_xpad_id, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) {
|
void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -439,7 +439,7 @@ void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "(STUBBED) called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "(STUBBED) called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(0);
|
rb.Push(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ void Hid::ActivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -482,7 +482,7 @@ void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -503,7 +503,7 @@ void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -524,7 +524,7 @@ void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) {
|
void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -547,7 +547,7 @@ void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.applet_resource_user_id);
|
parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -573,7 +573,7 @@ void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.parameter2, parameters.applet_resource_user_id);
|
parameters.parameter2, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -599,7 +599,7 @@ void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(parameter1);
|
rb.Push(parameter1);
|
||||||
rb.Push(parameter2);
|
rb.Push(parameter2);
|
||||||
}
|
}
|
||||||
|
@ -624,7 +624,7 @@ void Hid::ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -643,7 +643,7 @@ void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
drift_mode, applet_resource_user_id);
|
drift_mode, applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -662,7 +662,7 @@ void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetGyroscopeZeroDriftMode());
|
.GetGyroscopeZeroDriftMode());
|
||||||
}
|
}
|
||||||
|
@ -686,7 +686,7 @@ void Hid::ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) {
|
void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -705,7 +705,7 @@ void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.IsSixAxisSensorAtRest());
|
.IsSixAxisSensorAtRest());
|
||||||
}
|
}
|
||||||
|
@ -726,7 +726,7 @@ void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.applet_resource_user_id);
|
parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -739,7 +739,7 @@ void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, supported_styleset={}", supported_styleset);
|
LOG_DEBUG(Service_HID, "called, supported_styleset={}", supported_styleset);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -749,7 +749,7 @@ void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetSupportedStyleSet()
|
.GetSupportedStyleSet()
|
||||||
.raw);
|
.raw);
|
||||||
|
@ -765,7 +765,7 @@ void Hid::SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -777,7 +777,7 @@ void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) {
|
void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -789,7 +789,7 @@ void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) {
|
void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -807,7 +807,7 @@ void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.npad_id, parameters.applet_resource_user_id, parameters.unknown);
|
parameters.npad_id, parameters.applet_resource_user_id, parameters.unknown);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.PushCopyObjects(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetStyleSetChangedEvent(parameters.npad_id));
|
.GetStyleSetChangedEvent(parameters.npad_id));
|
||||||
}
|
}
|
||||||
|
@ -829,7 +829,7 @@ void Hid::DisconnectNpad(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.applet_resource_user_id);
|
parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -839,7 +839,7 @@ void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, npad_id={}", npad_id);
|
LOG_DEBUG(Service_HID, "called, npad_id={}", npad_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetLedPattern(npad_id)
|
.GetLedPattern(npad_id)
|
||||||
.raw);
|
.raw);
|
||||||
|
@ -862,7 +862,7 @@ void Hid::ActivateNpadWithRevision(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.applet_resource_user_id);
|
parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -876,7 +876,7 @@ void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id, hold_type);
|
applet_resource_user_id, hold_type);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -886,7 +886,7 @@ void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad).GetHoldType());
|
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad).GetHoldType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,7 +907,7 @@ void Hid::SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx
|
||||||
parameters.npad_id, parameters.applet_resource_user_id);
|
parameters.npad_id, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -931,7 +931,7 @@ void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.npad_joy_device_type);
|
parameters.npad_joy_device_type);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -951,7 +951,7 @@ void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.npad_id, parameters.applet_resource_user_id);
|
parameters.npad_id, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) {
|
void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -967,7 +967,7 @@ void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) {
|
||||||
npad_id_1, npad_id_2, applet_resource_user_id);
|
npad_id_1, npad_id_2, applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -979,7 +979,7 @@ void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -991,7 +991,7 @@ void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1006,7 +1006,7 @@ void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id, activation_mode);
|
applet_resource_user_id, activation_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1016,7 +1016,7 @@ void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetNpadHandheldActivationMode());
|
.GetNpadHandheldActivationMode());
|
||||||
}
|
}
|
||||||
|
@ -1035,7 +1035,7 @@ void Hid::SwapNpadAssignment(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
if (res) {
|
if (res) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_HID, "Npads are not connected!");
|
LOG_ERROR(Service_HID, "Npads are not connected!");
|
||||||
rb.Push(ERR_NPAD_NOT_CONNECTED);
|
rb.Push(ERR_NPAD_NOT_CONNECTED);
|
||||||
|
@ -1056,7 +1056,7 @@ void Hid::IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext
|
||||||
parameters.npad_id, parameters.applet_resource_user_id);
|
parameters.npad_id, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.IsUnintendedHomeButtonInputProtectionEnabled(parameters.npad_id));
|
.IsUnintendedHomeButtonInputProtectionEnabled(parameters.npad_id));
|
||||||
}
|
}
|
||||||
|
@ -1083,7 +1083,7 @@ void Hid::EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& c
|
||||||
parameters.applet_resource_user_id);
|
parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1104,7 +1104,7 @@ void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.analog_stick_use_center_clamp, parameters.applet_resource_user_id);
|
parameters.analog_stick_use_center_clamp, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1148,7 +1148,7 @@ void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
||||||
vibration_device_info.type, vibration_device_info.position);
|
vibration_device_info.type, vibration_device_info.position);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(vibration_device_info);
|
rb.PushRaw(vibration_device_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ void Hid::SendVibrationValue(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) {
|
void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1193,7 +1193,7 @@ void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.PushRaw(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetLastVibration(parameters.vibration_device_handle));
|
.GetLastVibration(parameters.vibration_device_handle));
|
||||||
}
|
}
|
||||||
|
@ -1202,7 +1202,7 @@ void Hid::CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IActiveVibrationDeviceList>(system, applet_resource);
|
rb.PushIpcInterface<IActiveVibrationDeviceList>(system, applet_resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1215,14 +1215,14 @@ void Hid::PermitVibration(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, can_vibrate={}", can_vibrate);
|
LOG_DEBUG(Service_HID, "called, can_vibrate={}", can_vibrate);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) {
|
void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(Settings::values.vibration_enabled.GetValue());
|
rb.Push(Settings::values.vibration_enabled.GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1247,7 +1247,7 @@ void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1307,7 +1307,7 @@ void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.gc_erm_command);
|
parameters.gc_erm_command);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1348,7 +1348,7 @@ void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(gc_erm_command);
|
rb.PushEnum(gc_erm_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1362,7 +1362,7 @@ void Hid::BeginPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1372,7 +1372,7 @@ void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) {
|
void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1392,7 +1392,7 @@ void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
parameters.vibration_device_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.IsVibrationDeviceMounted(parameters.vibration_device_handle));
|
.IsVibrationDeviceMounted(parameters.vibration_device_handle));
|
||||||
}
|
}
|
||||||
|
@ -1406,7 +1406,7 @@ void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_WARNING(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1426,7 +1426,7 @@ void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1446,7 +1446,7 @@ void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
parameters.sixaxis_handle.device_index, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1458,7 +1458,7 @@ void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_WARNING(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1469,7 +1469,7 @@ void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1480,7 +1480,7 @@ void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1500,7 +1500,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
if (t_mem_1.IsNull()) {
|
if (t_mem_1.IsNull()) {
|
||||||
LOG_ERROR(Service_HID, "t_mem_1 is a nullptr for handle=0x{:08X}", t_mem_1_handle);
|
LOG_ERROR(Service_HID, "t_mem_1 is a nullptr for handle=0x{:08X}", t_mem_1_handle);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1510,7 +1510,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
if (t_mem_2.IsNull()) {
|
if (t_mem_2.IsNull()) {
|
||||||
LOG_ERROR(Service_HID, "t_mem_2 is a nullptr for handle=0x{:08X}", t_mem_2_handle);
|
LOG_ERROR(Service_HID, "t_mem_2 is a nullptr for handle=0x{:08X}", t_mem_2_handle);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1530,7 +1530,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
t_mem_1_handle, t_mem_2_handle, applet_resource_user_id);
|
t_mem_1_handle, t_mem_2_handle, applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1541,7 +1541,7 @@ void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1554,7 +1554,7 @@ void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_WARNING(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1567,7 +1567,7 @@ void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id, is_palma_all_connectable);
|
applet_resource_user_id, is_palma_all_connectable);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1577,7 +1577,7 @@ void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called, palma_boost_mode={}", palma_boost_mode);
|
LOG_WARNING(Service_HID, "(STUBBED) called, palma_boost_mode={}", palma_boost_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1592,7 +1592,7 @@ void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id, communication_mode);
|
applet_resource_user_id, communication_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -1603,7 +1603,7 @@ void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.GetNpadCommunicationMode());
|
.GetNpadCommunicationMode());
|
||||||
}
|
}
|
||||||
|
@ -1956,7 +1956,7 @@ private:
|
||||||
LOG_WARNING(Service_HID, "called");
|
LOG_WARNING(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,21 +43,21 @@ void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) {
|
void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
void IRS::GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_IRS, "called");
|
LOG_DEBUG(Service_IRS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(&system.Kernel().GetIrsSharedMem());
|
rb.PushCopyObjects(&system.Kernel().GetIrsSharedMem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,35 +65,35 @@ void IRS::StopImageProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) {
|
void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u64>(system.CoreTiming().GetCPUTicks());
|
rb.PushRaw<u64>(system.CoreTiming().GetCPUTicks());
|
||||||
rb.PushRaw<u32>(0);
|
rb.PushRaw<u32>(0);
|
||||||
}
|
}
|
||||||
|
@ -102,14 +102,14 @@ void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) {
|
void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u32>(device_handle);
|
rb.PushRaw<u32>(device_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,56 +117,56 @@ void IRS::RunPointingProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::SuspendImageProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::SuspendImageProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::CheckFirmwareVersion(Kernel::HLERequestContext& ctx) {
|
void IRS::CheckFirmwareVersion(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::SetFunctionLevel(Kernel::HLERequestContext& ctx) {
|
void IRS::SetFunctionLevel(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) {
|
void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx) {
|
void IRS::ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
LOG_WARNING(Service_IRS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
IRS::~IRS() = default;
|
IRS::~IRS() = default;
|
||||||
|
|
|
@ -75,7 +75,7 @@ private:
|
||||||
update_instantly = true;
|
update_instantly = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentBrightnessSetting(Kernel::HLERequestContext& ctx) {
|
void GetCurrentBrightnessSetting(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called brightness={}", brightness);
|
LOG_DEBUG(Service_LBL, "called brightness={}", brightness);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(brightness);
|
rb.Push(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ private:
|
||||||
backlight_enabled = true;
|
backlight_enabled = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitchBacklightOff(Kernel::HLERequestContext& ctx) {
|
void SwitchBacklightOff(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -111,14 +111,14 @@ private:
|
||||||
backlight_enabled = false;
|
backlight_enabled = false;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetBacklightSwitchStatus(Kernel::HLERequestContext& ctx) {
|
void GetBacklightSwitchStatus(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum<BacklightSwitchStatus>(backlight_enabled ? BacklightSwitchStatus::On
|
rb.PushEnum<BacklightSwitchStatus>(backlight_enabled ? BacklightSwitchStatus::On
|
||||||
: BacklightSwitchStatus::Off);
|
: BacklightSwitchStatus::Off);
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ private:
|
||||||
dimming = true;
|
dimming = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableDimming(Kernel::HLERequestContext& ctx) {
|
void DisableDimming(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -138,14 +138,14 @@ private:
|
||||||
dimming = false;
|
dimming = false;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsDimmingEnabled(Kernel::HLERequestContext& ctx) {
|
void IsDimmingEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(dimming);
|
rb.Push(dimming);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ private:
|
||||||
update_instantly = true;
|
update_instantly = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableAutoBrightnessControl(Kernel::HLERequestContext& ctx) {
|
void DisableAutoBrightnessControl(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -163,14 +163,14 @@ private:
|
||||||
auto_brightness = false;
|
auto_brightness = false;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsAutoBrightnessControlEnabled(Kernel::HLERequestContext& ctx) {
|
void IsAutoBrightnessControlEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(auto_brightness);
|
rb.Push(auto_brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,14 +183,14 @@ private:
|
||||||
ambient_light_value = light_value;
|
ambient_light_value = light_value;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAmbientLightSensorValue(Kernel::HLERequestContext& ctx) {
|
void GetAmbientLightSensorValue(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(ambient_light_value);
|
rb.Push(ambient_light_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetBrightnessReflectionDelayLevel(Kernel::HLERequestContext& ctx) {
|
void GetBrightnessReflectionDelayLevel(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -207,7 +207,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(0.0f);
|
rb.Push(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentBrightnessMapping(Kernel::HLERequestContext& ctx) {
|
void GetCurrentBrightnessMapping(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -224,7 +224,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
// This function is suppose to return something but it seems like it doesn't
|
// This function is suppose to return something but it seems like it doesn't
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentAmbientLightSensorMapping(Kernel::HLERequestContext& ctx) {
|
void GetCurrentAmbientLightSensorMapping(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -241,14 +241,14 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
// This function is suppose to return something but it seems like it doesn't
|
// This function is suppose to return something but it seems like it doesn't
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsAmbientLightSensorAvailable(Kernel::HLERequestContext& ctx) {
|
void IsAmbientLightSensorAvailable(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LBL, "(STUBBED) called");
|
LOG_WARNING(Service_LBL, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
// TODO(ogniK): Only return true if there's no device error
|
// TODO(ogniK): Only return true if there's no device error
|
||||||
rb.Push(true);
|
rb.Push(true);
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ private:
|
||||||
current_vr_brightness = brightness;
|
current_vr_brightness = brightness;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentBrightnessSettingForVrMode(Kernel::HLERequestContext& ctx) {
|
void GetCurrentBrightnessSettingForVrMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -280,7 +280,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called brightness={}", brightness);
|
LOG_DEBUG(Service_LBL, "called brightness={}", brightness);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(brightness);
|
rb.Push(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
vr_mode_enabled = true;
|
vr_mode_enabled = true;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
vr_mode_enabled = false;
|
vr_mode_enabled = false;
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ private:
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(vr_mode_enabled);
|
rb.Push(vr_mode_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
LOG_DEBUG(Service_LDN, "called");
|
LOG_DEBUG(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IMonitorService>(system);
|
rb.PushIpcInterface<IMonitorService>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -147,7 +147,7 @@ public:
|
||||||
// Indicate a network error, as we do not actually emulate LDN
|
// Indicate a network error, as we do not actually emulate LDN
|
||||||
rb.Push(static_cast<u32>(State::Error));
|
rb.Push(static_cast<u32>(State::Error));
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize2(Kernel::HLERequestContext& ctx) {
|
void Initialize2(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -189,7 +189,7 @@ public:
|
||||||
LOG_DEBUG(Service_LDN, "called");
|
LOG_DEBUG(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISystemLocalCommunicationService>(system);
|
rb.PushIpcInterface<ISystemLocalCommunicationService>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -210,7 +210,7 @@ public:
|
||||||
LOG_DEBUG(Service_LDN, "called");
|
LOG_DEBUG(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IUserLocalCommunicationService>(system);
|
rb.PushIpcInterface<IUserLocalCommunicationService>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -300,7 +300,7 @@ public:
|
||||||
input);
|
input);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<INetworkService>(system);
|
rb.PushIpcInterface<INetworkService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ public:
|
||||||
LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={}", reserved_input);
|
LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={}", reserved_input);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<INetworkServiceMonitor>(system);
|
rb.PushIpcInterface<INetworkServiceMonitor>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -338,7 +338,7 @@ public:
|
||||||
input);
|
input);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<INetworkService>(system);
|
rb.PushIpcInterface<INetworkService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ public:
|
||||||
LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={}", reserved_input);
|
LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={}", reserved_input);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<INetworkServiceMonitor>(system);
|
rb.PushIpcInterface<INetworkServiceMonitor>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -270,7 +270,7 @@ public:
|
||||||
nrr.insert_or_assign(nrr_address, std::move(hashes));
|
nrr.insert_or_assign(nrr_address, std::move(hashes));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterModuleInfo(Kernel::HLERequestContext& ctx) {
|
void UnregisterModuleInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -284,7 +284,7 @@ public:
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ValidateRegionForMap(Kernel::KPageTable& page_table, VAddr start, std::size_t size) const {
|
bool ValidateRegionForMap(Kernel::KPageTable& page_table, VAddr start, std::size_t size) const {
|
||||||
|
@ -524,7 +524,7 @@ public:
|
||||||
header.segment_headers[DATA_INDEX].memory_size, nro_address});
|
header.segment_headers[DATA_INDEX].memory_size, nro_address});
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*map_result);
|
rb.Push(*map_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ public:
|
||||||
info.nro_address + info.text_size, info.src_addr + info.text_size, info.ro_size));
|
info.nro_address + info.text_size, info.src_addr + info.text_size, info.ro_size));
|
||||||
CASCADE_CODE(
|
CASCADE_CODE(
|
||||||
page_table.UnmapProcessCodeMemory(info.nro_address, info.src_addr, info.text_size));
|
page_table.UnmapProcessCodeMemory(info.nro_address, info.src_addr, info.text_size));
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnloadModule(Kernel::HLERequestContext& ctx) {
|
void UnloadModule(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -596,7 +596,7 @@ public:
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -84,7 +84,7 @@ private:
|
||||||
|
|
||||||
// This function only succeeds - Get that out of the way
|
// This function only succeeds - Get that out of the way
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
if (data.size() < sizeof(LogPacketHeader)) {
|
if (data.size() < sizeof(LogPacketHeader)) {
|
||||||
LOG_ERROR(Service_LM, "Data size is too small for header! size={}", data.size());
|
LOG_ERROR(Service_LM, "Data size is too small for header! size={}", data.size());
|
||||||
|
@ -141,7 +141,7 @@ private:
|
||||||
destination = log_destination;
|
destination = log_destination;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 ReadLeb128(const std::vector<u8>& data, std::size_t& offset) {
|
u64 ReadLeb128(const std::vector<u8>& data, std::size_t& offset) {
|
||||||
|
@ -357,7 +357,7 @@ private:
|
||||||
LOG_DEBUG(Service_LM, "called");
|
LOG_DEBUG(Service_LM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILogger>(system);
|
rb.PushIpcInterface<ILogger>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,7 +74,7 @@ private:
|
||||||
LOG_DEBUG(Service_Mii, "called with source_flag={}", source_flag);
|
LOG_DEBUG(Service_Mii, "called with source_flag={}", source_flag);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(manager.CheckAndResetUpdateCounter(source_flag, current_update_counter));
|
rb.Push(manager.CheckAndResetUpdateCounter(source_flag, current_update_counter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ private:
|
||||||
LOG_DEBUG(Service_Mii, "called");
|
LOG_DEBUG(Service_Mii, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(manager.IsFullDatabase());
|
rb.Push(manager.IsFullDatabase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ private:
|
||||||
LOG_DEBUG(Service_Mii, "called with source_flag={}", source_flag);
|
LOG_DEBUG(Service_Mii, "called with source_flag={}", source_flag);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(manager.GetCount(source_flag));
|
rb.Push<u32>(manager.GetCount(source_flag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(result->size()));
|
rb.Push<u32>(static_cast<u32>(result->size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ private:
|
||||||
ctx.WriteBuffer(SerializeArray(values));
|
ctx.WriteBuffer(SerializeArray(values));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(result->size()));
|
rb.Push<u32>(static_cast<u32>(result->size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2 + sizeof(MiiInfo) / sizeof(u32)};
|
IPC::ResponseBuilder rb{ctx, 2 + sizeof(MiiInfo) / sizeof(u32)};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<MiiInfo>(*result);
|
rb.PushRaw<MiiInfo>(*result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2 + sizeof(MiiInfo) / sizeof(u32)};
|
IPC::ResponseBuilder rb{ctx, 2 + sizeof(MiiInfo) / sizeof(u32)};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<MiiInfo>(manager.BuildRandom(age, gender, race));
|
rb.PushRaw<MiiInfo>(manager.BuildRandom(age, gender, race));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2 + sizeof(MiiInfo) / sizeof(u32)};
|
IPC::ResponseBuilder rb{ctx, 2 + sizeof(MiiInfo) / sizeof(u32)};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<MiiInfo>(manager.BuildDefault(index));
|
rb.PushRaw<MiiInfo>(manager.BuildDefault(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ private:
|
||||||
UNIMPLEMENTED_IF(current_interface_version != 1);
|
UNIMPLEMENTED_IF(current_interface_version != 1);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool IsInterfaceVersionSupported(u32 interface_version) const {
|
constexpr bool IsInterfaceVersionSupported(u32 interface_version) const {
|
||||||
|
@ -267,7 +267,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void GetDatabaseService(Kernel::HLERequestContext& ctx) {
|
void GetDatabaseService(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDatabaseService>(system);
|
rb.PushIpcInterface<IDatabaseService>(system);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Mii, "called");
|
LOG_DEBUG(Service_Mii, "called");
|
||||||
|
|
|
@ -33,14 +33,14 @@ private:
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinalizeOld(Kernel::HLERequestContext& ctx) {
|
void FinalizeOld(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAndWaitOld(Kernel::HLERequestContext& ctx) {
|
void SetAndWaitOld(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -51,14 +51,14 @@ private:
|
||||||
|
|
||||||
current = min;
|
current = min;
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetOld(Kernel::HLERequestContext& ctx) {
|
void GetOld(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(current);
|
rb.Push(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ private:
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(id); // Any non zero value
|
rb.Push<u32>(id); // Any non zero value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ private:
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAndWait(Kernel::HLERequestContext& ctx) {
|
void SetAndWait(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -87,14 +87,14 @@ private:
|
||||||
|
|
||||||
current = min;
|
current = min;
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Get(Kernel::HLERequestContext& ctx) {
|
void Get(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(current);
|
rb.Push(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IAm>(system);
|
rb.PushIpcInterface<IAm>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -94,7 +94,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<MFIUser>(system);
|
rb.PushIpcInterface<MFIUser>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -141,7 +141,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0};
|
IPC::ResponseBuilder rb{ctx, 2, 0};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
// We don't deal with hardware initialization so we can just stub this.
|
// We don't deal with hardware initialization so we can just stub this.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "IsNfcEnabledOld");
|
LOG_DEBUG(Service_NFC, "IsNfcEnabledOld");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u8>(true);
|
rb.PushRaw<u8>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ private:
|
||||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(NfcStates::Finalized); // TODO(ogniK): Figure out if this matches nfp
|
rb.PushEnum(NfcStates::Finalized); // TODO(ogniK): Figure out if this matches nfp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ private:
|
||||||
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IUser>(system);
|
rb.PushIpcInterface<IUser>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -245,7 +245,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISystem>(system);
|
rb.PushIpcInterface<ISystem>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -113,7 +113,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0};
|
IPC::ResponseBuilder rb{ctx, 2, 0};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
state = State::Initialized;
|
state = State::Initialized;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3, 0};
|
IPC::ResponseBuilder rb{ctx, 3, 0};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u32>(static_cast<u32>(state));
|
rb.PushRaw<u32>(static_cast<u32>(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ private:
|
||||||
ctx.WriteBuffer(device_handle);
|
ctx.WriteBuffer(device_handle);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(1);
|
rb.Push<u32>(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFP, "called, dev_handle=0x{:X}", dev_handle);
|
LOG_DEBUG(Service_NFP, "called, dev_handle=0x{:X}", dev_handle);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(npad_id);
|
rb.Push<u32>(npad_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFP, "called, dev_handle=0x{:X}", dev_handle);
|
LOG_DEBUG(Service_NFP, "called, dev_handle=0x{:X}", dev_handle);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(nfp_interface.GetNFCEvent());
|
rb.PushCopyObjects(nfp_interface.GetNFCEvent());
|
||||||
has_attached_handle = true;
|
has_attached_handle = true;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ private:
|
||||||
LOG_DEBUG(Service_NFP, "called, dev_handle=0x{:X}", dev_handle);
|
LOG_DEBUG(Service_NFP, "called, dev_handle=0x{:X}", dev_handle);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(deactivate_event.GetReadableEvent());
|
rb.PushCopyObjects(deactivate_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,14 +186,14 @@ private:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDeviceState(Kernel::HLERequestContext& ctx) {
|
void GetDeviceState(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFP, "called");
|
LOG_DEBUG(Service_NFP, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(device_state));
|
rb.Push<u32>(static_cast<u32>(device_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ private:
|
||||||
device_state = DeviceState::SearchingForTag;
|
device_state = DeviceState::SearchingForTag;
|
||||||
}
|
}
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTagInfo(Kernel::HLERequestContext& ctx) {
|
void GetTagInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -221,7 +221,7 @@ private:
|
||||||
.padding_2 = {},
|
.padding_2 = {},
|
||||||
};
|
};
|
||||||
ctx.WriteBuffer(tag_info);
|
ctx.WriteBuffer(tag_info);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mount(Kernel::HLERequestContext& ctx) {
|
void Mount(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -229,7 +229,7 @@ private:
|
||||||
|
|
||||||
device_state = DeviceState::TagNearby;
|
device_state = DeviceState::TagNearby;
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetModelInfo(Kernel::HLERequestContext& ctx) {
|
void GetModelInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -238,7 +238,7 @@ private:
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
const auto& amiibo = nfp_interface.GetAmiiboBuffer();
|
const auto& amiibo = nfp_interface.GetAmiiboBuffer();
|
||||||
ctx.WriteBuffer(amiibo.model_info);
|
ctx.WriteBuffer(amiibo.model_info);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unmount(Kernel::HLERequestContext& ctx) {
|
void Unmount(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -247,7 +247,7 @@ private:
|
||||||
device_state = DeviceState::TagFound;
|
device_state = DeviceState::TagFound;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Finalize(Kernel::HLERequestContext& ctx) {
|
void Finalize(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -256,14 +256,14 @@ private:
|
||||||
device_state = DeviceState::Finalized;
|
device_state = DeviceState::Finalized;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) {
|
void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NFP, "(STUBBED) called");
|
LOG_WARNING(Service_NFP, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(availability_change_event.GetReadableEvent());
|
rb.PushCopyObjects(availability_change_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ private:
|
||||||
// TODO(ogniK): Pull Mii and owner data from amiibo
|
// TODO(ogniK): Pull Mii and owner data from amiibo
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCommonInfo(Kernel::HLERequestContext& ctx) {
|
void GetCommonInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -286,7 +286,7 @@ private:
|
||||||
ctx.WriteBuffer(common_info);
|
ctx.WriteBuffer(common_info);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenApplicationArea(Kernel::HLERequestContext& ctx) {
|
void OpenApplicationArea(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -299,7 +299,7 @@ private:
|
||||||
LOG_WARNING(Service_NFP, "(STUBBED) called");
|
LOG_WARNING(Service_NFP, "(STUBBED) called");
|
||||||
// We don't need to worry about this since we can just open the file
|
// We don't need to worry about this since we can just open the file
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u32>(0); // This is from the GetCommonInfo stub
|
rb.PushRaw<u32>(0); // This is from the GetCommonInfo stub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ private:
|
||||||
// TODO(ogniK): Pull application area from amiibo
|
// TODO(ogniK): Pull application area from amiibo
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u32>(0); // This is from the GetCommonInfo stub
|
rb.PushRaw<u32>(0); // This is from the GetCommonInfo stub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ void Module::Interface::CreateUserInterface(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFP, "called");
|
LOG_DEBUG(Service_NFP, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IUser>(*this, system);
|
rb.PushIpcInterface<IUser>(*this, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,14 +170,14 @@ private:
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetRequestState(Kernel::HLERequestContext& ctx) {
|
void GetRequestState(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
if (Settings::values.bcat_backend == "none") {
|
if (Settings::values.bcat_backend == "none") {
|
||||||
rb.PushEnum(RequestState::NotSubmitted);
|
rb.PushEnum(RequestState::NotSubmitted);
|
||||||
|
@ -190,14 +190,14 @@ private:
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) {
|
void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 2};
|
IPC::ResponseBuilder rb{ctx, 2, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(event1.GetReadableEvent(), event2.GetReadableEvent());
|
rb.PushCopyObjects(event1.GetReadableEvent(), event2.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,14 +205,14 @@ private:
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetConnectionConfirmationOption(Kernel::HLERequestContext& ctx) {
|
void SetConnectionConfirmationOption(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAppletInfo(Kernel::HLERequestContext& ctx) {
|
void GetAppletInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -223,7 +223,7 @@ private:
|
||||||
ctx.WriteBuffer(out_buffer);
|
ctx.WriteBuffer(out_buffer);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
|
@ -254,7 +254,7 @@ private:
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid
|
rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid
|
||||||
}
|
}
|
||||||
void CreateScanRequest(Kernel::HLERequestContext& ctx) {
|
void CreateScanRequest(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -262,7 +262,7 @@ private:
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IScanRequest>(system);
|
rb.PushIpcInterface<IScanRequest>(system);
|
||||||
}
|
}
|
||||||
void CreateRequest(Kernel::HLERequestContext& ctx) {
|
void CreateRequest(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -270,7 +270,7 @@ private:
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IRequest>(system);
|
rb.PushIpcInterface<IRequest>(system);
|
||||||
}
|
}
|
||||||
void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -311,13 +311,13 @@ private:
|
||||||
ctx.WriteBuffer(network_profile_data);
|
ctx.WriteBuffer(network_profile_data);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
|
void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
void GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
|
void GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
@ -326,7 +326,7 @@ private:
|
||||||
UNIMPLEMENTED_IF(error != Network::Errno::SUCCESS);
|
UNIMPLEMENTED_IF(error != Network::Errno::SUCCESS);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(ipv4);
|
rb.PushRaw(ipv4);
|
||||||
}
|
}
|
||||||
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
|
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -340,7 +340,7 @@ private:
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<INetworkProfile>(system);
|
rb.PushIpcInterface<INetworkProfile>(system);
|
||||||
rb.PushRaw<u128>(uuid);
|
rb.PushRaw<u128>(uuid);
|
||||||
}
|
}
|
||||||
|
@ -369,21 +369,21 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2 + (sizeof(IpConfigInfo) + 3) / sizeof(u32)};
|
IPC::ResponseBuilder rb{ctx, 2 + (sizeof(IpConfigInfo) + 3) / sizeof(u32)};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
||||||
}
|
}
|
||||||
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u8>(0);
|
rb.Push<u8>(0);
|
||||||
}
|
}
|
||||||
void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
if (Settings::values.bcat_backend == "none") {
|
if (Settings::values.bcat_backend == "none") {
|
||||||
rb.Push<u8>(0);
|
rb.Push<u8>(0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -394,7 +394,7 @@ private:
|
||||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
if (Settings::values.bcat_backend == "none") {
|
if (Settings::values.bcat_backend == "none") {
|
||||||
rb.Push<u8>(0);
|
rb.Push<u8>(0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -471,7 +471,7 @@ private:
|
||||||
LOG_DEBUG(Service_NIFM, "called");
|
LOG_DEBUG(Service_NIFM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IGeneralService>(system);
|
rb.PushIpcInterface<IGeneralService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ private:
|
||||||
LOG_DEBUG(Service_NIFM, "called");
|
LOG_DEBUG(Service_NIFM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IGeneralService>(system);
|
rb.PushIpcInterface<IGeneralService>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
void CreateAsyncInterface(Kernel::HLERequestContext& ctx) {
|
void CreateAsyncInterface(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IShopServiceAsync>(system);
|
rb.PushIpcInterface<IShopServiceAsync>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -74,7 +74,7 @@ private:
|
||||||
void CreateAccessorInterface(Kernel::HLERequestContext& ctx) {
|
void CreateAccessorInterface(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IShopServiceAccessor>(system);
|
rb.PushIpcInterface<IShopServiceAccessor>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -240,7 +240,7 @@ private:
|
||||||
void CreateServerInterface(Kernel::HLERequestContext& ctx) {
|
void CreateServerInterface(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IShopServiceAccessServer>(system);
|
rb.PushIpcInterface<IShopServiceAccessServer>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ private:
|
||||||
LOG_INFO(Service_NIM, "(STUBBED) called, unknown={}", unknown);
|
LOG_INFO(Service_NIM, "(STUBBED) called, unknown={}", unknown);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(false);
|
rb.Push(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -325,14 +325,14 @@ private:
|
||||||
LOG_DEBUG(Service_NIM, "called");
|
LOG_DEBUG(Service_NIM, "called");
|
||||||
finished_event.GetWritableEvent().Signal();
|
finished_event.GetWritableEvent().Signal();
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFinishNotificationEvent(Kernel::HLERequestContext& ctx) {
|
void GetFinishNotificationEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NIM, "called");
|
LOG_DEBUG(Service_NIM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(finished_event.GetReadableEvent());
|
rb.PushCopyObjects(finished_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,21 +340,21 @@ private:
|
||||||
LOG_DEBUG(Service_NIM, "called");
|
LOG_DEBUG(Service_NIM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cancel(Kernel::HLERequestContext& ctx) {
|
void Cancel(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NIM, "called");
|
LOG_DEBUG(Service_NIM, "called");
|
||||||
finished_event.GetWritableEvent().Clear();
|
finished_event.GetWritableEvent().Clear();
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsProcessing(Kernel::HLERequestContext& ctx) {
|
void IsProcessing(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NIM, "called");
|
LOG_DEBUG(Service_NIM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<u32>(0); // We instantly process the request
|
rb.PushRaw<u32>(0); // We instantly process the request
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ private:
|
||||||
std::chrono::system_clock::now().time_since_epoch())
|
std::chrono::system_clock::now().time_since_epoch())
|
||||||
.count()};
|
.count()};
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<s64>(server_time);
|
rb.PushRaw<s64>(server_time);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -389,7 +389,7 @@ private:
|
||||||
LOG_DEBUG(Service_NIM, "called");
|
LOG_DEBUG(Service_NIM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IEnsureNetworkClockAvailabilityService>(system);
|
rb.PushIpcInterface<IEnsureNetworkClockAvailabilityService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,14 +398,14 @@ private:
|
||||||
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResumeAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) {
|
void ResumeAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
LOG_WARNING(Service_NIM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC
|
||||||
"output buffer is too small! (actual={:016X}, expected_min=0x4000)", size);
|
"output buffer is too small! (actual={:016X}, expected_min=0x4000)", size);
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
// TODO(DarkLordZach): Find a better error code for this.
|
// TODO(DarkLordZach): Find a better error code for this.
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC
|
||||||
0x4000 + control.second->GetSize());
|
0x4000 + control.second->GetSize());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
// TODO(DarkLordZach): Find a better error code for this.
|
// TODO(DarkLordZach): Find a better error code for this.
|
||||||
rb.Push(RESULT_UNKNOWN);
|
rb.Push(ResultUnknown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC
|
||||||
ctx.WriteBuffer(out);
|
ctx.WriteBuffer(out);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(out.size()));
|
rb.Push<u32>(static_cast<u32>(out.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ void IApplicationManagerInterface::GetApplicationDesiredLanguage(Kernel::HLERequ
|
||||||
const auto res = GetApplicationDesiredLanguage(supported_languages);
|
const auto res = GetApplicationDesiredLanguage(supported_languages);
|
||||||
if (res.Succeeded()) {
|
if (res.Succeeded()) {
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(*res);
|
rb.Push<u32>(*res);
|
||||||
} else {
|
} else {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -432,7 +432,7 @@ void IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode(
|
||||||
const auto res = ConvertApplicationLanguageToLanguageCode(application_language);
|
const auto res = ConvertApplicationLanguageToLanguageCode(application_language);
|
||||||
if (res.Succeeded()) {
|
if (res.Succeeded()) {
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*res);
|
rb.Push(*res);
|
||||||
} else {
|
} else {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -697,7 +697,7 @@ private:
|
||||||
LOG_DEBUG(Service_NS, "called");
|
LOG_DEBUG(Service_NS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISystemUpdateControl>(system);
|
rb.PushIpcInterface<ISystemUpdateControl>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -721,7 +721,7 @@ private:
|
||||||
LOG_WARNING(Service_NS, "(STUBBED) called");
|
LOG_WARNING(Service_NS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(false);
|
rb.Push(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,7 +87,7 @@ private:
|
||||||
LOG_DEBUG(Service_NS, "called");
|
LOG_DEBUG(Service_NS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<T>(system);
|
rb.PushIpcInterface<T>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ private:
|
||||||
LOG_DEBUG(Service_NS, "called");
|
LOG_DEBUG(Service_NS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IApplicationManagerInterface>(system);
|
rb.PushIpcInterface<IApplicationManagerInterface>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ void PL_U::RequestLoad(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NS, "called, shared_font_type={}", shared_font_type);
|
LOG_DEBUG(Service_NS, "called, shared_font_type={}", shared_font_type);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PL_U::GetLoadState(Kernel::HLERequestContext& ctx) {
|
void PL_U::GetLoadState(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -225,7 +225,7 @@ void PL_U::GetLoadState(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NS, "called, font_id={}", font_id);
|
LOG_DEBUG(Service_NS, "called, font_id={}", font_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(LoadState::Done));
|
rb.Push<u32>(static_cast<u32>(LoadState::Done));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ void PL_U::GetSize(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NS, "called, font_id={}", font_id);
|
LOG_DEBUG(Service_NS, "called, font_id={}", font_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(impl->GetSharedFontRegion(font_id).size);
|
rb.Push<u32>(impl->GetSharedFontRegion(font_id).size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ void PL_U::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NS, "called, font_id={}", font_id);
|
LOG_DEBUG(Service_NS, "called, font_id={}", font_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset);
|
rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) {
|
||||||
impl->shared_font->size());
|
impl->shared_font->size());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(&kernel.GetFontSharedMem());
|
rb.PushCopyObjects(&kernel.GetFontSharedMem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(font_offsets, 1);
|
ctx.WriteBuffer(font_offsets, 1);
|
||||||
ctx.WriteBuffer(font_sizes, 2);
|
ctx.WriteBuffer(font_sizes, 2);
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u8>(static_cast<u8>(LoadState::Done)); // Fonts Loaded
|
rb.Push<u8>(static_cast<u8>(LoadState::Done)); // Fonts Loaded
|
||||||
rb.Push<u32>(static_cast<u32>(font_codes.size()));
|
rb.Push<u32>(static_cast<u32>(font_codes.size()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ void NVDRV::SignalGPUInterruptSyncpt(const u32 syncpoint_id, const u32 value) {
|
||||||
void NVDRV::Open(Kernel::HLERequestContext& ctx) {
|
void NVDRV::Open(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NVDRV, "called");
|
LOG_DEBUG(Service_NVDRV, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
|
|
||||||
if (!is_initialized) {
|
if (!is_initialized) {
|
||||||
rb.Push<DeviceFD>(0);
|
rb.Push<DeviceFD>(0);
|
||||||
|
@ -52,7 +52,7 @@ void NVDRV::Open(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
void NVDRV::ServiceError(Kernel::HLERequestContext& ctx, NvResult result) {
|
void NVDRV::ServiceError(Kernel::HLERequestContext& ctx, NvResult result) {
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(result);
|
rb.PushEnum(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void NVDRV::Ioctl1(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(nv_result);
|
rb.PushEnum(nv_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ void NVDRV::Ioctl2(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(nv_result);
|
rb.PushEnum(nv_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void NVDRV::Ioctl3(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(nv_result);
|
rb.PushEnum(nv_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ void NVDRV::Close(Kernel::HLERequestContext& ctx) {
|
||||||
const auto result = nvdrv->Close(fd);
|
const auto result = nvdrv->Close(fd);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(result);
|
rb.PushEnum(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ void NVDRV::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
is_initialized = true;
|
is_initialized = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(NvResult::Success);
|
rb.PushEnum(NvResult::Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,14 +186,14 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
if (event_id < MaxNvEvents) {
|
if (event_id < MaxNvEvents) {
|
||||||
IPC::ResponseBuilder rb{ctx, 3, 1};
|
IPC::ResponseBuilder rb{ctx, 3, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
auto& event = nvdrv->GetEvent(event_id);
|
auto& event = nvdrv->GetEvent(event_id);
|
||||||
event.Clear();
|
event.Clear();
|
||||||
rb.PushCopyObjects(event);
|
rb.PushCopyObjects(event);
|
||||||
rb.PushEnum(NvResult::Success);
|
rb.PushEnum(NvResult::Success);
|
||||||
} else {
|
} else {
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(NvResult::BadParameter);
|
rb.PushEnum(NvResult::BadParameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ void NVDRV::SetAruid(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x{:X}", pid);
|
LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x{:X}", pid);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(NvResult::Success);
|
rb.PushEnum(NvResult::Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,14 +212,14 @@ void NVDRV::SetGraphicsFirmwareMemoryMarginEnabled(Kernel::HLERequestContext& ct
|
||||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
|
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NVDRV::GetStatus(Kernel::HLERequestContext& ctx) {
|
void NVDRV::GetStatus(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
|
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(NvResult::Success);
|
rb.PushEnum(NvResult::Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ void NVDRV::DumpGraphicsMemoryInfo(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NVDRV, "called");
|
LOG_DEBUG(Service_NVDRV, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
NVDRV::NVDRV(Core::System& system_, std::shared_ptr<Module> nvdrv_, const char* name)
|
NVDRV::NVDRV(Core::System& system_, std::shared_ptr<Module> nvdrv_, const char* name)
|
||||||
|
|
|
@ -50,7 +50,7 @@ private:
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSaveDataBackupSetting(Kernel::HLERequestContext& ctx) {
|
void GetSaveDataBackupSetting(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -60,7 +60,7 @@ private:
|
||||||
constexpr u64 backup_setting = 0;
|
constexpr u64 backup_setting = 0;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(backup_setting);
|
rb.Push(backup_setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ private:
|
||||||
LOG_WARNING(Service_OLSC, "(STUBBED) called");
|
LOG_WARNING(Service_OLSC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool initialized{};
|
bool initialized{};
|
||||||
|
|
|
@ -213,7 +213,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckFreeCommunicationPermission(Kernel::HLERequestContext& ctx) {
|
void CheckFreeCommunicationPermission(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -223,7 +223,7 @@ private:
|
||||||
if (!CheckFreeCommunicationPermissionImpl()) {
|
if (!CheckFreeCommunicationPermissionImpl()) {
|
||||||
rb.Push(Error::ResultNoFreeCommunication);
|
rb.Push(Error::ResultNoFreeCommunication);
|
||||||
} else {
|
} else {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
states.free_communication = true;
|
states.free_communication = true;
|
||||||
|
@ -234,7 +234,7 @@ private:
|
||||||
states.stereo_vision = true;
|
states.stereo_vision = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsFreeCommunicationAvailable(Kernel::HLERequestContext& ctx) {
|
void IsFreeCommunicationAvailable(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -244,7 +244,7 @@ private:
|
||||||
if (!CheckFreeCommunicationPermissionImpl()) {
|
if (!CheckFreeCommunicationPermissionImpl()) {
|
||||||
rb.Push(Error::ResultNoFreeCommunication);
|
rb.Push(Error::ResultNoFreeCommunication);
|
||||||
} else {
|
} else {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ private:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsStereoVisionPermitted(Kernel::HLERequestContext& ctx) {
|
void IsStereoVisionPermitted(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -289,7 +289,7 @@ private:
|
||||||
rb.Push(Error::ResultStereoVisionRestricted);
|
rb.Push(Error::ResultStereoVisionRestricted);
|
||||||
rb.Push(false);
|
rb.Push(false);
|
||||||
} else {
|
} else {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(true);
|
rb.Push(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
SetStereoVisionRestrictionImpl(can_use);
|
SetStereoVisionRestrictionImpl(can_use);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetStereoVisionRestriction(Kernel::HLERequestContext& ctx) {
|
void GetStereoVisionRestriction(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -321,7 +321,7 @@ private:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(settings.is_stero_vision_restricted);
|
rb.Push(settings.is_stero_vision_restricted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ private:
|
||||||
states.stereo_vision = false;
|
states.stereo_vision = false;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ApplicationInfo {
|
struct ApplicationInfo {
|
||||||
|
@ -368,7 +368,7 @@ void Module::Interface::CreateService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_PCTL, "called");
|
LOG_DEBUG(Service_PCTL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
// TODO(ogniK): Get TID from process
|
// TODO(ogniK): Get TID from process
|
||||||
|
|
||||||
rb.PushIpcInterface<IParentalControlService>(system, capability);
|
rb.PushIpcInterface<IParentalControlService>(system, capability);
|
||||||
|
@ -378,7 +378,7 @@ void Module::Interface::CreateServiceWithoutInitialize(Kernel::HLERequestContext
|
||||||
LOG_DEBUG(Service_PCTL, "called");
|
LOG_DEBUG(Service_PCTL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IParentalControlService>(system, capability);
|
rb.PushIpcInterface<IParentalControlService>(system, capability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx,
|
||||||
});
|
});
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(process.has_value() ? (*process)->GetProcessID() : NO_PROCESS_FOUND_PID);
|
rb.Push(process.has_value() ? (*process)->GetProcessID() : NO_PROCESS_FOUND_PID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ private:
|
||||||
LOG_DEBUG(Service_PM, "called");
|
LOG_DEBUG(Service_PM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(boot_mode);
|
rb.PushEnum(boot_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ private:
|
||||||
boot_mode = SystemBootMode::Maintenance;
|
boot_mode = SystemBootMode::Maintenance;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemBootMode boot_mode = SystemBootMode::Normal;
|
SystemBootMode boot_mode = SystemBootMode::Normal;
|
||||||
|
@ -111,7 +111,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push((*process)->GetProcessID());
|
rb.Push((*process)->GetProcessID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push((*process)->GetTitleID());
|
rb.Push((*process)->GetTitleID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ private:
|
||||||
process_id);
|
process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <Core::Reporter::PlayReportType Type>
|
template <Core::Reporter::PlayReportType Type>
|
||||||
|
@ -105,14 +105,14 @@ private:
|
||||||
process_id, user_id);
|
process_id, user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestImmediateTransmission(Kernel::HLERequestContext& ctx) {
|
void RequestImmediateTransmission(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_PREPO, "(STUBBED) called");
|
LOG_WARNING(Service_PREPO, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTransmissionStatus(Kernel::HLERequestContext& ctx) {
|
void GetTransmissionStatus(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -121,7 +121,7 @@ private:
|
||||||
constexpr s32 status = 0;
|
constexpr s32 status = 0;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(status);
|
rb.Push(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ private:
|
||||||
|
|
||||||
constexpr u64 system_session_id = 0;
|
constexpr u64 system_session_id = 0;
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(system_session_id);
|
rb.Push(system_session_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
reporter.SavePlayReport(Core::Reporter::PlayReportType::System, title_id, {data1, data2});
|
reporter.SavePlayReport(Core::Reporter::PlayReportType::System, title_id, {data1, data2});
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveSystemReportWithUser(Kernel::HLERequestContext& ctx) {
|
void SaveSystemReportWithUser(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -181,7 +181,7 @@ private:
|
||||||
std::nullopt, user_id);
|
std::nullopt, user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ private:
|
||||||
LOG_DEBUG(Service_PSC, "called");
|
LOG_DEBUG(Service_PSC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IPmModule>(system);
|
rb.PushIpcInterface<IPmModule>(system);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,7 +64,7 @@ private:
|
||||||
should_signal = true;
|
should_signal = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushCopyObjects(state_change_event.GetReadableEvent());
|
rb.PushCopyObjects(state_change_event.GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ private:
|
||||||
should_signal = false;
|
should_signal = false;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetChargerTypeChangeEventEnabled(Kernel::HLERequestContext& ctx) {
|
void SetChargerTypeChangeEventEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -85,7 +85,7 @@ private:
|
||||||
should_signal_charger_type = state;
|
should_signal_charger_type = state;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetPowerSupplyChangeEventEnabled(Kernel::HLERequestContext& ctx) {
|
void SetPowerSupplyChangeEventEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -96,7 +96,7 @@ private:
|
||||||
should_signal_power_supply = state;
|
should_signal_power_supply = state;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBatteryVoltageStateChangeEventEnabled(Kernel::HLERequestContext& ctx) {
|
void SetBatteryVoltageStateChangeEventEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -107,7 +107,7 @@ private:
|
||||||
should_signal_battery_voltage = state;
|
should_signal_battery_voltage = state;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool should_signal_charger_type{};
|
bool should_signal_charger_type{};
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
LOG_DEBUG(Service_PSM, "called");
|
LOG_DEBUG(Service_PSM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(battery_charge_percentage);
|
rb.Push<u32>(battery_charge_percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ private:
|
||||||
LOG_DEBUG(Service_PSM, "called");
|
LOG_DEBUG(Service_PSM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(charger_type);
|
rb.PushEnum(charger_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ private:
|
||||||
LOG_DEBUG(Service_PSM, "called");
|
LOG_DEBUG(Service_PSM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IPsmSession>(system);
|
rb.PushIpcInterface<IPsmSession>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext
|
||||||
if (Settings::values.use_auto_stub) {
|
if (Settings::values.use_auto_stub) {
|
||||||
LOG_WARNING(Service, "Using auto stub fallback!");
|
LOG_WARNING(Service, "Using auto stub fallback!");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& sessi
|
||||||
case IPC::CommandType::TIPC_Close: {
|
case IPC::CommandType::TIPC_Close: {
|
||||||
session.Close();
|
session.Close();
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
return IPC::ERR_REMOTE_PROCESS_DEAD;
|
return IPC::ERR_REMOTE_PROCESS_DEAD;
|
||||||
}
|
}
|
||||||
case IPC::CommandType::ControlWithContext:
|
case IPC::CommandType::ControlWithContext:
|
||||||
|
@ -228,7 +228,7 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& sessi
|
||||||
ctx.WriteToOutgoingCommandBuffer(ctx.GetThread());
|
ctx.WriteToOutgoingCommandBuffer(ctx.GetThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize Services
|
/// Initialize Services
|
||||||
|
|
|
@ -77,7 +77,7 @@ constexpr ResultCode ERR_INVALID_LANGUAGE{ErrorModule::Settings, 625};
|
||||||
|
|
||||||
void PushResponseLanguageCode(Kernel::HLERequestContext& ctx, std::size_t num_language_codes) {
|
void PushResponseLanguageCode(Kernel::HLERequestContext& ctx, std::size_t num_language_codes) {
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(num_language_codes));
|
rb.Push(static_cast<u32>(num_language_codes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ void GetKeyCodeMapImpl(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(layout);
|
ctx.WriteBuffer(layout);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void SET::MakeLanguageCode(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(available_language_codes[index]);
|
rb.PushEnum(available_language_codes[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ void SET::GetQuestFlag(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_SET, "called");
|
LOG_DEBUG(Service_SET, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(static_cast<u32>(Settings::values.quest_flag));
|
rb.Push(static_cast<u32>(Settings::values.quest_flag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_SET, "called {}", Settings::values.language_index.GetValue());
|
LOG_DEBUG(Service_SET, "called {}", Settings::values.language_index.GetValue());
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(available_language_codes[Settings::values.language_index.GetValue()]);
|
rb.PushEnum(available_language_codes[Settings::values.language_index.GetValue()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ void SET::GetRegionCode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_SET, "called");
|
LOG_DEBUG(Service_SET, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(Settings::values.region_index.GetValue());
|
rb.Push(Settings::values.region_index.GetValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ void GetFirmwareVersionImpl(Kernel::HLERequestContext& ctx, GetFirmwareVersionTy
|
||||||
ctx.WriteBuffer(data);
|
ctx.WriteBuffer(data);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(color_set);
|
rb.PushEnum(color_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) {
|
||||||
color_set = rp.PopEnum<ColorSet>();
|
color_set = rp.PopEnum<ColorSet>();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
SET_SYS::SET_SYS(Core::System& system_) : ServiceFramework{system_, "set:sys"} {
|
SET_SYS::SET_SYS(Core::System& system_) : ServiceFramework{system_, "set:sys"} {
|
||||||
|
|
|
@ -23,7 +23,7 @@ void Controller::ConvertCurrentObjectToDomain(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.Session()->ConvertToDomain();
|
ctx.Session()->ConvertToDomain();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(1); // Converted sessions start with 1 request handler
|
rb.Push<u32>(1); // Converted sessions start with 1 request handler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
// We succeeded.
|
// We succeeded.
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushMoveObjects(clone->GetClientSession());
|
rb.PushMoveObjects(clone->GetClientSession());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service, "(STUBBED) called");
|
LOG_WARNING(Service, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u16>(0x8000);
|
rb.Push<u16>(0x8000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ static ResultCode ValidateServiceName(const std::string& name) {
|
||||||
LOG_ERROR(Service_SM, "Invalid service name! service={}", name);
|
LOG_ERROR(Service_SM, "Invalid service name! service={}", name);
|
||||||
return ERR_INVALID_NAME;
|
return ERR_INVALID_NAME;
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
Kernel::KClientPort& ServiceManager::InterfaceFactory(ServiceManager& self, Core::System& system) {
|
Kernel::KClientPort& ServiceManager::InterfaceFactory(ServiceManager& self, Core::System& system) {
|
||||||
|
@ -79,7 +79,7 @@ ResultCode ServiceManager::UnregisterService(const std::string& name) {
|
||||||
iter->second->Close();
|
iter->second->Close();
|
||||||
|
|
||||||
registered_services.erase(iter);
|
registered_services.erase(iter);
|
||||||
return RESULT_SUCCESS;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultVal<Kernel::KPort*> ServiceManager::GetServicePort(const std::string& name) {
|
ResultVal<Kernel::KPort*> ServiceManager::GetServicePort(const std::string& name) {
|
||||||
|
@ -109,7 +109,7 @@ void SM::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
is_initialized = true;
|
is_initialized = true;
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SM::GetService(Kernel::HLERequestContext& ctx) {
|
void SM::GetService(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
rb.Push<u32>(static_cast<u32>(write_buffer.size()));
|
rb.Push<u32>(static_cast<u32>(write_buffer.size()));
|
||||||
|
@ -74,7 +74,7 @@ void BSD::ConnectWork::Execute(BSD* bsd) {
|
||||||
|
|
||||||
void BSD::ConnectWork::Response(Kernel::HLERequestContext& ctx) {
|
void BSD::ConnectWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1);
|
rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ void BSD::RecvWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(message);
|
ctx.WriteBuffer(message);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ void BSD::RecvFromWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
rb.Push<u32>(static_cast<u32>(addr.size()));
|
rb.Push<u32>(static_cast<u32>(addr.size()));
|
||||||
|
@ -115,7 +115,7 @@ void BSD::SendWork::Execute(BSD* bsd) {
|
||||||
|
|
||||||
void BSD::SendWork::Response(Kernel::HLERequestContext& ctx) {
|
void BSD::SendWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ void BSD::SendToWork::Execute(BSD* bsd) {
|
||||||
|
|
||||||
void BSD::SendToWork::Response(Kernel::HLERequestContext& ctx) {
|
void BSD::SendToWork::Response(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ void BSD::RegisterClient(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(0); // bsd errno
|
rb.Push<s32>(0); // bsd errno
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSD::Socket(Kernel::HLERequestContext& ctx) {
|
void BSD::Socket(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -160,7 +160,7 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) {
|
||||||
static_cast<Protocol>(protocol));
|
static_cast<Protocol>(protocol));
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(fd);
|
rb.Push<s32>(fd);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ void BSD::Select(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(0); // ret
|
rb.Push<u32>(0); // ret
|
||||||
rb.Push<u32>(0); // bsd errno
|
rb.Push<u32>(0); // bsd errno
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ void BSD::GetPeerName(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(write_buffer);
|
ctx.WriteBuffer(write_buffer);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0);
|
rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
rb.Push<u32>(static_cast<u32>(write_buffer.size()));
|
rb.Push<u32>(static_cast<u32>(write_buffer.size()));
|
||||||
|
@ -253,7 +253,7 @@ void BSD::GetSockName(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(write_buffer);
|
ctx.WriteBuffer(write_buffer);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0);
|
rb.Push<s32>(bsd_errno != Errno::SUCCESS ? -1 : 0);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
rb.Push<u32>(static_cast<u32>(write_buffer.size()));
|
rb.Push<u32>(static_cast<u32>(write_buffer.size()));
|
||||||
|
@ -272,7 +272,7 @@ void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(optval);
|
ctx.WriteBuffer(optval);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 5};
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(-1);
|
rb.Push<s32>(-1);
|
||||||
rb.PushEnum(Errno::NOTCONN);
|
rb.PushEnum(Errno::NOTCONN);
|
||||||
rb.Push<u32>(static_cast<u32>(optval.size()));
|
rb.Push<u32>(static_cast<u32>(optval.size()));
|
||||||
|
@ -299,7 +299,7 @@ void BSD::Fcntl(Kernel::HLERequestContext& ctx) {
|
||||||
const auto [ret, bsd_errno] = FcntlImpl(fd, static_cast<FcntlCmd>(cmd), arg);
|
const auto [ret, bsd_errno] = FcntlImpl(fd, static_cast<FcntlCmd>(cmd), arg);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(ret);
|
rb.Push<s32>(ret);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
@ -822,7 +822,7 @@ bool BSD::IsFileDescriptorValid(s32 fd) const noexcept {
|
||||||
void BSD::BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept {
|
void BSD::BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept {
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1);
|
rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1);
|
||||||
rb.PushEnum(bsd_errno);
|
rb.PushEnum(bsd_errno);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ void SFDNSRES::GetAddrInfoRequest(Kernel::HLERequestContext& ctx) {
|
||||||
parameters.use_nsd_resolve, parameters.unknown, parameters.process_id);
|
parameters.use_nsd_resolve, parameters.unknown, parameters.process_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::Sockets
|
} // namespace Service::Sockets
|
||||||
|
|
|
@ -36,7 +36,7 @@ void Module::Interface::GetRandomBytes(Kernel::HLERequestContext& ctx) {
|
||||||
ctx.WriteBuffer(data);
|
ctx.WriteBuffer(data);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
|
||||||
|
|
|
@ -89,14 +89,14 @@ private:
|
||||||
parameters.option);
|
parameters.option);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateConnection(Kernel::HLERequestContext& ctx) {
|
void CreateConnection(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_SSL, "(STUBBED) called");
|
LOG_WARNING(Service_SSL, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISslConnection>(system);
|
rb.PushIpcInterface<ISslConnection>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ private:
|
||||||
LOG_WARNING(Service_SSL, "(STUBBED) called, certificate_format={}", certificate_format);
|
LOG_WARNING(Service_SSL, "(STUBBED) called, certificate_format={}", certificate_format);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(server_id);
|
rb.Push(server_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ private:
|
||||||
LOG_WARNING(Service_SSL, "(STUBBED) called");
|
LOG_WARNING(Service_SSL, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(client_id);
|
rb.Push(client_id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -160,7 +160,7 @@ private:
|
||||||
LOG_WARNING(Service_SSL, "(STUBBED) called");
|
LOG_WARNING(Service_SSL, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISslContext>(system);
|
rb.PushIpcInterface<ISslContext>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ private:
|
||||||
ssl_version = rp.Pop<u32>();
|
ssl_version = rp.Pop<u32>();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue