diff options
148 files changed, 1669 insertions, 1734 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index cdebb0bd8..194cdd025 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -158,7 +158,6 @@ add_library(core STATIC | |||
| 158 | hid/motion_input.h | 158 | hid/motion_input.h |
| 159 | hle/api_version.h | 159 | hle/api_version.h |
| 160 | hle/ipc.h | 160 | hle/ipc.h |
| 161 | hle/ipc_helpers.h | ||
| 162 | hle/kernel/board/nintendo/nx/k_memory_layout.h | 161 | hle/kernel/board/nintendo/nx/k_memory_layout.h |
| 163 | hle/kernel/board/nintendo/nx/k_system_control.cpp | 162 | hle/kernel/board/nintendo/nx/k_system_control.cpp |
| 164 | hle/kernel/board/nintendo/nx/k_system_control.h | 163 | hle/kernel/board/nintendo/nx/k_system_control.h |
| @@ -168,8 +167,6 @@ add_library(core STATIC | |||
| 168 | hle/kernel/svc_results.h | 167 | hle/kernel/svc_results.h |
| 169 | hle/kernel/global_scheduler_context.cpp | 168 | hle/kernel/global_scheduler_context.cpp |
| 170 | hle/kernel/global_scheduler_context.h | 169 | hle/kernel/global_scheduler_context.h |
| 171 | hle/kernel/hle_ipc.cpp | ||
| 172 | hle/kernel/hle_ipc.h | ||
| 173 | hle/kernel/init/init_slab_setup.cpp | 170 | hle/kernel/init/init_slab_setup.cpp |
| 174 | hle/kernel/init/init_slab_setup.h | 171 | hle/kernel/init/init_slab_setup.h |
| 175 | hle/kernel/initial_process.h | 172 | hle/kernel/initial_process.h |
| @@ -680,6 +677,9 @@ add_library(core STATIC | |||
| 680 | hle/service/ptm/ptm.h | 677 | hle/service/ptm/ptm.h |
| 681 | hle/service/ptm/ts.cpp | 678 | hle/service/ptm/ts.cpp |
| 682 | hle/service/ptm/ts.h | 679 | hle/service/ptm/ts.h |
| 680 | hle/service/hle_ipc.cpp | ||
| 681 | hle/service/hle_ipc.h | ||
| 682 | hle/service/ipc_helpers.h | ||
| 683 | hle/service/kernel_helpers.cpp | 683 | hle/service/kernel_helpers.cpp |
| 684 | hle/service/kernel_helpers.h | 684 | hle/service/kernel_helpers.h |
| 685 | hle/service/mutex.cpp | 685 | hle/service/mutex.cpp |
diff --git a/src/core/hle/kernel/k_client_port.cpp b/src/core/hle/kernel/k_client_port.cpp index c72a91a76..700ae71e3 100644 --- a/src/core/hle/kernel/k_client_port.cpp +++ b/src/core/hle/kernel/k_client_port.cpp | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/scope_exit.h" | 4 | #include "common/scope_exit.h" |
| 5 | #include "core/hle/kernel/hle_ipc.h" | ||
| 6 | #include "core/hle/kernel/k_client_port.h" | 5 | #include "core/hle/kernel/k_client_port.h" |
| 7 | #include "core/hle/kernel/k_port.h" | 6 | #include "core/hle/kernel/k_port.h" |
| 8 | #include "core/hle/kernel/k_scheduler.h" | 7 | #include "core/hle/kernel/k_scheduler.h" |
diff --git a/src/core/hle/kernel/k_client_port.h b/src/core/hle/kernel/k_client_port.h index 81046fb86..a757cf9cd 100644 --- a/src/core/hle/kernel/k_client_port.h +++ b/src/core/hle/kernel/k_client_port.h | |||
| @@ -15,7 +15,6 @@ namespace Kernel { | |||
| 15 | class KClientSession; | 15 | class KClientSession; |
| 16 | class KernelCore; | 16 | class KernelCore; |
| 17 | class KPort; | 17 | class KPort; |
| 18 | class SessionRequestManager; | ||
| 19 | 18 | ||
| 20 | class KClientPort final : public KSynchronizationObject { | 19 | class KClientPort final : public KSynchronizationObject { |
| 21 | KERNEL_AUTOOBJECT_TRAITS(KClientPort, KSynchronizationObject); | 20 | KERNEL_AUTOOBJECT_TRAITS(KClientPort, KSynchronizationObject); |
diff --git a/src/core/hle/kernel/k_client_session.cpp b/src/core/hle/kernel/k_client_session.cpp index b4197a8d5..da0c9ac8c 100644 --- a/src/core/hle/kernel/k_client_session.cpp +++ b/src/core/hle/kernel/k_client_session.cpp | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/scope_exit.h" | 4 | #include "common/scope_exit.h" |
| 5 | #include "core/hle/kernel/hle_ipc.h" | ||
| 6 | #include "core/hle/kernel/k_client_session.h" | 5 | #include "core/hle/kernel/k_client_session.h" |
| 7 | #include "core/hle/kernel/k_server_session.h" | 6 | #include "core/hle/kernel/k_server_session.h" |
| 8 | #include "core/hle/kernel/k_session.h" | 7 | #include "core/hle/kernel/k_session.h" |
diff --git a/src/core/hle/kernel/k_port.cpp b/src/core/hle/kernel/k_port.cpp index 77d00ae2c..0a45ffd57 100644 --- a/src/core/hle/kernel/k_port.cpp +++ b/src/core/hle/kernel/k_port.cpp | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/kernel/hle_ipc.h" | ||
| 5 | #include "core/hle/kernel/k_port.h" | 4 | #include "core/hle/kernel/k_port.h" |
| 6 | #include "core/hle/kernel/k_scheduler.h" | 5 | #include "core/hle/kernel/k_scheduler.h" |
| 7 | #include "core/hle/kernel/svc_results.h" | 6 | #include "core/hle/kernel/svc_results.h" |
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index aa1941f01..01591af5b 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp | |||
| @@ -10,8 +10,6 @@ | |||
| 10 | #include "common/scope_exit.h" | 10 | #include "common/scope_exit.h" |
| 11 | #include "core/core.h" | 11 | #include "core/core.h" |
| 12 | #include "core/core_timing.h" | 12 | #include "core/core_timing.h" |
| 13 | #include "core/hle/ipc_helpers.h" | ||
| 14 | #include "core/hle/kernel/hle_ipc.h" | ||
| 15 | #include "core/hle/kernel/k_client_port.h" | 13 | #include "core/hle/kernel/k_client_port.h" |
| 16 | #include "core/hle/kernel/k_handle_table.h" | 14 | #include "core/hle/kernel/k_handle_table.h" |
| 17 | #include "core/hle/kernel/k_process.h" | 15 | #include "core/hle/kernel/k_process.h" |
| @@ -22,6 +20,8 @@ | |||
| 22 | #include "core/hle/kernel/k_thread.h" | 20 | #include "core/hle/kernel/k_thread.h" |
| 23 | #include "core/hle/kernel/k_thread_queue.h" | 21 | #include "core/hle/kernel/k_thread_queue.h" |
| 24 | #include "core/hle/kernel/kernel.h" | 22 | #include "core/hle/kernel/kernel.h" |
| 23 | #include "core/hle/service/hle_ipc.h" | ||
| 24 | #include "core/hle/service/ipc_helpers.h" | ||
| 25 | #include "core/memory.h" | 25 | #include "core/memory.h" |
| 26 | 26 | ||
| 27 | namespace Kernel { | 27 | namespace Kernel { |
| @@ -281,8 +281,8 @@ Result KServerSession::SendReply(bool is_hle) { | |||
| 281 | return result; | 281 | return result; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | Result KServerSession::ReceiveRequest(std::shared_ptr<HLERequestContext>* out_context, | 284 | Result KServerSession::ReceiveRequest(std::shared_ptr<Service::HLERequestContext>* out_context, |
| 285 | std::weak_ptr<SessionRequestManager> manager) { | 285 | std::weak_ptr<Service::SessionRequestManager> manager) { |
| 286 | // Lock the session. | 286 | // Lock the session. |
| 287 | KScopedLightLock lk{m_lock}; | 287 | KScopedLightLock lk{m_lock}; |
| 288 | 288 | ||
| @@ -329,7 +329,8 @@ Result KServerSession::ReceiveRequest(std::shared_ptr<HLERequestContext>* out_co | |||
| 329 | if (out_context != nullptr) { | 329 | if (out_context != nullptr) { |
| 330 | // HLE request. | 330 | // HLE request. |
| 331 | u32* cmd_buf{reinterpret_cast<u32*>(memory.GetPointer(client_message))}; | 331 | u32* cmd_buf{reinterpret_cast<u32*>(memory.GetPointer(client_message))}; |
| 332 | *out_context = std::make_shared<HLERequestContext>(kernel, memory, this, client_thread); | 332 | *out_context = |
| 333 | std::make_shared<Service::HLERequestContext>(kernel, memory, this, client_thread); | ||
| 333 | (*out_context)->SetSessionRequestManager(manager); | 334 | (*out_context)->SetSessionRequestManager(manager); |
| 334 | (*out_context) | 335 | (*out_context) |
| 335 | ->PopulateFromIncomingCommandBuffer(client_thread->GetOwnerProcess()->GetHandleTable(), | 336 | ->PopulateFromIncomingCommandBuffer(client_thread->GetOwnerProcess()->GetHandleTable(), |
diff --git a/src/core/hle/kernel/k_server_session.h b/src/core/hle/kernel/k_server_session.h index 6e189af8b..33f380352 100644 --- a/src/core/hle/kernel/k_server_session.h +++ b/src/core/hle/kernel/k_server_session.h | |||
| @@ -10,18 +10,20 @@ | |||
| 10 | 10 | ||
| 11 | #include <boost/intrusive/list.hpp> | 11 | #include <boost/intrusive/list.hpp> |
| 12 | 12 | ||
| 13 | #include "core/hle/kernel/hle_ipc.h" | ||
| 14 | #include "core/hle/kernel/k_light_lock.h" | 13 | #include "core/hle/kernel/k_light_lock.h" |
| 15 | #include "core/hle/kernel/k_session_request.h" | 14 | #include "core/hle/kernel/k_session_request.h" |
| 16 | #include "core/hle/kernel/k_synchronization_object.h" | 15 | #include "core/hle/kernel/k_synchronization_object.h" |
| 17 | #include "core/hle/result.h" | 16 | #include "core/hle/result.h" |
| 18 | 17 | ||
| 18 | namespace Service { | ||
| 19 | class HLERequestContext; | ||
| 20 | class SessionRequestManager; | ||
| 21 | } // namespace Service | ||
| 22 | |||
| 19 | namespace Kernel { | 23 | namespace Kernel { |
| 20 | 24 | ||
| 21 | class HLERequestContext; | ||
| 22 | class KernelCore; | 25 | class KernelCore; |
| 23 | class KSession; | 26 | class KSession; |
| 24 | class SessionRequestManager; | ||
| 25 | class KThread; | 27 | class KThread; |
| 26 | 28 | ||
| 27 | class KServerSession final : public KSynchronizationObject, | 29 | class KServerSession final : public KSynchronizationObject, |
| @@ -52,8 +54,8 @@ public: | |||
| 52 | /// TODO: flesh these out to match the real kernel | 54 | /// TODO: flesh these out to match the real kernel |
| 53 | Result OnRequest(KSessionRequest* request); | 55 | Result OnRequest(KSessionRequest* request); |
| 54 | Result SendReply(bool is_hle = false); | 56 | Result SendReply(bool is_hle = false); |
| 55 | Result ReceiveRequest(std::shared_ptr<HLERequestContext>* out_context = nullptr, | 57 | Result ReceiveRequest(std::shared_ptr<Service::HLERequestContext>* out_context = nullptr, |
| 56 | std::weak_ptr<SessionRequestManager> manager = {}); | 58 | std::weak_ptr<Service::SessionRequestManager> manager = {}); |
| 57 | 59 | ||
| 58 | Result SendReplyHLE() { | 60 | Result SendReplyHLE() { |
| 59 | return SendReply(true); | 61 | return SendReply(true); |
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index c3e5c4462..ddc3a6dbe 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include "core/core_timing.h" | 15 | #include "core/core_timing.h" |
| 16 | #include "core/file_sys/control_metadata.h" | 16 | #include "core/file_sys/control_metadata.h" |
| 17 | #include "core/file_sys/patch_manager.h" | 17 | #include "core/file_sys/patch_manager.h" |
| 18 | #include "core/hle/ipc_helpers.h" | ||
| 19 | #include "core/hle/service/acc/acc.h" | 18 | #include "core/hle/service/acc/acc.h" |
| 20 | #include "core/hle/service/acc/acc_aa.h" | 19 | #include "core/hle/service/acc/acc_aa.h" |
| 21 | #include "core/hle/service/acc/acc_su.h" | 20 | #include "core/hle/service/acc/acc_su.h" |
| @@ -25,6 +24,7 @@ | |||
| 25 | #include "core/hle/service/acc/errors.h" | 24 | #include "core/hle/service/acc/errors.h" |
| 26 | #include "core/hle/service/acc/profile_manager.h" | 25 | #include "core/hle/service/acc/profile_manager.h" |
| 27 | #include "core/hle/service/glue/glue_manager.h" | 26 | #include "core/hle/service/glue/glue_manager.h" |
| 27 | #include "core/hle/service/ipc_helpers.h" | ||
| 28 | #include "core/hle/service/server_manager.h" | 28 | #include "core/hle/service/server_manager.h" |
| 29 | #include "core/loader/loader.h" | 29 | #include "core/loader/loader.h" |
| 30 | 30 | ||
| @@ -295,7 +295,7 @@ public: | |||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | protected: | 297 | protected: |
| 298 | void Get(Kernel::HLERequestContext& ctx) { | 298 | void Get(HLERequestContext& ctx) { |
| 299 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 299 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| 300 | ProfileBase profile_base{}; | 300 | ProfileBase profile_base{}; |
| 301 | UserData data{}; | 301 | UserData data{}; |
| @@ -312,7 +312,7 @@ protected: | |||
| 312 | } | 312 | } |
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | void GetBase(Kernel::HLERequestContext& ctx) { | 315 | void GetBase(HLERequestContext& ctx) { |
| 316 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 316 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| 317 | ProfileBase profile_base{}; | 317 | ProfileBase profile_base{}; |
| 318 | if (profile_manager.GetProfileBase(user_id, profile_base)) { | 318 | if (profile_manager.GetProfileBase(user_id, profile_base)) { |
| @@ -326,7 +326,7 @@ protected: | |||
| 326 | } | 326 | } |
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | void LoadImage(Kernel::HLERequestContext& ctx) { | 329 | void LoadImage(HLERequestContext& ctx) { |
| 330 | LOG_DEBUG(Service_ACC, "called"); | 330 | LOG_DEBUG(Service_ACC, "called"); |
| 331 | 331 | ||
| 332 | IPC::ResponseBuilder rb{ctx, 3}; | 332 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -353,7 +353,7 @@ protected: | |||
| 353 | rb.Push<u32>(size); | 353 | rb.Push<u32>(size); |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | void GetImageSize(Kernel::HLERequestContext& ctx) { | 356 | void GetImageSize(HLERequestContext& ctx) { |
| 357 | LOG_DEBUG(Service_ACC, "called"); | 357 | LOG_DEBUG(Service_ACC, "called"); |
| 358 | IPC::ResponseBuilder rb{ctx, 3}; | 358 | IPC::ResponseBuilder rb{ctx, 3}; |
| 359 | rb.Push(ResultSuccess); | 359 | rb.Push(ResultSuccess); |
| @@ -370,7 +370,7 @@ protected: | |||
| 370 | } | 370 | } |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | void Store(Kernel::HLERequestContext& ctx) { | 373 | void Store(HLERequestContext& ctx) { |
| 374 | IPC::RequestParser rp{ctx}; | 374 | IPC::RequestParser rp{ctx}; |
| 375 | const auto base = rp.PopRaw<ProfileBase>(); | 375 | const auto base = rp.PopRaw<ProfileBase>(); |
| 376 | 376 | ||
| @@ -402,7 +402,7 @@ protected: | |||
| 402 | rb.Push(ResultSuccess); | 402 | rb.Push(ResultSuccess); |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | void StoreWithImage(Kernel::HLERequestContext& ctx) { | 405 | void StoreWithImage(HLERequestContext& ctx) { |
| 406 | IPC::RequestParser rp{ctx}; | 406 | IPC::RequestParser rp{ctx}; |
| 407 | const auto base = rp.PopRaw<ProfileBase>(); | 407 | const auto base = rp.PopRaw<ProfileBase>(); |
| 408 | 408 | ||
| @@ -499,7 +499,7 @@ public: | |||
| 499 | } | 499 | } |
| 500 | ~EnsureTokenIdCacheAsyncInterface() = default; | 500 | ~EnsureTokenIdCacheAsyncInterface() = default; |
| 501 | 501 | ||
| 502 | void LoadIdTokenCache(Kernel::HLERequestContext& ctx) { | 502 | void LoadIdTokenCache(HLERequestContext& ctx) { |
| 503 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 503 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 504 | 504 | ||
| 505 | IPC::ResponseBuilder rb{ctx, 2}; | 505 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -542,14 +542,14 @@ public: | |||
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | private: | 544 | private: |
| 545 | void CheckAvailability(Kernel::HLERequestContext& ctx) { | 545 | void CheckAvailability(HLERequestContext& ctx) { |
| 546 | LOG_DEBUG(Service_ACC, "(STUBBED) called"); | 546 | LOG_DEBUG(Service_ACC, "(STUBBED) called"); |
| 547 | IPC::ResponseBuilder rb{ctx, 3}; | 547 | IPC::ResponseBuilder rb{ctx, 3}; |
| 548 | rb.Push(ResultSuccess); | 548 | rb.Push(ResultSuccess); |
| 549 | rb.Push(false); // TODO: Check when this is supposed to return true and when not | 549 | rb.Push(false); // TODO: Check when this is supposed to return true and when not |
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | void GetAccountId(Kernel::HLERequestContext& ctx) { | 552 | void GetAccountId(HLERequestContext& ctx) { |
| 553 | LOG_DEBUG(Service_ACC, "called"); | 553 | LOG_DEBUG(Service_ACC, "called"); |
| 554 | 554 | ||
| 555 | IPC::ResponseBuilder rb{ctx, 4}; | 555 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -557,7 +557,7 @@ private: | |||
| 557 | rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash()); | 557 | rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash()); |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | void EnsureIdTokenCacheAsync(Kernel::HLERequestContext& ctx) { | 560 | void EnsureIdTokenCacheAsync(HLERequestContext& ctx) { |
| 561 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 561 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 562 | 562 | ||
| 563 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 563 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -565,13 +565,13 @@ private: | |||
| 565 | rb.PushIpcInterface(ensure_token_id); | 565 | rb.PushIpcInterface(ensure_token_id); |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | void LoadIdTokenCache(Kernel::HLERequestContext& ctx) { | 568 | void LoadIdTokenCache(HLERequestContext& ctx) { |
| 569 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 569 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 570 | 570 | ||
| 571 | ensure_token_id->LoadIdTokenCache(ctx); | 571 | ensure_token_id->LoadIdTokenCache(ctx); |
| 572 | } | 572 | } |
| 573 | 573 | ||
| 574 | void GetNintendoAccountUserResourceCacheForApplication(Kernel::HLERequestContext& ctx) { | 574 | void GetNintendoAccountUserResourceCacheForApplication(HLERequestContext& ctx) { |
| 575 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 575 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 576 | 576 | ||
| 577 | std::vector<u8> nas_user_base_for_application(0x68); | 577 | std::vector<u8> nas_user_base_for_application(0x68); |
| @@ -587,7 +587,7 @@ private: | |||
| 587 | rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash()); | 587 | rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash()); |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | void StoreOpenContext(Kernel::HLERequestContext& ctx) { | 590 | void StoreOpenContext(HLERequestContext& ctx) { |
| 591 | LOG_DEBUG(Service_ACC, "called"); | 591 | LOG_DEBUG(Service_ACC, "called"); |
| 592 | 592 | ||
| 593 | profile_manager->StoreOpenedUsers(); | 593 | profile_manager->StoreOpenedUsers(); |
| @@ -689,14 +689,14 @@ public: | |||
| 689 | } | 689 | } |
| 690 | }; | 690 | }; |
| 691 | 691 | ||
| 692 | void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) { | 692 | void Module::Interface::GetUserCount(HLERequestContext& ctx) { |
| 693 | LOG_DEBUG(Service_ACC, "called"); | 693 | LOG_DEBUG(Service_ACC, "called"); |
| 694 | IPC::ResponseBuilder rb{ctx, 3}; | 694 | IPC::ResponseBuilder rb{ctx, 3}; |
| 695 | rb.Push(ResultSuccess); | 695 | rb.Push(ResultSuccess); |
| 696 | rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount())); | 696 | rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount())); |
| 697 | } | 697 | } |
| 698 | 698 | ||
| 699 | void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { | 699 | void Module::Interface::GetUserExistence(HLERequestContext& ctx) { |
| 700 | IPC::RequestParser rp{ctx}; | 700 | IPC::RequestParser rp{ctx}; |
| 701 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); | 701 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| 702 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 702 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| @@ -706,28 +706,28 @@ void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { | |||
| 706 | rb.Push(profile_manager->UserExists(user_id)); | 706 | rb.Push(profile_manager->UserExists(user_id)); |
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) { | 709 | void Module::Interface::ListAllUsers(HLERequestContext& ctx) { |
| 710 | LOG_DEBUG(Service_ACC, "called"); | 710 | LOG_DEBUG(Service_ACC, "called"); |
| 711 | ctx.WriteBuffer(profile_manager->GetAllUsers()); | 711 | ctx.WriteBuffer(profile_manager->GetAllUsers()); |
| 712 | IPC::ResponseBuilder rb{ctx, 2}; | 712 | IPC::ResponseBuilder rb{ctx, 2}; |
| 713 | rb.Push(ResultSuccess); | 713 | rb.Push(ResultSuccess); |
| 714 | } | 714 | } |
| 715 | 715 | ||
| 716 | void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) { | 716 | void Module::Interface::ListOpenUsers(HLERequestContext& ctx) { |
| 717 | LOG_DEBUG(Service_ACC, "called"); | 717 | LOG_DEBUG(Service_ACC, "called"); |
| 718 | ctx.WriteBuffer(profile_manager->GetOpenUsers()); | 718 | ctx.WriteBuffer(profile_manager->GetOpenUsers()); |
| 719 | IPC::ResponseBuilder rb{ctx, 2}; | 719 | IPC::ResponseBuilder rb{ctx, 2}; |
| 720 | rb.Push(ResultSuccess); | 720 | rb.Push(ResultSuccess); |
| 721 | } | 721 | } |
| 722 | 722 | ||
| 723 | void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { | 723 | void Module::Interface::GetLastOpenedUser(HLERequestContext& ctx) { |
| 724 | LOG_DEBUG(Service_ACC, "called"); | 724 | LOG_DEBUG(Service_ACC, "called"); |
| 725 | IPC::ResponseBuilder rb{ctx, 6}; | 725 | IPC::ResponseBuilder rb{ctx, 6}; |
| 726 | rb.Push(ResultSuccess); | 726 | rb.Push(ResultSuccess); |
| 727 | rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser()); | 727 | rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser()); |
| 728 | } | 728 | } |
| 729 | 729 | ||
| 730 | void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) { | 730 | void Module::Interface::GetProfile(HLERequestContext& ctx) { |
| 731 | IPC::RequestParser rp{ctx}; | 731 | IPC::RequestParser rp{ctx}; |
| 732 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); | 732 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| 733 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 733 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| @@ -737,20 +737,20 @@ void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) { | |||
| 737 | rb.PushIpcInterface<IProfile>(system, user_id, *profile_manager); | 737 | rb.PushIpcInterface<IProfile>(system, user_id, *profile_manager); |
| 738 | } | 738 | } |
| 739 | 739 | ||
| 740 | void Module::Interface::IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx) { | 740 | void Module::Interface::IsUserRegistrationRequestPermitted(HLERequestContext& ctx) { |
| 741 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 741 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 742 | IPC::ResponseBuilder rb{ctx, 3}; | 742 | IPC::ResponseBuilder rb{ctx, 3}; |
| 743 | rb.Push(ResultSuccess); | 743 | rb.Push(ResultSuccess); |
| 744 | rb.Push(profile_manager->CanSystemRegisterUser()); | 744 | rb.Push(profile_manager->CanSystemRegisterUser()); |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) { | 747 | void Module::Interface::InitializeApplicationInfo(HLERequestContext& ctx) { |
| 748 | LOG_DEBUG(Service_ACC, "called"); | 748 | LOG_DEBUG(Service_ACC, "called"); |
| 749 | IPC::ResponseBuilder rb{ctx, 2}; | 749 | IPC::ResponseBuilder rb{ctx, 2}; |
| 750 | rb.Push(InitializeApplicationInfoBase()); | 750 | rb.Push(InitializeApplicationInfoBase()); |
| 751 | } | 751 | } |
| 752 | 752 | ||
| 753 | void Module::Interface::InitializeApplicationInfoRestricted(Kernel::HLERequestContext& ctx) { | 753 | void Module::Interface::InitializeApplicationInfoRestricted(HLERequestContext& ctx) { |
| 754 | LOG_WARNING(Service_ACC, "(Partial implementation) called"); | 754 | LOG_WARNING(Service_ACC, "(Partial implementation) called"); |
| 755 | 755 | ||
| 756 | // TODO(ogniK): We require checking if the user actually owns the title and what not. As of | 756 | // TODO(ogniK): We require checking if the user actually owns the title and what not. As of |
| @@ -800,14 +800,14 @@ Result Module::Interface::InitializeApplicationInfoBase() { | |||
| 800 | return ResultSuccess; | 800 | return ResultSuccess; |
| 801 | } | 801 | } |
| 802 | 802 | ||
| 803 | void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) { | 803 | void Module::Interface::GetBaasAccountManagerForApplication(HLERequestContext& ctx) { |
| 804 | LOG_DEBUG(Service_ACC, "called"); | 804 | LOG_DEBUG(Service_ACC, "called"); |
| 805 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 805 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 806 | rb.Push(ResultSuccess); | 806 | rb.Push(ResultSuccess); |
| 807 | rb.PushIpcInterface<IManagerForApplication>(system, profile_manager); | 807 | rb.PushIpcInterface<IManagerForApplication>(system, profile_manager); |
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx) { | 810 | void Module::Interface::IsUserAccountSwitchLocked(HLERequestContext& ctx) { |
| 811 | LOG_DEBUG(Service_ACC, "called"); | 811 | LOG_DEBUG(Service_ACC, "called"); |
| 812 | FileSys::NACP nacp; | 812 | FileSys::NACP nacp; |
| 813 | const auto res = system.GetAppLoader().ReadControlData(nacp); | 813 | const auto res = system.GetAppLoader().ReadControlData(nacp); |
| @@ -834,14 +834,14 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx | |||
| 834 | rb.Push(is_locked); | 834 | rb.Push(is_locked); |
| 835 | } | 835 | } |
| 836 | 836 | ||
| 837 | void Module::Interface::InitializeApplicationInfoV2(Kernel::HLERequestContext& ctx) { | 837 | void Module::Interface::InitializeApplicationInfoV2(HLERequestContext& ctx) { |
| 838 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 838 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 839 | 839 | ||
| 840 | IPC::ResponseBuilder rb{ctx, 2}; | 840 | IPC::ResponseBuilder rb{ctx, 2}; |
| 841 | rb.Push(ResultSuccess); | 841 | rb.Push(ResultSuccess); |
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) { | 844 | void Module::Interface::GetProfileEditor(HLERequestContext& ctx) { |
| 845 | IPC::RequestParser rp{ctx}; | 845 | IPC::RequestParser rp{ctx}; |
| 846 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); | 846 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| 847 | 847 | ||
| @@ -852,7 +852,7 @@ void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) { | |||
| 852 | rb.PushIpcInterface<IProfileEditor>(system, user_id, *profile_manager); | 852 | rb.PushIpcInterface<IProfileEditor>(system, user_id, *profile_manager); |
| 853 | } | 853 | } |
| 854 | 854 | ||
| 855 | void Module::Interface::ListQualifiedUsers(Kernel::HLERequestContext& ctx) { | 855 | void Module::Interface::ListQualifiedUsers(HLERequestContext& ctx) { |
| 856 | LOG_DEBUG(Service_ACC, "called"); | 856 | LOG_DEBUG(Service_ACC, "called"); |
| 857 | 857 | ||
| 858 | // All users should be qualified. We don't actually have parental control or anything to do with | 858 | // All users should be qualified. We don't actually have parental control or anything to do with |
| @@ -863,7 +863,7 @@ void Module::Interface::ListQualifiedUsers(Kernel::HLERequestContext& ctx) { | |||
| 863 | rb.Push(ResultSuccess); | 863 | rb.Push(ResultSuccess); |
| 864 | } | 864 | } |
| 865 | 865 | ||
| 866 | void Module::Interface::ListOpenContextStoredUsers(Kernel::HLERequestContext& ctx) { | 866 | void Module::Interface::ListOpenContextStoredUsers(HLERequestContext& ctx) { |
| 867 | LOG_DEBUG(Service_ACC, "called"); | 867 | LOG_DEBUG(Service_ACC, "called"); |
| 868 | 868 | ||
| 869 | ctx.WriteBuffer(profile_manager->GetStoredOpenedUsers()); | 869 | ctx.WriteBuffer(profile_manager->GetStoredOpenedUsers()); |
| @@ -871,7 +871,7 @@ void Module::Interface::ListOpenContextStoredUsers(Kernel::HLERequestContext& ct | |||
| 871 | rb.Push(ResultSuccess); | 871 | rb.Push(ResultSuccess); |
| 872 | } | 872 | } |
| 873 | 873 | ||
| 874 | void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx) { | 874 | void Module::Interface::StoreSaveDataThumbnailApplication(HLERequestContext& ctx) { |
| 875 | IPC::RequestParser rp{ctx}; | 875 | IPC::RequestParser rp{ctx}; |
| 876 | const auto uuid = rp.PopRaw<Common::UUID>(); | 876 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| 877 | 877 | ||
| @@ -884,7 +884,7 @@ void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestCont | |||
| 884 | StoreSaveDataThumbnail(ctx, uuid, tid); | 884 | StoreSaveDataThumbnail(ctx, uuid, tid); |
| 885 | } | 885 | } |
| 886 | 886 | ||
| 887 | void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& ctx) { | 887 | void Module::Interface::StoreSaveDataThumbnailSystem(HLERequestContext& ctx) { |
| 888 | IPC::RequestParser rp{ctx}; | 888 | IPC::RequestParser rp{ctx}; |
| 889 | const auto uuid = rp.PopRaw<Common::UUID>(); | 889 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| 890 | const auto tid = rp.Pop<u64_le>(); | 890 | const auto tid = rp.Pop<u64_le>(); |
| @@ -893,8 +893,8 @@ void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& | |||
| 893 | StoreSaveDataThumbnail(ctx, uuid, tid); | 893 | StoreSaveDataThumbnail(ctx, uuid, tid); |
| 894 | } | 894 | } |
| 895 | 895 | ||
| 896 | void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, | 896 | void Module::Interface::StoreSaveDataThumbnail(HLERequestContext& ctx, const Common::UUID& uuid, |
| 897 | const Common::UUID& uuid, const u64 tid) { | 897 | const u64 tid) { |
| 898 | IPC::ResponseBuilder rb{ctx, 2}; | 898 | IPC::ResponseBuilder rb{ctx, 2}; |
| 899 | 899 | ||
| 900 | if (tid == 0) { | 900 | if (tid == 0) { |
| @@ -920,7 +920,7 @@ void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, | |||
| 920 | rb.Push(ResultSuccess); | 920 | rb.Push(ResultSuccess); |
| 921 | } | 921 | } |
| 922 | 922 | ||
| 923 | void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) { | 923 | void Module::Interface::TrySelectUserWithoutInteraction(HLERequestContext& ctx) { |
| 924 | LOG_DEBUG(Service_ACC, "called"); | 924 | LOG_DEBUG(Service_ACC, "called"); |
| 925 | // A u8 is passed into this function which we can safely ignore. It's to determine if we have | 925 | // A u8 is passed into this function which we can safely ignore. It's to determine if we have |
| 926 | // access to use the network or not by the looks of it | 926 | // access to use the network or not by the looks of it |
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index a2fdafd82..6b4735c2f 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h | |||
| @@ -20,28 +20,28 @@ public: | |||
| 20 | const char* name); | 20 | const char* name); |
| 21 | ~Interface() override; | 21 | ~Interface() override; |
| 22 | 22 | ||
| 23 | void GetUserCount(Kernel::HLERequestContext& ctx); | 23 | void GetUserCount(HLERequestContext& ctx); |
| 24 | void GetUserExistence(Kernel::HLERequestContext& ctx); | 24 | void GetUserExistence(HLERequestContext& ctx); |
| 25 | void ListAllUsers(Kernel::HLERequestContext& ctx); | 25 | void ListAllUsers(HLERequestContext& ctx); |
| 26 | void ListOpenUsers(Kernel::HLERequestContext& ctx); | 26 | void ListOpenUsers(HLERequestContext& ctx); |
| 27 | void GetLastOpenedUser(Kernel::HLERequestContext& ctx); | 27 | void GetLastOpenedUser(HLERequestContext& ctx); |
| 28 | void GetProfile(Kernel::HLERequestContext& ctx); | 28 | void GetProfile(HLERequestContext& ctx); |
| 29 | void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); | 29 | void InitializeApplicationInfo(HLERequestContext& ctx); |
| 30 | void InitializeApplicationInfoRestricted(Kernel::HLERequestContext& ctx); | 30 | void InitializeApplicationInfoRestricted(HLERequestContext& ctx); |
| 31 | void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx); | 31 | void GetBaasAccountManagerForApplication(HLERequestContext& ctx); |
| 32 | void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx); | 32 | void IsUserRegistrationRequestPermitted(HLERequestContext& ctx); |
| 33 | void TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx); | 33 | void TrySelectUserWithoutInteraction(HLERequestContext& ctx); |
| 34 | void IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx); | 34 | void IsUserAccountSwitchLocked(HLERequestContext& ctx); |
| 35 | void InitializeApplicationInfoV2(Kernel::HLERequestContext& ctx); | 35 | void InitializeApplicationInfoV2(HLERequestContext& ctx); |
| 36 | void GetProfileEditor(Kernel::HLERequestContext& ctx); | 36 | void GetProfileEditor(HLERequestContext& ctx); |
| 37 | void ListQualifiedUsers(Kernel::HLERequestContext& ctx); | 37 | void ListQualifiedUsers(HLERequestContext& ctx); |
| 38 | void ListOpenContextStoredUsers(Kernel::HLERequestContext& ctx); | 38 | void ListOpenContextStoredUsers(HLERequestContext& ctx); |
| 39 | void StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx); | 39 | void StoreSaveDataThumbnailApplication(HLERequestContext& ctx); |
| 40 | void StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& ctx); | 40 | void StoreSaveDataThumbnailSystem(HLERequestContext& ctx); |
| 41 | 41 | ||
| 42 | private: | 42 | private: |
| 43 | Result InitializeApplicationInfoBase(); | 43 | Result InitializeApplicationInfoBase(); |
| 44 | void StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, const Common::UUID& uuid, | 44 | void StoreSaveDataThumbnail(HLERequestContext& ctx, const Common::UUID& uuid, |
| 45 | const u64 tid); | 45 | const u64 tid); |
| 46 | 46 | ||
| 47 | enum class ApplicationType : u32_le { | 47 | enum class ApplicationType : u32_le { |
diff --git a/src/core/hle/service/acc/async_context.cpp b/src/core/hle/service/acc/async_context.cpp index 713689d8f..c9e0af90c 100644 --- a/src/core/hle/service/acc/async_context.cpp +++ b/src/core/hle/service/acc/async_context.cpp | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/core.h" | 4 | #include "core/core.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/kernel/k_event.h" | 5 | #include "core/hle/kernel/k_event.h" |
| 7 | #include "core/hle/service/acc/async_context.h" | 6 | #include "core/hle/service/acc/async_context.h" |
| 7 | #include "core/hle/service/ipc_helpers.h" | ||
| 8 | 8 | ||
| 9 | namespace Service::Account { | 9 | namespace Service::Account { |
| 10 | IAsyncContext::IAsyncContext(Core::System& system_) | 10 | IAsyncContext::IAsyncContext(Core::System& system_) |
| @@ -27,7 +27,7 @@ IAsyncContext::~IAsyncContext() { | |||
| 27 | service_context.CloseEvent(completion_event); | 27 | service_context.CloseEvent(completion_event); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | void IAsyncContext::GetSystemEvent(Kernel::HLERequestContext& ctx) { | 30 | void IAsyncContext::GetSystemEvent(HLERequestContext& ctx) { |
| 31 | LOG_DEBUG(Service_ACC, "called"); | 31 | LOG_DEBUG(Service_ACC, "called"); |
| 32 | 32 | ||
| 33 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 33 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -35,7 +35,7 @@ void IAsyncContext::GetSystemEvent(Kernel::HLERequestContext& ctx) { | |||
| 35 | rb.PushCopyObjects(completion_event->GetReadableEvent()); | 35 | rb.PushCopyObjects(completion_event->GetReadableEvent()); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void IAsyncContext::Cancel(Kernel::HLERequestContext& ctx) { | 38 | void IAsyncContext::Cancel(HLERequestContext& ctx) { |
| 39 | LOG_DEBUG(Service_ACC, "called"); | 39 | LOG_DEBUG(Service_ACC, "called"); |
| 40 | 40 | ||
| 41 | Cancel(); | 41 | Cancel(); |
| @@ -45,7 +45,7 @@ void IAsyncContext::Cancel(Kernel::HLERequestContext& ctx) { | |||
| 45 | rb.Push(ResultSuccess); | 45 | rb.Push(ResultSuccess); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | void IAsyncContext::HasDone(Kernel::HLERequestContext& ctx) { | 48 | void IAsyncContext::HasDone(HLERequestContext& ctx) { |
| 49 | LOG_DEBUG(Service_ACC, "called"); | 49 | LOG_DEBUG(Service_ACC, "called"); |
| 50 | 50 | ||
| 51 | is_complete.store(IsComplete()); | 51 | is_complete.store(IsComplete()); |
| @@ -55,7 +55,7 @@ void IAsyncContext::HasDone(Kernel::HLERequestContext& ctx) { | |||
| 55 | rb.Push(is_complete.load()); | 55 | rb.Push(is_complete.load()); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void IAsyncContext::GetResult(Kernel::HLERequestContext& ctx) { | 58 | void IAsyncContext::GetResult(HLERequestContext& ctx) { |
| 59 | LOG_DEBUG(Service_ACC, "called"); | 59 | LOG_DEBUG(Service_ACC, "called"); |
| 60 | 60 | ||
| 61 | IPC::ResponseBuilder rb{ctx, 3}; | 61 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/acc/async_context.h b/src/core/hle/service/acc/async_context.h index 26332d241..d7bffc055 100644 --- a/src/core/hle/service/acc/async_context.h +++ b/src/core/hle/service/acc/async_context.h | |||
| @@ -18,10 +18,10 @@ public: | |||
| 18 | explicit IAsyncContext(Core::System& system_); | 18 | explicit IAsyncContext(Core::System& system_); |
| 19 | ~IAsyncContext() override; | 19 | ~IAsyncContext() override; |
| 20 | 20 | ||
| 21 | void GetSystemEvent(Kernel::HLERequestContext& ctx); | 21 | void GetSystemEvent(HLERequestContext& ctx); |
| 22 | void Cancel(Kernel::HLERequestContext& ctx); | 22 | void Cancel(HLERequestContext& ctx); |
| 23 | void HasDone(Kernel::HLERequestContext& ctx); | 23 | void HasDone(HLERequestContext& ctx); |
| 24 | void GetResult(Kernel::HLERequestContext& ctx); | 24 | void GetResult(HLERequestContext& ctx); |
| 25 | 25 | ||
| 26 | protected: | 26 | protected: |
| 27 | virtual bool IsComplete() const = 0; | 27 | virtual bool IsComplete() const = 0; |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 3cd772b83..00b096f9e 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | #include "core/file_sys/patch_manager.h" | 11 | #include "core/file_sys/patch_manager.h" |
| 12 | #include "core/file_sys/registered_cache.h" | 12 | #include "core/file_sys/registered_cache.h" |
| 13 | #include "core/file_sys/savedata_factory.h" | 13 | #include "core/file_sys/savedata_factory.h" |
| 14 | #include "core/hle/ipc_helpers.h" | ||
| 15 | #include "core/hle/kernel/k_event.h" | 14 | #include "core/hle/kernel/k_event.h" |
| 16 | #include "core/hle/kernel/k_transfer_memory.h" | 15 | #include "core/hle/kernel/k_transfer_memory.h" |
| 17 | #include "core/hle/service/acc/profile_manager.h" | 16 | #include "core/hle/service/acc/profile_manager.h" |
| @@ -29,6 +28,7 @@ | |||
| 29 | #include "core/hle/service/bcat/backend/backend.h" | 28 | #include "core/hle/service/bcat/backend/backend.h" |
| 30 | #include "core/hle/service/caps/caps.h" | 29 | #include "core/hle/service/caps/caps.h" |
| 31 | #include "core/hle/service/filesystem/filesystem.h" | 30 | #include "core/hle/service/filesystem/filesystem.h" |
| 31 | #include "core/hle/service/ipc_helpers.h" | ||
| 32 | #include "core/hle/service/ns/ns.h" | 32 | #include "core/hle/service/ns/ns.h" |
| 33 | #include "core/hle/service/nvflinger/nvflinger.h" | 33 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 34 | #include "core/hle/service/pm/pm.h" | 34 | #include "core/hle/service/pm/pm.h" |
| @@ -78,7 +78,7 @@ IWindowController::IWindowController(Core::System& system_) | |||
| 78 | 78 | ||
| 79 | IWindowController::~IWindowController() = default; | 79 | IWindowController::~IWindowController() = default; |
| 80 | 80 | ||
| 81 | void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) { | 81 | void IWindowController::GetAppletResourceUserId(HLERequestContext& ctx) { |
| 82 | const u64 process_id = system.ApplicationProcess()->GetProcessID(); | 82 | const u64 process_id = system.ApplicationProcess()->GetProcessID(); |
| 83 | 83 | ||
| 84 | LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id); | 84 | LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id); |
| @@ -88,7 +88,7 @@ void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) | |||
| 88 | rb.Push<u64>(process_id); | 88 | rb.Push<u64>(process_id); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) { | 91 | void IWindowController::AcquireForegroundRights(HLERequestContext& ctx) { |
| 92 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 92 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 93 | IPC::ResponseBuilder rb{ctx, 2}; | 93 | IPC::ResponseBuilder rb{ctx, 2}; |
| 94 | rb.Push(ResultSuccess); | 94 | rb.Push(ResultSuccess); |
| @@ -111,7 +111,7 @@ IAudioController::IAudioController(Core::System& system_) | |||
| 111 | 111 | ||
| 112 | IAudioController::~IAudioController() = default; | 112 | IAudioController::~IAudioController() = default; |
| 113 | 113 | ||
| 114 | void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | 114 | void IAudioController::SetExpectedMasterVolume(HLERequestContext& ctx) { |
| 115 | IPC::RequestParser rp{ctx}; | 115 | IPC::RequestParser rp{ctx}; |
| 116 | const float main_applet_volume_tmp = rp.Pop<float>(); | 116 | const float main_applet_volume_tmp = rp.Pop<float>(); |
| 117 | const float library_applet_volume_tmp = rp.Pop<float>(); | 117 | const float library_applet_volume_tmp = rp.Pop<float>(); |
| @@ -128,21 +128,21 @@ void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | |||
| 128 | rb.Push(ResultSuccess); | 128 | rb.Push(ResultSuccess); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | 131 | void IAudioController::GetMainAppletExpectedMasterVolume(HLERequestContext& ctx) { |
| 132 | LOG_DEBUG(Service_AM, "called. main_applet_volume={}", main_applet_volume); | 132 | LOG_DEBUG(Service_AM, "called. main_applet_volume={}", main_applet_volume); |
| 133 | IPC::ResponseBuilder rb{ctx, 3}; | 133 | IPC::ResponseBuilder rb{ctx, 3}; |
| 134 | rb.Push(ResultSuccess); | 134 | rb.Push(ResultSuccess); |
| 135 | rb.Push(main_applet_volume); | 135 | rb.Push(main_applet_volume); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | 138 | void IAudioController::GetLibraryAppletExpectedMasterVolume(HLERequestContext& ctx) { |
| 139 | LOG_DEBUG(Service_AM, "called. library_applet_volume={}", library_applet_volume); | 139 | LOG_DEBUG(Service_AM, "called. library_applet_volume={}", library_applet_volume); |
| 140 | IPC::ResponseBuilder rb{ctx, 3}; | 140 | IPC::ResponseBuilder rb{ctx, 3}; |
| 141 | rb.Push(ResultSuccess); | 141 | rb.Push(ResultSuccess); |
| 142 | rb.Push(library_applet_volume); | 142 | rb.Push(library_applet_volume); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | void IAudioController::ChangeMainAppletMasterVolume(Kernel::HLERequestContext& ctx) { | 145 | void IAudioController::ChangeMainAppletMasterVolume(HLERequestContext& ctx) { |
| 146 | struct Parameters { | 146 | struct Parameters { |
| 147 | float volume; | 147 | float volume; |
| 148 | s64 fade_time_ns; | 148 | s64 fade_time_ns; |
| @@ -162,7 +162,7 @@ void IAudioController::ChangeMainAppletMasterVolume(Kernel::HLERequestContext& c | |||
| 162 | rb.Push(ResultSuccess); | 162 | rb.Push(ResultSuccess); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | void IAudioController::SetTransparentAudioRate(Kernel::HLERequestContext& ctx) { | 165 | void IAudioController::SetTransparentAudioRate(HLERequestContext& ctx) { |
| 166 | IPC::RequestParser rp{ctx}; | 166 | IPC::RequestParser rp{ctx}; |
| 167 | const float transparent_volume_rate_tmp = rp.Pop<float>(); | 167 | const float transparent_volume_rate_tmp = rp.Pop<float>(); |
| 168 | 168 | ||
| @@ -328,7 +328,7 @@ ISelfController::~ISelfController() { | |||
| 328 | service_context.CloseEvent(accumulated_suspended_tick_changed_event); | 328 | service_context.CloseEvent(accumulated_suspended_tick_changed_event); |
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | void ISelfController::Exit(Kernel::HLERequestContext& ctx) { | 331 | void ISelfController::Exit(HLERequestContext& ctx) { |
| 332 | LOG_DEBUG(Service_AM, "called"); | 332 | LOG_DEBUG(Service_AM, "called"); |
| 333 | 333 | ||
| 334 | IPC::ResponseBuilder rb{ctx, 2}; | 334 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -337,7 +337,7 @@ void ISelfController::Exit(Kernel::HLERequestContext& ctx) { | |||
| 337 | system.Exit(); | 337 | system.Exit(); |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | void ISelfController::LockExit(Kernel::HLERequestContext& ctx) { | 340 | void ISelfController::LockExit(HLERequestContext& ctx) { |
| 341 | LOG_DEBUG(Service_AM, "called"); | 341 | LOG_DEBUG(Service_AM, "called"); |
| 342 | 342 | ||
| 343 | system.SetExitLock(true); | 343 | system.SetExitLock(true); |
| @@ -346,7 +346,7 @@ void ISelfController::LockExit(Kernel::HLERequestContext& ctx) { | |||
| 346 | rb.Push(ResultSuccess); | 346 | rb.Push(ResultSuccess); |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) { | 349 | void ISelfController::UnlockExit(HLERequestContext& ctx) { |
| 350 | LOG_DEBUG(Service_AM, "called"); | 350 | LOG_DEBUG(Service_AM, "called"); |
| 351 | 351 | ||
| 352 | system.SetExitLock(false); | 352 | system.SetExitLock(false); |
| @@ -355,7 +355,7 @@ void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) { | |||
| 355 | rb.Push(ResultSuccess); | 355 | rb.Push(ResultSuccess); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) { | 358 | void ISelfController::EnterFatalSection(HLERequestContext& ctx) { |
| 359 | ++num_fatal_sections_entered; | 359 | ++num_fatal_sections_entered; |
| 360 | LOG_DEBUG(Service_AM, "called. Num fatal sections entered: {}", num_fatal_sections_entered); | 360 | LOG_DEBUG(Service_AM, "called. Num fatal sections entered: {}", num_fatal_sections_entered); |
| 361 | 361 | ||
| @@ -363,7 +363,7 @@ void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) { | |||
| 363 | rb.Push(ResultSuccess); | 363 | rb.Push(ResultSuccess); |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) { | 366 | void ISelfController::LeaveFatalSection(HLERequestContext& ctx) { |
| 367 | LOG_DEBUG(Service_AM, "called."); | 367 | LOG_DEBUG(Service_AM, "called."); |
| 368 | 368 | ||
| 369 | // Entry and exit of fatal sections must be balanced. | 369 | // Entry and exit of fatal sections must be balanced. |
| @@ -379,7 +379,7 @@ void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) { | |||
| 379 | rb.Push(ResultSuccess); | 379 | rb.Push(ResultSuccess); |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) { | 382 | void ISelfController::GetLibraryAppletLaunchableEvent(HLERequestContext& ctx) { |
| 383 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 383 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 384 | 384 | ||
| 385 | launchable_event->Signal(); | 385 | launchable_event->Signal(); |
| @@ -389,7 +389,7 @@ void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& | |||
| 389 | rb.PushCopyObjects(launchable_event->GetReadableEvent()); | 389 | rb.PushCopyObjects(launchable_event->GetReadableEvent()); |
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) { | 392 | void ISelfController::SetScreenShotPermission(HLERequestContext& ctx) { |
| 393 | IPC::RequestParser rp{ctx}; | 393 | IPC::RequestParser rp{ctx}; |
| 394 | const auto permission = rp.PopEnum<ScreenshotPermission>(); | 394 | const auto permission = rp.PopEnum<ScreenshotPermission>(); |
| 395 | LOG_DEBUG(Service_AM, "called, permission={}", permission); | 395 | LOG_DEBUG(Service_AM, "called, permission={}", permission); |
| @@ -400,7 +400,7 @@ void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) { | |||
| 400 | rb.Push(ResultSuccess); | 400 | rb.Push(ResultSuccess); |
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx) { | 403 | void ISelfController::SetOperationModeChangedNotification(HLERequestContext& ctx) { |
| 404 | IPC::RequestParser rp{ctx}; | 404 | IPC::RequestParser rp{ctx}; |
| 405 | 405 | ||
| 406 | bool flag = rp.Pop<bool>(); | 406 | bool flag = rp.Pop<bool>(); |
| @@ -410,7 +410,7 @@ void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestCont | |||
| 410 | rb.Push(ResultSuccess); | 410 | rb.Push(ResultSuccess); |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) { | 413 | void ISelfController::SetPerformanceModeChangedNotification(HLERequestContext& ctx) { |
| 414 | IPC::RequestParser rp{ctx}; | 414 | IPC::RequestParser rp{ctx}; |
| 415 | 415 | ||
| 416 | bool flag = rp.Pop<bool>(); | 416 | bool flag = rp.Pop<bool>(); |
| @@ -420,7 +420,7 @@ void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestCo | |||
| 420 | rb.Push(ResultSuccess); | 420 | rb.Push(ResultSuccess); |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) { | 423 | void ISelfController::SetFocusHandlingMode(HLERequestContext& ctx) { |
| 424 | // Takes 3 input u8s with each field located immediately after the previous | 424 | // Takes 3 input u8s with each field located immediately after the previous |
| 425 | // u8, these are bool flags. No output. | 425 | // u8, these are bool flags. No output. |
| 426 | IPC::RequestParser rp{ctx}; | 426 | IPC::RequestParser rp{ctx}; |
| @@ -439,14 +439,14 @@ void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) { | |||
| 439 | rb.Push(ResultSuccess); | 439 | rb.Push(ResultSuccess); |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) { | 442 | void ISelfController::SetRestartMessageEnabled(HLERequestContext& ctx) { |
| 443 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 443 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 444 | 444 | ||
| 445 | IPC::ResponseBuilder rb{ctx, 2}; | 445 | IPC::ResponseBuilder rb{ctx, 2}; |
| 446 | rb.Push(ResultSuccess); | 446 | rb.Push(ResultSuccess); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) { | 449 | void ISelfController::SetOutOfFocusSuspendingEnabled(HLERequestContext& ctx) { |
| 450 | // Takes 3 input u8s with each field located immediately after the previous | 450 | // Takes 3 input u8s with each field located immediately after the previous |
| 451 | // u8, these are bool flags. No output. | 451 | // u8, these are bool flags. No output. |
| 452 | IPC::RequestParser rp{ctx}; | 452 | IPC::RequestParser rp{ctx}; |
| @@ -458,14 +458,14 @@ void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& | |||
| 458 | rb.Push(ResultSuccess); | 458 | rb.Push(ResultSuccess); |
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | void ISelfController::SetAlbumImageOrientation(Kernel::HLERequestContext& ctx) { | 461 | void ISelfController::SetAlbumImageOrientation(HLERequestContext& ctx) { |
| 462 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 462 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 463 | 463 | ||
| 464 | IPC::ResponseBuilder rb{ctx, 2}; | 464 | IPC::ResponseBuilder rb{ctx, 2}; |
| 465 | rb.Push(ResultSuccess); | 465 | rb.Push(ResultSuccess); |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) { | 468 | void ISelfController::CreateManagedDisplayLayer(HLERequestContext& ctx) { |
| 469 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 469 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 470 | 470 | ||
| 471 | // TODO(Subv): Find out how AM determines the display to use, for now just | 471 | // TODO(Subv): Find out how AM determines the display to use, for now just |
| @@ -478,7 +478,7 @@ void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) | |||
| 478 | rb.Push(*layer_id); | 478 | rb.Push(*layer_id); |
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx) { | 481 | void ISelfController::CreateManagedDisplaySeparableLayer(HLERequestContext& ctx) { |
| 482 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 482 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 483 | 483 | ||
| 484 | // TODO(Subv): Find out how AM determines the display to use, for now just | 484 | // TODO(Subv): Find out how AM determines the display to use, for now just |
| @@ -496,14 +496,14 @@ void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestConte | |||
| 496 | rb.Push(*layer_id); | 496 | rb.Push(*layer_id); |
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) { | 499 | void ISelfController::SetHandlesRequestToDisplay(HLERequestContext& ctx) { |
| 500 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 500 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 501 | 501 | ||
| 502 | IPC::ResponseBuilder rb{ctx, 2}; | 502 | IPC::ResponseBuilder rb{ctx, 2}; |
| 503 | rb.Push(ResultSuccess); | 503 | rb.Push(ResultSuccess); |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) { | 506 | void ISelfController::SetIdleTimeDetectionExtension(HLERequestContext& ctx) { |
| 507 | IPC::RequestParser rp{ctx}; | 507 | IPC::RequestParser rp{ctx}; |
| 508 | idle_time_detection_extension = rp.Pop<u32>(); | 508 | idle_time_detection_extension = rp.Pop<u32>(); |
| 509 | LOG_WARNING(Service_AM, "(STUBBED) called idle_time_detection_extension={}", | 509 | LOG_WARNING(Service_AM, "(STUBBED) called idle_time_detection_extension={}", |
| @@ -513,7 +513,7 @@ void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& c | |||
| 513 | rb.Push(ResultSuccess); | 513 | rb.Push(ResultSuccess); |
| 514 | } | 514 | } |
| 515 | 515 | ||
| 516 | void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) { | 516 | void ISelfController::GetIdleTimeDetectionExtension(HLERequestContext& ctx) { |
| 517 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 517 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 518 | 518 | ||
| 519 | IPC::ResponseBuilder rb{ctx, 3}; | 519 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -521,14 +521,14 @@ void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& c | |||
| 521 | rb.Push<u32>(idle_time_detection_extension); | 521 | rb.Push<u32>(idle_time_detection_extension); |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | void ISelfController::ReportUserIsActive(Kernel::HLERequestContext& ctx) { | 524 | void ISelfController::ReportUserIsActive(HLERequestContext& ctx) { |
| 525 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 525 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 526 | 526 | ||
| 527 | IPC::ResponseBuilder rb{ctx, 2}; | 527 | IPC::ResponseBuilder rb{ctx, 2}; |
| 528 | rb.Push(ResultSuccess); | 528 | rb.Push(ResultSuccess); |
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) { | 531 | void ISelfController::SetAutoSleepDisabled(HLERequestContext& ctx) { |
| 532 | IPC::RequestParser rp{ctx}; | 532 | IPC::RequestParser rp{ctx}; |
| 533 | is_auto_sleep_disabled = rp.Pop<bool>(); | 533 | is_auto_sleep_disabled = rp.Pop<bool>(); |
| 534 | 534 | ||
| @@ -548,7 +548,7 @@ void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) { | |||
| 548 | rb.Push(ResultSuccess); | 548 | rb.Push(ResultSuccess); |
| 549 | } | 549 | } |
| 550 | 550 | ||
| 551 | void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) { | 551 | void ISelfController::IsAutoSleepDisabled(HLERequestContext& ctx) { |
| 552 | LOG_DEBUG(Service_AM, "called."); | 552 | LOG_DEBUG(Service_AM, "called."); |
| 553 | 553 | ||
| 554 | IPC::ResponseBuilder rb{ctx, 3}; | 554 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -556,7 +556,7 @@ void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) { | |||
| 556 | rb.Push(is_auto_sleep_disabled); | 556 | rb.Push(is_auto_sleep_disabled); |
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx) { | 559 | void ISelfController::GetAccumulatedSuspendedTickValue(HLERequestContext& ctx) { |
| 560 | LOG_DEBUG(Service_AM, "called."); | 560 | LOG_DEBUG(Service_AM, "called."); |
| 561 | 561 | ||
| 562 | // This command returns the total number of system ticks since ISelfController creation | 562 | // This command returns the total number of system ticks since ISelfController creation |
| @@ -567,7 +567,7 @@ void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext | |||
| 567 | rb.Push<u64>(0); | 567 | rb.Push<u64>(0); |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | void ISelfController::GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx) { | 570 | void ISelfController::GetAccumulatedSuspendedTickChangedEvent(HLERequestContext& ctx) { |
| 571 | LOG_DEBUG(Service_AM, "called."); | 571 | LOG_DEBUG(Service_AM, "called."); |
| 572 | 572 | ||
| 573 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 573 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -575,7 +575,7 @@ void ISelfController::GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequest | |||
| 575 | rb.PushCopyObjects(accumulated_suspended_tick_changed_event->GetReadableEvent()); | 575 | rb.PushCopyObjects(accumulated_suspended_tick_changed_event->GetReadableEvent()); |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | void ISelfController::SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestContext& ctx) { | 578 | void ISelfController::SetAlbumImageTakenNotificationEnabled(HLERequestContext& ctx) { |
| 579 | IPC::RequestParser rp{ctx}; | 579 | IPC::RequestParser rp{ctx}; |
| 580 | 580 | ||
| 581 | // This service call sets an internal flag whether a notification is shown when an image is | 581 | // This service call sets an internal flag whether a notification is shown when an image is |
| @@ -590,7 +590,7 @@ void ISelfController::SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestCo | |||
| 590 | rb.Push(ResultSuccess); | 590 | rb.Push(ResultSuccess); |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | void ISelfController::SaveCurrentScreenshot(Kernel::HLERequestContext& ctx) { | 593 | void ISelfController::SaveCurrentScreenshot(HLERequestContext& ctx) { |
| 594 | IPC::RequestParser rp{ctx}; | 594 | IPC::RequestParser rp{ctx}; |
| 595 | 595 | ||
| 596 | const auto album_report_option = rp.PopEnum<Capture::AlbumReportOption>(); | 596 | const auto album_report_option = rp.PopEnum<Capture::AlbumReportOption>(); |
| @@ -601,7 +601,7 @@ void ISelfController::SaveCurrentScreenshot(Kernel::HLERequestContext& ctx) { | |||
| 601 | rb.Push(ResultSuccess); | 601 | rb.Push(ResultSuccess); |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | void ISelfController::SetRecordVolumeMuted(Kernel::HLERequestContext& ctx) { | 604 | void ISelfController::SetRecordVolumeMuted(HLERequestContext& ctx) { |
| 605 | IPC::RequestParser rp{ctx}; | 605 | IPC::RequestParser rp{ctx}; |
| 606 | 606 | ||
| 607 | const auto is_record_volume_muted = rp.Pop<bool>(); | 607 | const auto is_record_volume_muted = rp.Pop<bool>(); |
| @@ -735,7 +735,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, | |||
| 735 | 735 | ||
| 736 | ICommonStateGetter::~ICommonStateGetter() = default; | 736 | ICommonStateGetter::~ICommonStateGetter() = default; |
| 737 | 737 | ||
| 738 | void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) { | 738 | void ICommonStateGetter::GetBootMode(HLERequestContext& ctx) { |
| 739 | LOG_DEBUG(Service_AM, "called"); | 739 | LOG_DEBUG(Service_AM, "called"); |
| 740 | 740 | ||
| 741 | IPC::ResponseBuilder rb{ctx, 3}; | 741 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -743,7 +743,7 @@ void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) { | |||
| 743 | rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode | 743 | rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode |
| 744 | } | 744 | } |
| 745 | 745 | ||
| 746 | void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) { | 746 | void ICommonStateGetter::GetEventHandle(HLERequestContext& ctx) { |
| 747 | LOG_DEBUG(Service_AM, "called"); | 747 | LOG_DEBUG(Service_AM, "called"); |
| 748 | 748 | ||
| 749 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 749 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -751,7 +751,7 @@ void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) { | |||
| 751 | rb.PushCopyObjects(msg_queue->GetMessageReceiveEvent()); | 751 | rb.PushCopyObjects(msg_queue->GetMessageReceiveEvent()); |
| 752 | } | 752 | } |
| 753 | 753 | ||
| 754 | void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) { | 754 | void ICommonStateGetter::ReceiveMessage(HLERequestContext& ctx) { |
| 755 | LOG_DEBUG(Service_AM, "called"); | 755 | LOG_DEBUG(Service_AM, "called"); |
| 756 | 756 | ||
| 757 | const auto message = msg_queue->PopMessage(); | 757 | const auto message = msg_queue->PopMessage(); |
| @@ -768,7 +768,7 @@ void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) { | |||
| 768 | rb.PushEnum<AppletMessageQueue::AppletMessage>(message); | 768 | rb.PushEnum<AppletMessageQueue::AppletMessage>(message); |
| 769 | } | 769 | } |
| 770 | 770 | ||
| 771 | void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) { | 771 | void ICommonStateGetter::GetCurrentFocusState(HLERequestContext& ctx) { |
| 772 | LOG_DEBUG(Service_AM, "(STUBBED) called"); | 772 | LOG_DEBUG(Service_AM, "(STUBBED) called"); |
| 773 | 773 | ||
| 774 | IPC::ResponseBuilder rb{ctx, 3}; | 774 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -776,7 +776,7 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) { | |||
| 776 | rb.Push(static_cast<u8>(FocusState::InFocus)); | 776 | rb.Push(static_cast<u8>(FocusState::InFocus)); |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) { | 779 | void ICommonStateGetter::IsVrModeEnabled(HLERequestContext& ctx) { |
| 780 | LOG_DEBUG(Service_AM, "called"); | 780 | LOG_DEBUG(Service_AM, "called"); |
| 781 | 781 | ||
| 782 | IPC::ResponseBuilder rb{ctx, 3}; | 782 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -784,7 +784,7 @@ void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) { | |||
| 784 | rb.Push(vr_mode_state); | 784 | rb.Push(vr_mode_state); |
| 785 | } | 785 | } |
| 786 | 786 | ||
| 787 | void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) { | 787 | void ICommonStateGetter::SetVrModeEnabled(HLERequestContext& ctx) { |
| 788 | IPC::RequestParser rp{ctx}; | 788 | IPC::RequestParser rp{ctx}; |
| 789 | vr_mode_state = rp.Pop<bool>(); | 789 | vr_mode_state = rp.Pop<bool>(); |
| 790 | 790 | ||
| @@ -794,7 +794,7 @@ void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) { | |||
| 794 | rb.Push(ResultSuccess); | 794 | rb.Push(ResultSuccess); |
| 795 | } | 795 | } |
| 796 | 796 | ||
| 797 | void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) { | 797 | void ICommonStateGetter::SetLcdBacklighOffEnabled(HLERequestContext& ctx) { |
| 798 | IPC::RequestParser rp{ctx}; | 798 | IPC::RequestParser rp{ctx}; |
| 799 | const auto is_lcd_backlight_off_enabled = rp.Pop<bool>(); | 799 | const auto is_lcd_backlight_off_enabled = rp.Pop<bool>(); |
| 800 | 800 | ||
| @@ -805,21 +805,21 @@ void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx | |||
| 805 | rb.Push(ResultSuccess); | 805 | rb.Push(ResultSuccess); |
| 806 | } | 806 | } |
| 807 | 807 | ||
| 808 | void ICommonStateGetter::BeginVrModeEx(Kernel::HLERequestContext& ctx) { | 808 | void ICommonStateGetter::BeginVrModeEx(HLERequestContext& ctx) { |
| 809 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 809 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 810 | 810 | ||
| 811 | IPC::ResponseBuilder rb{ctx, 2}; | 811 | IPC::ResponseBuilder rb{ctx, 2}; |
| 812 | rb.Push(ResultSuccess); | 812 | rb.Push(ResultSuccess); |
| 813 | } | 813 | } |
| 814 | 814 | ||
| 815 | void ICommonStateGetter::EndVrModeEx(Kernel::HLERequestContext& ctx) { | 815 | void ICommonStateGetter::EndVrModeEx(HLERequestContext& ctx) { |
| 816 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 816 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 817 | 817 | ||
| 818 | IPC::ResponseBuilder rb{ctx, 2}; | 818 | IPC::ResponseBuilder rb{ctx, 2}; |
| 819 | rb.Push(ResultSuccess); | 819 | rb.Push(ResultSuccess); |
| 820 | } | 820 | } |
| 821 | 821 | ||
| 822 | void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx) { | 822 | void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(HLERequestContext& ctx) { |
| 823 | LOG_DEBUG(Service_AM, "called"); | 823 | LOG_DEBUG(Service_AM, "called"); |
| 824 | 824 | ||
| 825 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 825 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -827,7 +827,7 @@ void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLEReque | |||
| 827 | rb.PushCopyObjects(msg_queue->GetOperationModeChangedEvent()); | 827 | rb.PushCopyObjects(msg_queue->GetOperationModeChangedEvent()); |
| 828 | } | 828 | } |
| 829 | 829 | ||
| 830 | void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx) { | 830 | void ICommonStateGetter::GetDefaultDisplayResolution(HLERequestContext& ctx) { |
| 831 | LOG_DEBUG(Service_AM, "called"); | 831 | LOG_DEBUG(Service_AM, "called"); |
| 832 | 832 | ||
| 833 | IPC::ResponseBuilder rb{ctx, 4}; | 833 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -842,7 +842,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext& | |||
| 842 | } | 842 | } |
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { | 845 | void ICommonStateGetter::SetCpuBoostMode(HLERequestContext& ctx) { |
| 846 | LOG_DEBUG(Service_AM, "called, forwarding to APM:SYS"); | 846 | LOG_DEBUG(Service_AM, "called, forwarding to APM:SYS"); |
| 847 | 847 | ||
| 848 | const auto& sm = system.ServiceManager(); | 848 | const auto& sm = system.ServiceManager(); |
| @@ -852,7 +852,7 @@ void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { | |||
| 852 | apm_sys->SetCpuBoostMode(ctx); | 852 | apm_sys->SetCpuBoostMode(ctx); |
| 853 | } | 853 | } |
| 854 | 854 | ||
| 855 | void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx) { | 855 | void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx) { |
| 856 | IPC::RequestParser rp{ctx}; | 856 | IPC::RequestParser rp{ctx}; |
| 857 | const auto system_button{rp.PopEnum<SystemButtonType>()}; | 857 | const auto system_button{rp.PopEnum<SystemButtonType>()}; |
| 858 | 858 | ||
| @@ -863,7 +863,7 @@ void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(Kernel::HLERequest | |||
| 863 | } | 863 | } |
| 864 | 864 | ||
| 865 | void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled( | 865 | void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled( |
| 866 | Kernel::HLERequestContext& ctx) { | 866 | HLERequestContext& ctx) { |
| 867 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 867 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 868 | 868 | ||
| 869 | IPC::ResponseBuilder rb{ctx, 2}; | 869 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -911,7 +911,7 @@ void IStorage::Register() { | |||
| 911 | 911 | ||
| 912 | IStorage::~IStorage() = default; | 912 | IStorage::~IStorage() = default; |
| 913 | 913 | ||
| 914 | void IStorage::Open(Kernel::HLERequestContext& ctx) { | 914 | void IStorage::Open(HLERequestContext& ctx) { |
| 915 | LOG_DEBUG(Service_AM, "called"); | 915 | LOG_DEBUG(Service_AM, "called"); |
| 916 | 916 | ||
| 917 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 917 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -920,7 +920,7 @@ void IStorage::Open(Kernel::HLERequestContext& ctx) { | |||
| 920 | rb.PushIpcInterface<IStorageAccessor>(system, *this); | 920 | rb.PushIpcInterface<IStorageAccessor>(system, *this); |
| 921 | } | 921 | } |
| 922 | 922 | ||
| 923 | void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) { | 923 | void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) { |
| 924 | const bool use_docked_mode{Settings::values.use_docked_mode.GetValue()}; | 924 | const bool use_docked_mode{Settings::values.use_docked_mode.GetValue()}; |
| 925 | LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); | 925 | LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); |
| 926 | 926 | ||
| @@ -929,7 +929,7 @@ void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) { | |||
| 929 | rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld)); | 929 | rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld)); |
| 930 | } | 930 | } |
| 931 | 931 | ||
| 932 | void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) { | 932 | void ICommonStateGetter::GetPerformanceMode(HLERequestContext& ctx) { |
| 933 | LOG_DEBUG(Service_AM, "called"); | 933 | LOG_DEBUG(Service_AM, "called"); |
| 934 | 934 | ||
| 935 | IPC::ResponseBuilder rb{ctx, 3}; | 935 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -969,7 +969,7 @@ public: | |||
| 969 | } | 969 | } |
| 970 | 970 | ||
| 971 | private: | 971 | private: |
| 972 | void GetAppletStateChangedEvent(Kernel::HLERequestContext& ctx) { | 972 | void GetAppletStateChangedEvent(HLERequestContext& ctx) { |
| 973 | LOG_DEBUG(Service_AM, "called"); | 973 | LOG_DEBUG(Service_AM, "called"); |
| 974 | 974 | ||
| 975 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 975 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -977,7 +977,7 @@ private: | |||
| 977 | rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent()); | 977 | rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent()); |
| 978 | } | 978 | } |
| 979 | 979 | ||
| 980 | void IsCompleted(Kernel::HLERequestContext& ctx) { | 980 | void IsCompleted(HLERequestContext& ctx) { |
| 981 | LOG_DEBUG(Service_AM, "called"); | 981 | LOG_DEBUG(Service_AM, "called"); |
| 982 | 982 | ||
| 983 | IPC::ResponseBuilder rb{ctx, 3}; | 983 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -985,21 +985,21 @@ private: | |||
| 985 | rb.Push<u32>(applet->TransactionComplete()); | 985 | rb.Push<u32>(applet->TransactionComplete()); |
| 986 | } | 986 | } |
| 987 | 987 | ||
| 988 | void GetResult(Kernel::HLERequestContext& ctx) { | 988 | void GetResult(HLERequestContext& ctx) { |
| 989 | LOG_DEBUG(Service_AM, "called"); | 989 | LOG_DEBUG(Service_AM, "called"); |
| 990 | 990 | ||
| 991 | IPC::ResponseBuilder rb{ctx, 2}; | 991 | IPC::ResponseBuilder rb{ctx, 2}; |
| 992 | rb.Push(applet->GetStatus()); | 992 | rb.Push(applet->GetStatus()); |
| 993 | } | 993 | } |
| 994 | 994 | ||
| 995 | void PresetLibraryAppletGpuTimeSliceZero(Kernel::HLERequestContext& ctx) { | 995 | void PresetLibraryAppletGpuTimeSliceZero(HLERequestContext& ctx) { |
| 996 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 996 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 997 | 997 | ||
| 998 | IPC::ResponseBuilder rb{ctx, 2}; | 998 | IPC::ResponseBuilder rb{ctx, 2}; |
| 999 | rb.Push(ResultSuccess); | 999 | rb.Push(ResultSuccess); |
| 1000 | } | 1000 | } |
| 1001 | 1001 | ||
| 1002 | void Start(Kernel::HLERequestContext& ctx) { | 1002 | void Start(HLERequestContext& ctx) { |
| 1003 | LOG_DEBUG(Service_AM, "called"); | 1003 | LOG_DEBUG(Service_AM, "called"); |
| 1004 | 1004 | ||
| 1005 | ASSERT(applet != nullptr); | 1005 | ASSERT(applet != nullptr); |
| @@ -1011,7 +1011,7 @@ private: | |||
| 1011 | rb.Push(ResultSuccess); | 1011 | rb.Push(ResultSuccess); |
| 1012 | } | 1012 | } |
| 1013 | 1013 | ||
| 1014 | void PushInData(Kernel::HLERequestContext& ctx) { | 1014 | void PushInData(HLERequestContext& ctx) { |
| 1015 | LOG_DEBUG(Service_AM, "called"); | 1015 | LOG_DEBUG(Service_AM, "called"); |
| 1016 | 1016 | ||
| 1017 | IPC::RequestParser rp{ctx}; | 1017 | IPC::RequestParser rp{ctx}; |
| @@ -1021,7 +1021,7 @@ private: | |||
| 1021 | rb.Push(ResultSuccess); | 1021 | rb.Push(ResultSuccess); |
| 1022 | } | 1022 | } |
| 1023 | 1023 | ||
| 1024 | void PopOutData(Kernel::HLERequestContext& ctx) { | 1024 | void PopOutData(HLERequestContext& ctx) { |
| 1025 | LOG_DEBUG(Service_AM, "called"); | 1025 | LOG_DEBUG(Service_AM, "called"); |
| 1026 | 1026 | ||
| 1027 | auto storage = applet->GetBroker().PopNormalDataToGame(); | 1027 | auto storage = applet->GetBroker().PopNormalDataToGame(); |
| @@ -1038,7 +1038,7 @@ private: | |||
| 1038 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1038 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1039 | } | 1039 | } |
| 1040 | 1040 | ||
| 1041 | void PushInteractiveInData(Kernel::HLERequestContext& ctx) { | 1041 | void PushInteractiveInData(HLERequestContext& ctx) { |
| 1042 | LOG_DEBUG(Service_AM, "called"); | 1042 | LOG_DEBUG(Service_AM, "called"); |
| 1043 | 1043 | ||
| 1044 | IPC::RequestParser rp{ctx}; | 1044 | IPC::RequestParser rp{ctx}; |
| @@ -1052,7 +1052,7 @@ private: | |||
| 1052 | rb.Push(ResultSuccess); | 1052 | rb.Push(ResultSuccess); |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | void PopInteractiveOutData(Kernel::HLERequestContext& ctx) { | 1055 | void PopInteractiveOutData(HLERequestContext& ctx) { |
| 1056 | LOG_DEBUG(Service_AM, "called"); | 1056 | LOG_DEBUG(Service_AM, "called"); |
| 1057 | 1057 | ||
| 1058 | auto storage = applet->GetBroker().PopInteractiveDataToGame(); | 1058 | auto storage = applet->GetBroker().PopInteractiveDataToGame(); |
| @@ -1069,7 +1069,7 @@ private: | |||
| 1069 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1069 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | void GetPopOutDataEvent(Kernel::HLERequestContext& ctx) { | 1072 | void GetPopOutDataEvent(HLERequestContext& ctx) { |
| 1073 | LOG_DEBUG(Service_AM, "called"); | 1073 | LOG_DEBUG(Service_AM, "called"); |
| 1074 | 1074 | ||
| 1075 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1075 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -1077,7 +1077,7 @@ private: | |||
| 1077 | rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent()); | 1077 | rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent()); |
| 1078 | } | 1078 | } |
| 1079 | 1079 | ||
| 1080 | void GetPopInteractiveOutDataEvent(Kernel::HLERequestContext& ctx) { | 1080 | void GetPopInteractiveOutDataEvent(HLERequestContext& ctx) { |
| 1081 | LOG_DEBUG(Service_AM, "called"); | 1081 | LOG_DEBUG(Service_AM, "called"); |
| 1082 | 1082 | ||
| 1083 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1083 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -1085,7 +1085,7 @@ private: | |||
| 1085 | rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent()); | 1085 | rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent()); |
| 1086 | } | 1086 | } |
| 1087 | 1087 | ||
| 1088 | void GetIndirectLayerConsumerHandle(Kernel::HLERequestContext& ctx) { | 1088 | void GetIndirectLayerConsumerHandle(HLERequestContext& ctx) { |
| 1089 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1089 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1090 | 1090 | ||
| 1091 | // We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is | 1091 | // We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is |
| @@ -1115,7 +1115,7 @@ IStorageAccessor::IStorageAccessor(Core::System& system_, IStorage& backing_) | |||
| 1115 | 1115 | ||
| 1116 | IStorageAccessor::~IStorageAccessor() = default; | 1116 | IStorageAccessor::~IStorageAccessor() = default; |
| 1117 | 1117 | ||
| 1118 | void IStorageAccessor::GetSize(Kernel::HLERequestContext& ctx) { | 1118 | void IStorageAccessor::GetSize(HLERequestContext& ctx) { |
| 1119 | LOG_DEBUG(Service_AM, "called"); | 1119 | LOG_DEBUG(Service_AM, "called"); |
| 1120 | 1120 | ||
| 1121 | IPC::ResponseBuilder rb{ctx, 4}; | 1121 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -1124,7 +1124,7 @@ void IStorageAccessor::GetSize(Kernel::HLERequestContext& ctx) { | |||
| 1124 | rb.Push(static_cast<u64>(backing.GetSize())); | 1124 | rb.Push(static_cast<u64>(backing.GetSize())); |
| 1125 | } | 1125 | } |
| 1126 | 1126 | ||
| 1127 | void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) { | 1127 | void IStorageAccessor::Write(HLERequestContext& ctx) { |
| 1128 | IPC::RequestParser rp{ctx}; | 1128 | IPC::RequestParser rp{ctx}; |
| 1129 | 1129 | ||
| 1130 | const u64 offset{rp.Pop<u64>()}; | 1130 | const u64 offset{rp.Pop<u64>()}; |
| @@ -1149,7 +1149,7 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) { | |||
| 1149 | rb.Push(ResultSuccess); | 1149 | rb.Push(ResultSuccess); |
| 1150 | } | 1150 | } |
| 1151 | 1151 | ||
| 1152 | void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) { | 1152 | void IStorageAccessor::Read(HLERequestContext& ctx) { |
| 1153 | IPC::RequestParser rp{ctx}; | 1153 | IPC::RequestParser rp{ctx}; |
| 1154 | 1154 | ||
| 1155 | const u64 offset{rp.Pop<u64>()}; | 1155 | const u64 offset{rp.Pop<u64>()}; |
| @@ -1187,7 +1187,7 @@ ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_) | |||
| 1187 | 1187 | ||
| 1188 | ILibraryAppletCreator::~ILibraryAppletCreator() = default; | 1188 | ILibraryAppletCreator::~ILibraryAppletCreator() = default; |
| 1189 | 1189 | ||
| 1190 | void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) { | 1190 | void ILibraryAppletCreator::CreateLibraryApplet(HLERequestContext& ctx) { |
| 1191 | IPC::RequestParser rp{ctx}; | 1191 | IPC::RequestParser rp{ctx}; |
| 1192 | 1192 | ||
| 1193 | const auto applet_id = rp.PopRaw<Applets::AppletId>(); | 1193 | const auto applet_id = rp.PopRaw<Applets::AppletId>(); |
| @@ -1213,7 +1213,7 @@ void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) | |||
| 1213 | rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet); | 1213 | rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet); |
| 1214 | } | 1214 | } |
| 1215 | 1215 | ||
| 1216 | void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { | 1216 | void ILibraryAppletCreator::CreateStorage(HLERequestContext& ctx) { |
| 1217 | IPC::RequestParser rp{ctx}; | 1217 | IPC::RequestParser rp{ctx}; |
| 1218 | 1218 | ||
| 1219 | const s64 size{rp.Pop<s64>()}; | 1219 | const s64 size{rp.Pop<s64>()}; |
| @@ -1234,7 +1234,7 @@ void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { | |||
| 1234 | rb.PushIpcInterface<IStorage>(system, std::move(buffer)); | 1234 | rb.PushIpcInterface<IStorage>(system, std::move(buffer)); |
| 1235 | } | 1235 | } |
| 1236 | 1236 | ||
| 1237 | void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContext& ctx) { | 1237 | void ILibraryAppletCreator::CreateTransferMemoryStorage(HLERequestContext& ctx) { |
| 1238 | IPC::RequestParser rp{ctx}; | 1238 | IPC::RequestParser rp{ctx}; |
| 1239 | 1239 | ||
| 1240 | struct Parameters { | 1240 | struct Parameters { |
| @@ -1273,7 +1273,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex | |||
| 1273 | rb.PushIpcInterface<IStorage>(system, std::move(memory)); | 1273 | rb.PushIpcInterface<IStorage>(system, std::move(memory)); |
| 1274 | } | 1274 | } |
| 1275 | 1275 | ||
| 1276 | void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx) { | 1276 | void ILibraryAppletCreator::CreateHandleStorage(HLERequestContext& ctx) { |
| 1277 | IPC::RequestParser rp{ctx}; | 1277 | IPC::RequestParser rp{ctx}; |
| 1278 | 1278 | ||
| 1279 | const s64 size{rp.Pop<s64>()}; | 1279 | const s64 size{rp.Pop<s64>()}; |
| @@ -1395,29 +1395,28 @@ IApplicationFunctions::~IApplicationFunctions() { | |||
| 1395 | service_context.CloseEvent(health_warning_disappeared_system_event); | 1395 | service_context.CloseEvent(health_warning_disappeared_system_event); |
| 1396 | } | 1396 | } |
| 1397 | 1397 | ||
| 1398 | void IApplicationFunctions::EnableApplicationCrashReport(Kernel::HLERequestContext& ctx) { | 1398 | void IApplicationFunctions::EnableApplicationCrashReport(HLERequestContext& ctx) { |
| 1399 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1399 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1400 | 1400 | ||
| 1401 | IPC::ResponseBuilder rb{ctx, 2}; | 1401 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1402 | rb.Push(ResultSuccess); | 1402 | rb.Push(ResultSuccess); |
| 1403 | } | 1403 | } |
| 1404 | 1404 | ||
| 1405 | void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer( | 1405 | void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer(HLERequestContext& ctx) { |
| 1406 | Kernel::HLERequestContext& ctx) { | ||
| 1407 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1406 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1408 | 1407 | ||
| 1409 | IPC::ResponseBuilder rb{ctx, 2}; | 1408 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1410 | rb.Push(ResultSuccess); | 1409 | rb.Push(ResultSuccess); |
| 1411 | } | 1410 | } |
| 1412 | 1411 | ||
| 1413 | void IApplicationFunctions::SetApplicationCopyrightImage(Kernel::HLERequestContext& ctx) { | 1412 | void IApplicationFunctions::SetApplicationCopyrightImage(HLERequestContext& ctx) { |
| 1414 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1413 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1415 | 1414 | ||
| 1416 | IPC::ResponseBuilder rb{ctx, 2}; | 1415 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1417 | rb.Push(ResultSuccess); | 1416 | rb.Push(ResultSuccess); |
| 1418 | } | 1417 | } |
| 1419 | 1418 | ||
| 1420 | void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequestContext& ctx) { | 1419 | void IApplicationFunctions::SetApplicationCopyrightVisibility(HLERequestContext& ctx) { |
| 1421 | IPC::RequestParser rp{ctx}; | 1420 | IPC::RequestParser rp{ctx}; |
| 1422 | const auto is_visible = rp.Pop<bool>(); | 1421 | const auto is_visible = rp.Pop<bool>(); |
| 1423 | 1422 | ||
| @@ -1427,37 +1426,35 @@ void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequest | |||
| 1427 | rb.Push(ResultSuccess); | 1426 | rb.Push(ResultSuccess); |
| 1428 | } | 1427 | } |
| 1429 | 1428 | ||
| 1430 | void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed( | 1429 | void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx) { |
| 1431 | Kernel::HLERequestContext& ctx) { | ||
| 1432 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1430 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1433 | 1431 | ||
| 1434 | IPC::ResponseBuilder rb{ctx, 2}; | 1432 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1435 | rb.Push(ResultSuccess); | 1433 | rb.Push(ResultSuccess); |
| 1436 | } | 1434 | } |
| 1437 | 1435 | ||
| 1438 | void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed( | 1436 | void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx) { |
| 1439 | Kernel::HLERequestContext& ctx) { | ||
| 1440 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1437 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1441 | 1438 | ||
| 1442 | IPC::ResponseBuilder rb{ctx, 2}; | 1439 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1443 | rb.Push(ResultSuccess); | 1440 | rb.Push(ResultSuccess); |
| 1444 | } | 1441 | } |
| 1445 | 1442 | ||
| 1446 | void IApplicationFunctions::BeginBlockingHomeButton(Kernel::HLERequestContext& ctx) { | 1443 | void IApplicationFunctions::BeginBlockingHomeButton(HLERequestContext& ctx) { |
| 1447 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1444 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1448 | 1445 | ||
| 1449 | IPC::ResponseBuilder rb{ctx, 2}; | 1446 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1450 | rb.Push(ResultSuccess); | 1447 | rb.Push(ResultSuccess); |
| 1451 | } | 1448 | } |
| 1452 | 1449 | ||
| 1453 | void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx) { | 1450 | void IApplicationFunctions::EndBlockingHomeButton(HLERequestContext& ctx) { |
| 1454 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1451 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1455 | 1452 | ||
| 1456 | IPC::ResponseBuilder rb{ctx, 2}; | 1453 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1457 | rb.Push(ResultSuccess); | 1454 | rb.Push(ResultSuccess); |
| 1458 | } | 1455 | } |
| 1459 | 1456 | ||
| 1460 | void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { | 1457 | void IApplicationFunctions::PopLaunchParameter(HLERequestContext& ctx) { |
| 1461 | IPC::RequestParser rp{ctx}; | 1458 | IPC::RequestParser rp{ctx}; |
| 1462 | const auto kind = rp.PopEnum<LaunchParameterKind>(); | 1459 | const auto kind = rp.PopEnum<LaunchParameterKind>(); |
| 1463 | 1460 | ||
| @@ -1509,15 +1506,14 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { | |||
| 1509 | rb.Push(ERR_NO_DATA_IN_CHANNEL); | 1506 | rb.Push(ERR_NO_DATA_IN_CHANNEL); |
| 1510 | } | 1507 | } |
| 1511 | 1508 | ||
| 1512 | void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest( | 1509 | void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest(HLERequestContext& ctx) { |
| 1513 | Kernel::HLERequestContext& ctx) { | ||
| 1514 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1510 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1515 | 1511 | ||
| 1516 | IPC::ResponseBuilder rb{ctx, 2}; | 1512 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1517 | rb.Push(ResultSuccess); | 1513 | rb.Push(ResultSuccess); |
| 1518 | } | 1514 | } |
| 1519 | 1515 | ||
| 1520 | void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) { | 1516 | void IApplicationFunctions::EnsureSaveData(HLERequestContext& ctx) { |
| 1521 | IPC::RequestParser rp{ctx}; | 1517 | IPC::RequestParser rp{ctx}; |
| 1522 | u128 user_id = rp.PopRaw<u128>(); | 1518 | u128 user_id = rp.PopRaw<u128>(); |
| 1523 | 1519 | ||
| @@ -1535,7 +1531,7 @@ void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) { | |||
| 1535 | rb.Push<u64>(0); | 1531 | rb.Push<u64>(0); |
| 1536 | } | 1532 | } |
| 1537 | 1533 | ||
| 1538 | void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) { | 1534 | void IApplicationFunctions::SetTerminateResult(HLERequestContext& ctx) { |
| 1539 | // Takes an input u32 Result, no output. | 1535 | // Takes an input u32 Result, no output. |
| 1540 | // For example, in some cases official apps use this with error 0x2A2 then | 1536 | // For example, in some cases official apps use this with error 0x2A2 then |
| 1541 | // uses svcBreak. | 1537 | // uses svcBreak. |
| @@ -1548,7 +1544,7 @@ void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) { | |||
| 1548 | rb.Push(ResultSuccess); | 1544 | rb.Push(ResultSuccess); |
| 1549 | } | 1545 | } |
| 1550 | 1546 | ||
| 1551 | void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { | 1547 | void IApplicationFunctions::GetDisplayVersion(HLERequestContext& ctx) { |
| 1552 | LOG_DEBUG(Service_AM, "called"); | 1548 | LOG_DEBUG(Service_AM, "called"); |
| 1553 | 1549 | ||
| 1554 | std::array<u8, 0x10> version_string{}; | 1550 | std::array<u8, 0x10> version_string{}; |
| @@ -1582,7 +1578,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { | |||
| 1582 | rb.PushRaw(version_string); | 1578 | rb.PushRaw(version_string); |
| 1583 | } | 1579 | } |
| 1584 | 1580 | ||
| 1585 | void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { | 1581 | void IApplicationFunctions::GetDesiredLanguage(HLERequestContext& ctx) { |
| 1586 | // TODO(bunnei): This should be configurable | 1582 | // TODO(bunnei): This should be configurable |
| 1587 | LOG_DEBUG(Service_AM, "called"); | 1583 | LOG_DEBUG(Service_AM, "called"); |
| 1588 | 1584 | ||
| @@ -1638,7 +1634,7 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { | |||
| 1638 | rb.Push(*res_code); | 1634 | rb.Push(*res_code); |
| 1639 | } | 1635 | } |
| 1640 | 1636 | ||
| 1641 | void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) { | 1637 | void IApplicationFunctions::IsGamePlayRecordingSupported(HLERequestContext& ctx) { |
| 1642 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1638 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1643 | 1639 | ||
| 1644 | constexpr bool gameplay_recording_supported = false; | 1640 | constexpr bool gameplay_recording_supported = false; |
| @@ -1648,21 +1644,21 @@ void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestConte | |||
| 1648 | rb.Push(gameplay_recording_supported); | 1644 | rb.Push(gameplay_recording_supported); |
| 1649 | } | 1645 | } |
| 1650 | 1646 | ||
| 1651 | void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) { | 1647 | void IApplicationFunctions::InitializeGamePlayRecording(HLERequestContext& ctx) { |
| 1652 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1648 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1653 | 1649 | ||
| 1654 | IPC::ResponseBuilder rb{ctx, 2}; | 1650 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1655 | rb.Push(ResultSuccess); | 1651 | rb.Push(ResultSuccess); |
| 1656 | } | 1652 | } |
| 1657 | 1653 | ||
| 1658 | void IApplicationFunctions::SetGamePlayRecordingState(Kernel::HLERequestContext& ctx) { | 1654 | void IApplicationFunctions::SetGamePlayRecordingState(HLERequestContext& ctx) { |
| 1659 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1655 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1660 | 1656 | ||
| 1661 | IPC::ResponseBuilder rb{ctx, 2}; | 1657 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1662 | rb.Push(ResultSuccess); | 1658 | rb.Push(ResultSuccess); |
| 1663 | } | 1659 | } |
| 1664 | 1660 | ||
| 1665 | void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) { | 1661 | void IApplicationFunctions::NotifyRunning(HLERequestContext& ctx) { |
| 1666 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1662 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1667 | 1663 | ||
| 1668 | IPC::ResponseBuilder rb{ctx, 3}; | 1664 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -1670,7 +1666,7 @@ void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) { | |||
| 1670 | rb.Push<u8>(0); // Unknown, seems to be ignored by official processes | 1666 | rb.Push<u8>(0); // Unknown, seems to be ignored by official processes |
| 1671 | } | 1667 | } |
| 1672 | 1668 | ||
| 1673 | void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) { | 1669 | void IApplicationFunctions::GetPseudoDeviceId(HLERequestContext& ctx) { |
| 1674 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1670 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1675 | 1671 | ||
| 1676 | IPC::ResponseBuilder rb{ctx, 6}; | 1672 | IPC::ResponseBuilder rb{ctx, 6}; |
| @@ -1681,7 +1677,7 @@ void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) { | |||
| 1681 | rb.Push<u64>(0); | 1677 | rb.Push<u64>(0); |
| 1682 | } | 1678 | } |
| 1683 | 1679 | ||
| 1684 | void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) { | 1680 | void IApplicationFunctions::ExtendSaveData(HLERequestContext& ctx) { |
| 1685 | struct Parameters { | 1681 | struct Parameters { |
| 1686 | FileSys::SaveDataType type; | 1682 | FileSys::SaveDataType type; |
| 1687 | u128 user_id; | 1683 | u128 user_id; |
| @@ -1710,7 +1706,7 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) { | |||
| 1710 | rb.Push<u64>(0); | 1706 | rb.Push<u64>(0); |
| 1711 | } | 1707 | } |
| 1712 | 1708 | ||
| 1713 | void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) { | 1709 | void IApplicationFunctions::GetSaveDataSize(HLERequestContext& ctx) { |
| 1714 | struct Parameters { | 1710 | struct Parameters { |
| 1715 | FileSys::SaveDataType type; | 1711 | FileSys::SaveDataType type; |
| 1716 | u128 user_id; | 1712 | u128 user_id; |
| @@ -1732,7 +1728,7 @@ void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) { | |||
| 1732 | rb.Push(size.journal); | 1728 | rb.Push(size.journal); |
| 1733 | } | 1729 | } |
| 1734 | 1730 | ||
| 1735 | void IApplicationFunctions::QueryApplicationPlayStatistics(Kernel::HLERequestContext& ctx) { | 1731 | void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) { |
| 1736 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1732 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1737 | 1733 | ||
| 1738 | IPC::ResponseBuilder rb{ctx, 3}; | 1734 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -1740,7 +1736,7 @@ void IApplicationFunctions::QueryApplicationPlayStatistics(Kernel::HLERequestCon | |||
| 1740 | rb.Push<u32>(0); | 1736 | rb.Push<u32>(0); |
| 1741 | } | 1737 | } |
| 1742 | 1738 | ||
| 1743 | void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(Kernel::HLERequestContext& ctx) { | 1739 | void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(HLERequestContext& ctx) { |
| 1744 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1740 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1745 | 1741 | ||
| 1746 | IPC::ResponseBuilder rb{ctx, 3}; | 1742 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -1748,7 +1744,7 @@ void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(Kernel::HLEReque | |||
| 1748 | rb.Push<u32>(0); | 1744 | rb.Push<u32>(0); |
| 1749 | } | 1745 | } |
| 1750 | 1746 | ||
| 1751 | void IApplicationFunctions::ExecuteProgram(Kernel::HLERequestContext& ctx) { | 1747 | void IApplicationFunctions::ExecuteProgram(HLERequestContext& ctx) { |
| 1752 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1748 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1753 | 1749 | ||
| 1754 | IPC::RequestParser rp{ctx}; | 1750 | IPC::RequestParser rp{ctx}; |
| @@ -1762,21 +1758,21 @@ void IApplicationFunctions::ExecuteProgram(Kernel::HLERequestContext& ctx) { | |||
| 1762 | system.ExecuteProgram(program_index); | 1758 | system.ExecuteProgram(program_index); |
| 1763 | } | 1759 | } |
| 1764 | 1760 | ||
| 1765 | void IApplicationFunctions::ClearUserChannel(Kernel::HLERequestContext& ctx) { | 1761 | void IApplicationFunctions::ClearUserChannel(HLERequestContext& ctx) { |
| 1766 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1762 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1767 | 1763 | ||
| 1768 | IPC::ResponseBuilder rb{ctx, 2}; | 1764 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1769 | rb.Push(ResultSuccess); | 1765 | rb.Push(ResultSuccess); |
| 1770 | } | 1766 | } |
| 1771 | 1767 | ||
| 1772 | void IApplicationFunctions::UnpopToUserChannel(Kernel::HLERequestContext& ctx) { | 1768 | void IApplicationFunctions::UnpopToUserChannel(HLERequestContext& ctx) { |
| 1773 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1769 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1774 | 1770 | ||
| 1775 | IPC::ResponseBuilder rb{ctx, 2}; | 1771 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1776 | rb.Push(ResultSuccess); | 1772 | rb.Push(ResultSuccess); |
| 1777 | } | 1773 | } |
| 1778 | 1774 | ||
| 1779 | void IApplicationFunctions::GetPreviousProgramIndex(Kernel::HLERequestContext& ctx) { | 1775 | void IApplicationFunctions::GetPreviousProgramIndex(HLERequestContext& ctx) { |
| 1780 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1776 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1781 | 1777 | ||
| 1782 | IPC::ResponseBuilder rb{ctx, 3}; | 1778 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -1784,7 +1780,7 @@ void IApplicationFunctions::GetPreviousProgramIndex(Kernel::HLERequestContext& c | |||
| 1784 | rb.Push<s32>(previous_program_index); | 1780 | rb.Push<s32>(previous_program_index); |
| 1785 | } | 1781 | } |
| 1786 | 1782 | ||
| 1787 | void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx) { | 1783 | void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(HLERequestContext& ctx) { |
| 1788 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1784 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1789 | 1785 | ||
| 1790 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1786 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -1792,7 +1788,7 @@ void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(Kernel::HLERequestCon | |||
| 1792 | rb.PushCopyObjects(gpu_error_detected_event->GetReadableEvent()); | 1788 | rb.PushCopyObjects(gpu_error_detected_event->GetReadableEvent()); |
| 1793 | } | 1789 | } |
| 1794 | 1790 | ||
| 1795 | void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx) { | 1791 | void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(HLERequestContext& ctx) { |
| 1796 | LOG_DEBUG(Service_AM, "called"); | 1792 | LOG_DEBUG(Service_AM, "called"); |
| 1797 | 1793 | ||
| 1798 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1794 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -1800,15 +1796,14 @@ void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(Kernel::HLERe | |||
| 1800 | rb.PushCopyObjects(friend_invitation_storage_channel_event->GetReadableEvent()); | 1796 | rb.PushCopyObjects(friend_invitation_storage_channel_event->GetReadableEvent()); |
| 1801 | } | 1797 | } |
| 1802 | 1798 | ||
| 1803 | void IApplicationFunctions::TryPopFromFriendInvitationStorageChannel( | 1799 | void IApplicationFunctions::TryPopFromFriendInvitationStorageChannel(HLERequestContext& ctx) { |
| 1804 | Kernel::HLERequestContext& ctx) { | ||
| 1805 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1800 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1806 | 1801 | ||
| 1807 | IPC::ResponseBuilder rb{ctx, 2}; | 1802 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1808 | rb.Push(ERR_NO_DATA_IN_CHANNEL); | 1803 | rb.Push(ERR_NO_DATA_IN_CHANNEL); |
| 1809 | } | 1804 | } |
| 1810 | 1805 | ||
| 1811 | void IApplicationFunctions::GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx) { | 1806 | void IApplicationFunctions::GetNotificationStorageChannelEvent(HLERequestContext& ctx) { |
| 1812 | LOG_DEBUG(Service_AM, "called"); | 1807 | LOG_DEBUG(Service_AM, "called"); |
| 1813 | 1808 | ||
| 1814 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1809 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -1816,7 +1811,7 @@ void IApplicationFunctions::GetNotificationStorageChannelEvent(Kernel::HLEReques | |||
| 1816 | rb.PushCopyObjects(notification_storage_channel_event->GetReadableEvent()); | 1811 | rb.PushCopyObjects(notification_storage_channel_event->GetReadableEvent()); |
| 1817 | } | 1812 | } |
| 1818 | 1813 | ||
| 1819 | void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx) { | 1814 | void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(HLERequestContext& ctx) { |
| 1820 | LOG_DEBUG(Service_AM, "called"); | 1815 | LOG_DEBUG(Service_AM, "called"); |
| 1821 | 1816 | ||
| 1822 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1817 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -1824,7 +1819,7 @@ void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERe | |||
| 1824 | rb.PushCopyObjects(health_warning_disappeared_system_event->GetReadableEvent()); | 1819 | rb.PushCopyObjects(health_warning_disappeared_system_event->GetReadableEvent()); |
| 1825 | } | 1820 | } |
| 1826 | 1821 | ||
| 1827 | void IApplicationFunctions::PrepareForJit(Kernel::HLERequestContext& ctx) { | 1822 | void IApplicationFunctions::PrepareForJit(HLERequestContext& ctx) { |
| 1828 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1823 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1829 | 1824 | ||
| 1830 | IPC::ResponseBuilder rb{ctx, 2}; | 1825 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -1881,14 +1876,14 @@ IHomeMenuFunctions::~IHomeMenuFunctions() { | |||
| 1881 | service_context.CloseEvent(pop_from_general_channel_event); | 1876 | service_context.CloseEvent(pop_from_general_channel_event); |
| 1882 | } | 1877 | } |
| 1883 | 1878 | ||
| 1884 | void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) { | 1879 | void IHomeMenuFunctions::RequestToGetForeground(HLERequestContext& ctx) { |
| 1885 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1880 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1886 | 1881 | ||
| 1887 | IPC::ResponseBuilder rb{ctx, 2}; | 1882 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1888 | rb.Push(ResultSuccess); | 1883 | rb.Push(ResultSuccess); |
| 1889 | } | 1884 | } |
| 1890 | 1885 | ||
| 1891 | void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) { | 1886 | void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(HLERequestContext& ctx) { |
| 1892 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1887 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1893 | 1888 | ||
| 1894 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1889 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 79e2263d7..fd3d4ddef 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | namespace Kernel { | 13 | namespace Kernel { |
| 14 | class KernelCore; | 14 | class KernelCore; |
| 15 | class KReadableEvent; | ||
| 15 | class KTransferMemory; | 16 | class KTransferMemory; |
| 16 | } // namespace Kernel | 17 | } // namespace Kernel |
| 17 | 18 | ||
| @@ -109,8 +110,8 @@ public: | |||
| 109 | ~IWindowController() override; | 110 | ~IWindowController() override; |
| 110 | 111 | ||
| 111 | private: | 112 | private: |
| 112 | void GetAppletResourceUserId(Kernel::HLERequestContext& ctx); | 113 | void GetAppletResourceUserId(HLERequestContext& ctx); |
| 113 | void AcquireForegroundRights(Kernel::HLERequestContext& ctx); | 114 | void AcquireForegroundRights(HLERequestContext& ctx); |
| 114 | }; | 115 | }; |
| 115 | 116 | ||
| 116 | class IAudioController final : public ServiceFramework<IAudioController> { | 117 | class IAudioController final : public ServiceFramework<IAudioController> { |
| @@ -119,11 +120,11 @@ public: | |||
| 119 | ~IAudioController() override; | 120 | ~IAudioController() override; |
| 120 | 121 | ||
| 121 | private: | 122 | private: |
| 122 | void SetExpectedMasterVolume(Kernel::HLERequestContext& ctx); | 123 | void SetExpectedMasterVolume(HLERequestContext& ctx); |
| 123 | void GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx); | 124 | void GetMainAppletExpectedMasterVolume(HLERequestContext& ctx); |
| 124 | void GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx); | 125 | void GetLibraryAppletExpectedMasterVolume(HLERequestContext& ctx); |
| 125 | void ChangeMainAppletMasterVolume(Kernel::HLERequestContext& ctx); | 126 | void ChangeMainAppletMasterVolume(HLERequestContext& ctx); |
| 126 | void SetTransparentAudioRate(Kernel::HLERequestContext& ctx); | 127 | void SetTransparentAudioRate(HLERequestContext& ctx); |
| 127 | 128 | ||
| 128 | static constexpr float min_allowed_volume = 0.0f; | 129 | static constexpr float min_allowed_volume = 0.0f; |
| 129 | static constexpr float max_allowed_volume = 1.0f; | 130 | static constexpr float max_allowed_volume = 1.0f; |
| @@ -157,32 +158,32 @@ public: | |||
| 157 | ~ISelfController() override; | 158 | ~ISelfController() override; |
| 158 | 159 | ||
| 159 | private: | 160 | private: |
| 160 | void Exit(Kernel::HLERequestContext& ctx); | 161 | void Exit(HLERequestContext& ctx); |
| 161 | void LockExit(Kernel::HLERequestContext& ctx); | 162 | void LockExit(HLERequestContext& ctx); |
| 162 | void UnlockExit(Kernel::HLERequestContext& ctx); | 163 | void UnlockExit(HLERequestContext& ctx); |
| 163 | void EnterFatalSection(Kernel::HLERequestContext& ctx); | 164 | void EnterFatalSection(HLERequestContext& ctx); |
| 164 | void LeaveFatalSection(Kernel::HLERequestContext& ctx); | 165 | void LeaveFatalSection(HLERequestContext& ctx); |
| 165 | void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx); | 166 | void GetLibraryAppletLaunchableEvent(HLERequestContext& ctx); |
| 166 | void SetScreenShotPermission(Kernel::HLERequestContext& ctx); | 167 | void SetScreenShotPermission(HLERequestContext& ctx); |
| 167 | void SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx); | 168 | void SetOperationModeChangedNotification(HLERequestContext& ctx); |
| 168 | void SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx); | 169 | void SetPerformanceModeChangedNotification(HLERequestContext& ctx); |
| 169 | void SetFocusHandlingMode(Kernel::HLERequestContext& ctx); | 170 | void SetFocusHandlingMode(HLERequestContext& ctx); |
| 170 | void SetRestartMessageEnabled(Kernel::HLERequestContext& ctx); | 171 | void SetRestartMessageEnabled(HLERequestContext& ctx); |
| 171 | void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx); | 172 | void SetOutOfFocusSuspendingEnabled(HLERequestContext& ctx); |
| 172 | void SetAlbumImageOrientation(Kernel::HLERequestContext& ctx); | 173 | void SetAlbumImageOrientation(HLERequestContext& ctx); |
| 173 | void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx); | 174 | void CreateManagedDisplayLayer(HLERequestContext& ctx); |
| 174 | void CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx); | 175 | void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx); |
| 175 | void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx); | 176 | void SetHandlesRequestToDisplay(HLERequestContext& ctx); |
| 176 | void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx); | 177 | void SetIdleTimeDetectionExtension(HLERequestContext& ctx); |
| 177 | void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx); | 178 | void GetIdleTimeDetectionExtension(HLERequestContext& ctx); |
| 178 | void ReportUserIsActive(Kernel::HLERequestContext& ctx); | 179 | void ReportUserIsActive(HLERequestContext& ctx); |
| 179 | void SetAutoSleepDisabled(Kernel::HLERequestContext& ctx); | 180 | void SetAutoSleepDisabled(HLERequestContext& ctx); |
| 180 | void IsAutoSleepDisabled(Kernel::HLERequestContext& ctx); | 181 | void IsAutoSleepDisabled(HLERequestContext& ctx); |
| 181 | void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx); | 182 | void GetAccumulatedSuspendedTickValue(HLERequestContext& ctx); |
| 182 | void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx); | 183 | void GetAccumulatedSuspendedTickChangedEvent(HLERequestContext& ctx); |
| 183 | void SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestContext& ctx); | 184 | void SetAlbumImageTakenNotificationEnabled(HLERequestContext& ctx); |
| 184 | void SaveCurrentScreenshot(Kernel::HLERequestContext& ctx); | 185 | void SaveCurrentScreenshot(HLERequestContext& ctx); |
| 185 | void SetRecordVolumeMuted(Kernel::HLERequestContext& ctx); | 186 | void SetRecordVolumeMuted(HLERequestContext& ctx); |
| 186 | 187 | ||
| 187 | enum class ScreenshotPermission : u32 { | 188 | enum class ScreenshotPermission : u32 { |
| 188 | Inherit = 0, | 189 | Inherit = 0, |
| @@ -235,22 +236,22 @@ private: | |||
| 235 | CaptureButtonLongPressing, | 236 | CaptureButtonLongPressing, |
| 236 | }; | 237 | }; |
| 237 | 238 | ||
| 238 | void GetEventHandle(Kernel::HLERequestContext& ctx); | 239 | void GetEventHandle(HLERequestContext& ctx); |
| 239 | void ReceiveMessage(Kernel::HLERequestContext& ctx); | 240 | void ReceiveMessage(HLERequestContext& ctx); |
| 240 | void GetCurrentFocusState(Kernel::HLERequestContext& ctx); | 241 | void GetCurrentFocusState(HLERequestContext& ctx); |
| 241 | void GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx); | 242 | void GetDefaultDisplayResolutionChangeEvent(HLERequestContext& ctx); |
| 242 | void GetOperationMode(Kernel::HLERequestContext& ctx); | 243 | void GetOperationMode(HLERequestContext& ctx); |
| 243 | void GetPerformanceMode(Kernel::HLERequestContext& ctx); | 244 | void GetPerformanceMode(HLERequestContext& ctx); |
| 244 | void GetBootMode(Kernel::HLERequestContext& ctx); | 245 | void GetBootMode(HLERequestContext& ctx); |
| 245 | void IsVrModeEnabled(Kernel::HLERequestContext& ctx); | 246 | void IsVrModeEnabled(HLERequestContext& ctx); |
| 246 | void SetVrModeEnabled(Kernel::HLERequestContext& ctx); | 247 | void SetVrModeEnabled(HLERequestContext& ctx); |
| 247 | void SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx); | 248 | void SetLcdBacklighOffEnabled(HLERequestContext& ctx); |
| 248 | void BeginVrModeEx(Kernel::HLERequestContext& ctx); | 249 | void BeginVrModeEx(HLERequestContext& ctx); |
| 249 | void EndVrModeEx(Kernel::HLERequestContext& ctx); | 250 | void EndVrModeEx(HLERequestContext& ctx); |
| 250 | void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx); | 251 | void GetDefaultDisplayResolution(HLERequestContext& ctx); |
| 251 | void SetCpuBoostMode(Kernel::HLERequestContext& ctx); | 252 | void SetCpuBoostMode(HLERequestContext& ctx); |
| 252 | void PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx); | 253 | void PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx); |
| 253 | void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx); | 254 | void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(HLERequestContext& ctx); |
| 254 | 255 | ||
| 255 | std::shared_ptr<AppletMessageQueue> msg_queue; | 256 | std::shared_ptr<AppletMessageQueue> msg_queue; |
| 256 | bool vr_mode_state{}; | 257 | bool vr_mode_state{}; |
| @@ -283,7 +284,7 @@ public: | |||
| 283 | 284 | ||
| 284 | private: | 285 | private: |
| 285 | void Register(); | 286 | void Register(); |
| 286 | void Open(Kernel::HLERequestContext& ctx); | 287 | void Open(HLERequestContext& ctx); |
| 287 | 288 | ||
| 288 | std::shared_ptr<IStorageImpl> impl; | 289 | std::shared_ptr<IStorageImpl> impl; |
| 289 | }; | 290 | }; |
| @@ -294,9 +295,9 @@ public: | |||
| 294 | ~IStorageAccessor() override; | 295 | ~IStorageAccessor() override; |
| 295 | 296 | ||
| 296 | private: | 297 | private: |
| 297 | void GetSize(Kernel::HLERequestContext& ctx); | 298 | void GetSize(HLERequestContext& ctx); |
| 298 | void Write(Kernel::HLERequestContext& ctx); | 299 | void Write(HLERequestContext& ctx); |
| 299 | void Read(Kernel::HLERequestContext& ctx); | 300 | void Read(HLERequestContext& ctx); |
| 300 | 301 | ||
| 301 | IStorage& backing; | 302 | IStorage& backing; |
| 302 | }; | 303 | }; |
| @@ -307,10 +308,10 @@ public: | |||
| 307 | ~ILibraryAppletCreator() override; | 308 | ~ILibraryAppletCreator() override; |
| 308 | 309 | ||
| 309 | private: | 310 | private: |
| 310 | void CreateLibraryApplet(Kernel::HLERequestContext& ctx); | 311 | void CreateLibraryApplet(HLERequestContext& ctx); |
| 311 | void CreateStorage(Kernel::HLERequestContext& ctx); | 312 | void CreateStorage(HLERequestContext& ctx); |
| 312 | void CreateTransferMemoryStorage(Kernel::HLERequestContext& ctx); | 313 | void CreateTransferMemoryStorage(HLERequestContext& ctx); |
| 313 | void CreateHandleStorage(Kernel::HLERequestContext& ctx); | 314 | void CreateHandleStorage(HLERequestContext& ctx); |
| 314 | }; | 315 | }; |
| 315 | 316 | ||
| 316 | class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> { | 317 | class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> { |
| @@ -319,39 +320,39 @@ public: | |||
| 319 | ~IApplicationFunctions() override; | 320 | ~IApplicationFunctions() override; |
| 320 | 321 | ||
| 321 | private: | 322 | private: |
| 322 | void PopLaunchParameter(Kernel::HLERequestContext& ctx); | 323 | void PopLaunchParameter(HLERequestContext& ctx); |
| 323 | void CreateApplicationAndRequestToStartForQuest(Kernel::HLERequestContext& ctx); | 324 | void CreateApplicationAndRequestToStartForQuest(HLERequestContext& ctx); |
| 324 | void EnsureSaveData(Kernel::HLERequestContext& ctx); | 325 | void EnsureSaveData(HLERequestContext& ctx); |
| 325 | void SetTerminateResult(Kernel::HLERequestContext& ctx); | 326 | void SetTerminateResult(HLERequestContext& ctx); |
| 326 | void GetDisplayVersion(Kernel::HLERequestContext& ctx); | 327 | void GetDisplayVersion(HLERequestContext& ctx); |
| 327 | void GetDesiredLanguage(Kernel::HLERequestContext& ctx); | 328 | void GetDesiredLanguage(HLERequestContext& ctx); |
| 328 | void IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx); | 329 | void IsGamePlayRecordingSupported(HLERequestContext& ctx); |
| 329 | void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx); | 330 | void InitializeGamePlayRecording(HLERequestContext& ctx); |
| 330 | void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx); | 331 | void SetGamePlayRecordingState(HLERequestContext& ctx); |
| 331 | void NotifyRunning(Kernel::HLERequestContext& ctx); | 332 | void NotifyRunning(HLERequestContext& ctx); |
| 332 | void GetPseudoDeviceId(Kernel::HLERequestContext& ctx); | 333 | void GetPseudoDeviceId(HLERequestContext& ctx); |
| 333 | void ExtendSaveData(Kernel::HLERequestContext& ctx); | 334 | void ExtendSaveData(HLERequestContext& ctx); |
| 334 | void GetSaveDataSize(Kernel::HLERequestContext& ctx); | 335 | void GetSaveDataSize(HLERequestContext& ctx); |
| 335 | void BeginBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx); | 336 | void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx); |
| 336 | void EndBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx); | 337 | void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx); |
| 337 | void BeginBlockingHomeButton(Kernel::HLERequestContext& ctx); | 338 | void BeginBlockingHomeButton(HLERequestContext& ctx); |
| 338 | void EndBlockingHomeButton(Kernel::HLERequestContext& ctx); | 339 | void EndBlockingHomeButton(HLERequestContext& ctx); |
| 339 | void EnableApplicationCrashReport(Kernel::HLERequestContext& ctx); | 340 | void EnableApplicationCrashReport(HLERequestContext& ctx); |
| 340 | void InitializeApplicationCopyrightFrameBuffer(Kernel::HLERequestContext& ctx); | 341 | void InitializeApplicationCopyrightFrameBuffer(HLERequestContext& ctx); |
| 341 | void SetApplicationCopyrightImage(Kernel::HLERequestContext& ctx); | 342 | void SetApplicationCopyrightImage(HLERequestContext& ctx); |
| 342 | void SetApplicationCopyrightVisibility(Kernel::HLERequestContext& ctx); | 343 | void SetApplicationCopyrightVisibility(HLERequestContext& ctx); |
| 343 | void QueryApplicationPlayStatistics(Kernel::HLERequestContext& ctx); | 344 | void QueryApplicationPlayStatistics(HLERequestContext& ctx); |
| 344 | void QueryApplicationPlayStatisticsByUid(Kernel::HLERequestContext& ctx); | 345 | void QueryApplicationPlayStatisticsByUid(HLERequestContext& ctx); |
| 345 | void ExecuteProgram(Kernel::HLERequestContext& ctx); | 346 | void ExecuteProgram(HLERequestContext& ctx); |
| 346 | void ClearUserChannel(Kernel::HLERequestContext& ctx); | 347 | void ClearUserChannel(HLERequestContext& ctx); |
| 347 | void UnpopToUserChannel(Kernel::HLERequestContext& ctx); | 348 | void UnpopToUserChannel(HLERequestContext& ctx); |
| 348 | void GetPreviousProgramIndex(Kernel::HLERequestContext& ctx); | 349 | void GetPreviousProgramIndex(HLERequestContext& ctx); |
| 349 | void GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx); | 350 | void GetGpuErrorDetectedSystemEvent(HLERequestContext& ctx); |
| 350 | void GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx); | 351 | void GetFriendInvitationStorageChannelEvent(HLERequestContext& ctx); |
| 351 | void TryPopFromFriendInvitationStorageChannel(Kernel::HLERequestContext& ctx); | 352 | void TryPopFromFriendInvitationStorageChannel(HLERequestContext& ctx); |
| 352 | void GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx); | 353 | void GetNotificationStorageChannelEvent(HLERequestContext& ctx); |
| 353 | void GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx); | 354 | void GetHealthWarningDisappearedSystemEvent(HLERequestContext& ctx); |
| 354 | void PrepareForJit(Kernel::HLERequestContext& ctx); | 355 | void PrepareForJit(HLERequestContext& ctx); |
| 355 | 356 | ||
| 356 | KernelHelpers::ServiceContext service_context; | 357 | KernelHelpers::ServiceContext service_context; |
| 357 | 358 | ||
| @@ -370,8 +371,8 @@ public: | |||
| 370 | ~IHomeMenuFunctions() override; | 371 | ~IHomeMenuFunctions() override; |
| 371 | 372 | ||
| 372 | private: | 373 | private: |
| 373 | void RequestToGetForeground(Kernel::HLERequestContext& ctx); | 374 | void RequestToGetForeground(HLERequestContext& ctx); |
| 374 | void GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx); | 375 | void GetPopFromGeneralChannelEvent(HLERequestContext& ctx); |
| 375 | 376 | ||
| 376 | KernelHelpers::ServiceContext service_context; | 377 | KernelHelpers::ServiceContext service_context; |
| 377 | 378 | ||
diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index d7719da35..e15b5ccfa 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/am/am.h" | 6 | #include "core/hle/service/am/am.h" |
| 8 | #include "core/hle/service/am/applet_ae.h" | 7 | #include "core/hle/service/am/applet_ae.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/nvflinger/nvflinger.h" | 9 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 10 | 10 | ||
| 11 | namespace Service::AM { | 11 | namespace Service::AM { |
| @@ -36,7 +36,7 @@ public: | |||
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | private: | 38 | private: |
| 39 | void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { | 39 | void GetCommonStateGetter(HLERequestContext& ctx) { |
| 40 | LOG_DEBUG(Service_AM, "called"); | 40 | LOG_DEBUG(Service_AM, "called"); |
| 41 | 41 | ||
| 42 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 42 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -44,7 +44,7 @@ private: | |||
| 44 | rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue); | 44 | rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void GetSelfController(Kernel::HLERequestContext& ctx) { | 47 | void GetSelfController(HLERequestContext& ctx) { |
| 48 | LOG_DEBUG(Service_AM, "called"); | 48 | LOG_DEBUG(Service_AM, "called"); |
| 49 | 49 | ||
| 50 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 50 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -52,7 +52,7 @@ private: | |||
| 52 | rb.PushIpcInterface<ISelfController>(system, nvflinger); | 52 | rb.PushIpcInterface<ISelfController>(system, nvflinger); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | void GetWindowController(Kernel::HLERequestContext& ctx) { | 55 | void GetWindowController(HLERequestContext& ctx) { |
| 56 | LOG_DEBUG(Service_AM, "called"); | 56 | LOG_DEBUG(Service_AM, "called"); |
| 57 | 57 | ||
| 58 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 58 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -60,7 +60,7 @@ private: | |||
| 60 | rb.PushIpcInterface<IWindowController>(system); | 60 | rb.PushIpcInterface<IWindowController>(system); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | void GetAudioController(Kernel::HLERequestContext& ctx) { | 63 | void GetAudioController(HLERequestContext& ctx) { |
| 64 | LOG_DEBUG(Service_AM, "called"); | 64 | LOG_DEBUG(Service_AM, "called"); |
| 65 | 65 | ||
| 66 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 66 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -68,7 +68,7 @@ private: | |||
| 68 | rb.PushIpcInterface<IAudioController>(system); | 68 | rb.PushIpcInterface<IAudioController>(system); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | void GetDisplayController(Kernel::HLERequestContext& ctx) { | 71 | void GetDisplayController(HLERequestContext& ctx) { |
| 72 | LOG_DEBUG(Service_AM, "called"); | 72 | LOG_DEBUG(Service_AM, "called"); |
| 73 | 73 | ||
| 74 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 74 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -76,7 +76,7 @@ private: | |||
| 76 | rb.PushIpcInterface<IDisplayController>(system); | 76 | rb.PushIpcInterface<IDisplayController>(system); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | void GetProcessWindingController(Kernel::HLERequestContext& ctx) { | 79 | void GetProcessWindingController(HLERequestContext& ctx) { |
| 80 | LOG_DEBUG(Service_AM, "called"); | 80 | LOG_DEBUG(Service_AM, "called"); |
| 81 | 81 | ||
| 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -84,7 +84,7 @@ private: | |||
| 84 | rb.PushIpcInterface<IProcessWindingController>(system); | 84 | rb.PushIpcInterface<IProcessWindingController>(system); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { | 87 | void GetDebugFunctions(HLERequestContext& ctx) { |
| 88 | LOG_DEBUG(Service_AM, "called"); | 88 | LOG_DEBUG(Service_AM, "called"); |
| 89 | 89 | ||
| 90 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 90 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -92,7 +92,7 @@ private: | |||
| 92 | rb.PushIpcInterface<IDebugFunctions>(system); | 92 | rb.PushIpcInterface<IDebugFunctions>(system); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { | 95 | void GetLibraryAppletCreator(HLERequestContext& ctx) { |
| 96 | LOG_DEBUG(Service_AM, "called"); | 96 | LOG_DEBUG(Service_AM, "called"); |
| 97 | 97 | ||
| 98 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 98 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -100,7 +100,7 @@ private: | |||
| 100 | rb.PushIpcInterface<ILibraryAppletCreator>(system); | 100 | rb.PushIpcInterface<ILibraryAppletCreator>(system); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { | 103 | void GetApplicationFunctions(HLERequestContext& ctx) { |
| 104 | LOG_DEBUG(Service_AM, "called"); | 104 | LOG_DEBUG(Service_AM, "called"); |
| 105 | 105 | ||
| 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -140,7 +140,7 @@ public: | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | private: | 142 | private: |
| 143 | void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { | 143 | void GetCommonStateGetter(HLERequestContext& ctx) { |
| 144 | LOG_DEBUG(Service_AM, "called"); | 144 | LOG_DEBUG(Service_AM, "called"); |
| 145 | 145 | ||
| 146 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 146 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -148,7 +148,7 @@ private: | |||
| 148 | rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue); | 148 | rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | void GetSelfController(Kernel::HLERequestContext& ctx) { | 151 | void GetSelfController(HLERequestContext& ctx) { |
| 152 | LOG_DEBUG(Service_AM, "called"); | 152 | LOG_DEBUG(Service_AM, "called"); |
| 153 | 153 | ||
| 154 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 154 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -156,7 +156,7 @@ private: | |||
| 156 | rb.PushIpcInterface<ISelfController>(system, nvflinger); | 156 | rb.PushIpcInterface<ISelfController>(system, nvflinger); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | void GetWindowController(Kernel::HLERequestContext& ctx) { | 159 | void GetWindowController(HLERequestContext& ctx) { |
| 160 | LOG_DEBUG(Service_AM, "called"); | 160 | LOG_DEBUG(Service_AM, "called"); |
| 161 | 161 | ||
| 162 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 162 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -164,7 +164,7 @@ private: | |||
| 164 | rb.PushIpcInterface<IWindowController>(system); | 164 | rb.PushIpcInterface<IWindowController>(system); |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | void GetAudioController(Kernel::HLERequestContext& ctx) { | 167 | void GetAudioController(HLERequestContext& ctx) { |
| 168 | LOG_DEBUG(Service_AM, "called"); | 168 | LOG_DEBUG(Service_AM, "called"); |
| 169 | 169 | ||
| 170 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 170 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -172,7 +172,7 @@ private: | |||
| 172 | rb.PushIpcInterface<IAudioController>(system); | 172 | rb.PushIpcInterface<IAudioController>(system); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void GetDisplayController(Kernel::HLERequestContext& ctx) { | 175 | void GetDisplayController(HLERequestContext& ctx) { |
| 176 | LOG_DEBUG(Service_AM, "called"); | 176 | LOG_DEBUG(Service_AM, "called"); |
| 177 | 177 | ||
| 178 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 178 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -180,7 +180,7 @@ private: | |||
| 180 | rb.PushIpcInterface<IDisplayController>(system); | 180 | rb.PushIpcInterface<IDisplayController>(system); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { | 183 | void GetDebugFunctions(HLERequestContext& ctx) { |
| 184 | LOG_DEBUG(Service_AM, "called"); | 184 | LOG_DEBUG(Service_AM, "called"); |
| 185 | 185 | ||
| 186 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 186 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -188,7 +188,7 @@ private: | |||
| 188 | rb.PushIpcInterface<IDebugFunctions>(system); | 188 | rb.PushIpcInterface<IDebugFunctions>(system); |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { | 191 | void GetLibraryAppletCreator(HLERequestContext& ctx) { |
| 192 | LOG_DEBUG(Service_AM, "called"); | 192 | LOG_DEBUG(Service_AM, "called"); |
| 193 | 193 | ||
| 194 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 194 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -196,7 +196,7 @@ private: | |||
| 196 | rb.PushIpcInterface<ILibraryAppletCreator>(system); | 196 | rb.PushIpcInterface<ILibraryAppletCreator>(system); |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | void GetHomeMenuFunctions(Kernel::HLERequestContext& ctx) { | 199 | void GetHomeMenuFunctions(HLERequestContext& ctx) { |
| 200 | LOG_DEBUG(Service_AM, "called"); | 200 | LOG_DEBUG(Service_AM, "called"); |
| 201 | 201 | ||
| 202 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 202 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -204,7 +204,7 @@ private: | |||
| 204 | rb.PushIpcInterface<IHomeMenuFunctions>(system); | 204 | rb.PushIpcInterface<IHomeMenuFunctions>(system); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | void GetGlobalStateController(Kernel::HLERequestContext& ctx) { | 207 | void GetGlobalStateController(HLERequestContext& ctx) { |
| 208 | LOG_DEBUG(Service_AM, "called"); | 208 | LOG_DEBUG(Service_AM, "called"); |
| 209 | 209 | ||
| 210 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 210 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -212,7 +212,7 @@ private: | |||
| 212 | rb.PushIpcInterface<IGlobalStateController>(system); | 212 | rb.PushIpcInterface<IGlobalStateController>(system); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | void GetApplicationCreator(Kernel::HLERequestContext& ctx) { | 215 | void GetApplicationCreator(HLERequestContext& ctx) { |
| 216 | LOG_DEBUG(Service_AM, "called"); | 216 | LOG_DEBUG(Service_AM, "called"); |
| 217 | 217 | ||
| 218 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 218 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -224,7 +224,7 @@ private: | |||
| 224 | std::shared_ptr<AppletMessageQueue> msg_queue; | 224 | std::shared_ptr<AppletMessageQueue> msg_queue; |
| 225 | }; | 225 | }; |
| 226 | 226 | ||
| 227 | void AppletAE::OpenSystemAppletProxy(Kernel::HLERequestContext& ctx) { | 227 | void AppletAE::OpenSystemAppletProxy(HLERequestContext& ctx) { |
| 228 | LOG_DEBUG(Service_AM, "called"); | 228 | LOG_DEBUG(Service_AM, "called"); |
| 229 | 229 | ||
| 230 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 230 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -232,7 +232,7 @@ void AppletAE::OpenSystemAppletProxy(Kernel::HLERequestContext& ctx) { | |||
| 232 | rb.PushIpcInterface<ISystemAppletProxy>(nvflinger, msg_queue, system); | 232 | rb.PushIpcInterface<ISystemAppletProxy>(nvflinger, msg_queue, system); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | void AppletAE::OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx) { | 235 | void AppletAE::OpenLibraryAppletProxy(HLERequestContext& ctx) { |
| 236 | LOG_DEBUG(Service_AM, "called"); | 236 | LOG_DEBUG(Service_AM, "called"); |
| 237 | 237 | ||
| 238 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 238 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -240,7 +240,7 @@ void AppletAE::OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx) { | |||
| 240 | rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system); | 240 | rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system); |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | void AppletAE::OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx) { | 243 | void AppletAE::OpenLibraryAppletProxyOld(HLERequestContext& ctx) { |
| 244 | LOG_DEBUG(Service_AM, "called"); | 244 | LOG_DEBUG(Service_AM, "called"); |
| 245 | 245 | ||
| 246 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 246 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/am/applet_ae.h b/src/core/hle/service/am/applet_ae.h index 2147976a6..df8dccdc0 100644 --- a/src/core/hle/service/am/applet_ae.h +++ b/src/core/hle/service/am/applet_ae.h | |||
| @@ -29,9 +29,9 @@ public: | |||
| 29 | const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const; | 29 | const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const; |
| 30 | 30 | ||
| 31 | private: | 31 | private: |
| 32 | void OpenSystemAppletProxy(Kernel::HLERequestContext& ctx); | 32 | void OpenSystemAppletProxy(HLERequestContext& ctx); |
| 33 | void OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx); | 33 | void OpenLibraryAppletProxy(HLERequestContext& ctx); |
| 34 | void OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx); | 34 | void OpenLibraryAppletProxyOld(HLERequestContext& ctx); |
| 35 | 35 | ||
| 36 | NVFlinger::NVFlinger& nvflinger; | 36 | NVFlinger::NVFlinger& nvflinger; |
| 37 | std::shared_ptr<AppletMessageQueue> msg_queue; | 37 | std::shared_ptr<AppletMessageQueue> msg_queue; |
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index 00fc4202c..75c330f0a 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/am/am.h" | 5 | #include "core/hle/service/am/am.h" |
| 7 | #include "core/hle/service/am/applet_oe.h" | 6 | #include "core/hle/service/am/applet_oe.h" |
| 7 | #include "core/hle/service/ipc_helpers.h" | ||
| 8 | #include "core/hle/service/nvflinger/nvflinger.h" | 8 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 9 | 9 | ||
| 10 | namespace Service::AM { | 10 | namespace Service::AM { |
| @@ -34,7 +34,7 @@ public: | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | private: | 36 | private: |
| 37 | void GetAudioController(Kernel::HLERequestContext& ctx) { | 37 | void GetAudioController(HLERequestContext& ctx) { |
| 38 | LOG_DEBUG(Service_AM, "called"); | 38 | LOG_DEBUG(Service_AM, "called"); |
| 39 | 39 | ||
| 40 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 40 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -42,7 +42,7 @@ private: | |||
| 42 | rb.PushIpcInterface<IAudioController>(system); | 42 | rb.PushIpcInterface<IAudioController>(system); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void GetDisplayController(Kernel::HLERequestContext& ctx) { | 45 | void GetDisplayController(HLERequestContext& ctx) { |
| 46 | LOG_DEBUG(Service_AM, "called"); | 46 | LOG_DEBUG(Service_AM, "called"); |
| 47 | 47 | ||
| 48 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 48 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -50,7 +50,7 @@ private: | |||
| 50 | rb.PushIpcInterface<IDisplayController>(system); | 50 | rb.PushIpcInterface<IDisplayController>(system); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { | 53 | void GetDebugFunctions(HLERequestContext& ctx) { |
| 54 | LOG_DEBUG(Service_AM, "called"); | 54 | LOG_DEBUG(Service_AM, "called"); |
| 55 | 55 | ||
| 56 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 56 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -58,7 +58,7 @@ private: | |||
| 58 | rb.PushIpcInterface<IDebugFunctions>(system); | 58 | rb.PushIpcInterface<IDebugFunctions>(system); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | void GetWindowController(Kernel::HLERequestContext& ctx) { | 61 | void GetWindowController(HLERequestContext& ctx) { |
| 62 | LOG_DEBUG(Service_AM, "called"); | 62 | LOG_DEBUG(Service_AM, "called"); |
| 63 | 63 | ||
| 64 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 64 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -66,7 +66,7 @@ private: | |||
| 66 | rb.PushIpcInterface<IWindowController>(system); | 66 | rb.PushIpcInterface<IWindowController>(system); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void GetSelfController(Kernel::HLERequestContext& ctx) { | 69 | void GetSelfController(HLERequestContext& ctx) { |
| 70 | LOG_DEBUG(Service_AM, "called"); | 70 | LOG_DEBUG(Service_AM, "called"); |
| 71 | 71 | ||
| 72 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 72 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -74,7 +74,7 @@ private: | |||
| 74 | rb.PushIpcInterface<ISelfController>(system, nvflinger); | 74 | rb.PushIpcInterface<ISelfController>(system, nvflinger); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { | 77 | void GetCommonStateGetter(HLERequestContext& ctx) { |
| 78 | LOG_DEBUG(Service_AM, "called"); | 78 | LOG_DEBUG(Service_AM, "called"); |
| 79 | 79 | ||
| 80 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 80 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -82,7 +82,7 @@ private: | |||
| 82 | rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue); | 82 | rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { | 85 | void GetLibraryAppletCreator(HLERequestContext& ctx) { |
| 86 | LOG_DEBUG(Service_AM, "called"); | 86 | LOG_DEBUG(Service_AM, "called"); |
| 87 | 87 | ||
| 88 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 88 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -90,7 +90,7 @@ private: | |||
| 90 | rb.PushIpcInterface<ILibraryAppletCreator>(system); | 90 | rb.PushIpcInterface<ILibraryAppletCreator>(system); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { | 93 | void GetApplicationFunctions(HLERequestContext& ctx) { |
| 94 | LOG_DEBUG(Service_AM, "called"); | 94 | LOG_DEBUG(Service_AM, "called"); |
| 95 | 95 | ||
| 96 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 96 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -102,7 +102,7 @@ private: | |||
| 102 | std::shared_ptr<AppletMessageQueue> msg_queue; | 102 | std::shared_ptr<AppletMessageQueue> msg_queue; |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) { | 105 | void AppletOE::OpenApplicationProxy(HLERequestContext& ctx) { |
| 106 | LOG_DEBUG(Service_AM, "called"); | 106 | LOG_DEBUG(Service_AM, "called"); |
| 107 | 107 | ||
| 108 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 108 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/am/applet_oe.h b/src/core/hle/service/am/applet_oe.h index 8fea249f1..f34e4224e 100644 --- a/src/core/hle/service/am/applet_oe.h +++ b/src/core/hle/service/am/applet_oe.h | |||
| @@ -29,7 +29,7 @@ public: | |||
| 29 | const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const; | 29 | const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const; |
| 30 | 30 | ||
| 31 | private: | 31 | private: |
| 32 | void OpenApplicationProxy(Kernel::HLERequestContext& ctx); | 32 | void OpenApplicationProxy(HLERequestContext& ctx); |
| 33 | 33 | ||
| 34 | NVFlinger::NVFlinger& nvflinger; | 34 | NVFlinger::NVFlinger& nvflinger; |
| 35 | std::shared_ptr<AppletMessageQueue> msg_queue; | 35 | std::shared_ptr<AppletMessageQueue> msg_queue; |
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index fed51cfd6..38c2138e8 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp | |||
| @@ -14,9 +14,9 @@ | |||
| 14 | #include "core/file_sys/nca_metadata.h" | 14 | #include "core/file_sys/nca_metadata.h" |
| 15 | #include "core/file_sys/patch_manager.h" | 15 | #include "core/file_sys/patch_manager.h" |
| 16 | #include "core/file_sys/registered_cache.h" | 16 | #include "core/file_sys/registered_cache.h" |
| 17 | #include "core/hle/ipc_helpers.h" | ||
| 18 | #include "core/hle/kernel/k_event.h" | 17 | #include "core/hle/kernel/k_event.h" |
| 19 | #include "core/hle/service/aoc/aoc_u.h" | 18 | #include "core/hle/service/aoc/aoc_u.h" |
| 19 | #include "core/hle/service/ipc_helpers.h" | ||
| 20 | #include "core/hle/service/server_manager.h" | 20 | #include "core/hle/service/server_manager.h" |
| 21 | #include "core/loader/loader.h" | 21 | #include "core/loader/loader.h" |
| 22 | 22 | ||
| @@ -69,7 +69,7 @@ public: | |||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | private: | 71 | private: |
| 72 | void SetDefaultDeliveryTarget(Kernel::HLERequestContext& ctx) { | 72 | void SetDefaultDeliveryTarget(HLERequestContext& ctx) { |
| 73 | IPC::RequestParser rp{ctx}; | 73 | IPC::RequestParser rp{ctx}; |
| 74 | 74 | ||
| 75 | const auto unknown_1 = rp.Pop<u64>(); | 75 | const auto unknown_1 = rp.Pop<u64>(); |
| @@ -81,7 +81,7 @@ private: | |||
| 81 | rb.Push(ResultSuccess); | 81 | rb.Push(ResultSuccess); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void SetDeliveryTarget(Kernel::HLERequestContext& ctx) { | 84 | void SetDeliveryTarget(HLERequestContext& ctx) { |
| 85 | IPC::RequestParser rp{ctx}; | 85 | IPC::RequestParser rp{ctx}; |
| 86 | 86 | ||
| 87 | const auto unknown_1 = rp.Pop<u64>(); | 87 | const auto unknown_1 = rp.Pop<u64>(); |
| @@ -93,7 +93,7 @@ private: | |||
| 93 | rb.Push(ResultSuccess); | 93 | rb.Push(ResultSuccess); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void GetPurchasedEventReadableHandle(Kernel::HLERequestContext& ctx) { | 96 | void GetPurchasedEventReadableHandle(HLERequestContext& ctx) { |
| 97 | LOG_WARNING(Service_AOC, "called"); | 97 | LOG_WARNING(Service_AOC, "called"); |
| 98 | 98 | ||
| 99 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 99 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -145,7 +145,7 @@ AOC_U::~AOC_U() { | |||
| 145 | service_context.CloseEvent(aoc_change_event); | 145 | service_context.CloseEvent(aoc_change_event); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) { | 148 | void AOC_U::CountAddOnContent(HLERequestContext& ctx) { |
| 149 | struct Parameters { | 149 | struct Parameters { |
| 150 | u64 process_id; | 150 | u64 process_id; |
| 151 | }; | 151 | }; |
| @@ -172,7 +172,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) { | |||
| 172 | [current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); }))); | 172 | [current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); }))); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { | 175 | void AOC_U::ListAddOnContent(HLERequestContext& ctx) { |
| 176 | struct Parameters { | 176 | struct Parameters { |
| 177 | u32 offset; | 177 | u32 offset; |
| 178 | u32 count; | 178 | u32 count; |
| @@ -218,7 +218,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { | |||
| 218 | rb.Push(out_count); | 218 | rb.Push(out_count); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) { | 221 | void AOC_U::GetAddOnContentBaseId(HLERequestContext& ctx) { |
| 222 | struct Parameters { | 222 | struct Parameters { |
| 223 | u64 process_id; | 223 | u64 process_id; |
| 224 | }; | 224 | }; |
| @@ -245,7 +245,7 @@ void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) { | |||
| 245 | rb.Push(res.first->GetDLCBaseTitleId()); | 245 | rb.Push(res.first->GetDLCBaseTitleId()); |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | void AOC_U::PrepareAddOnContent(Kernel::HLERequestContext& ctx) { | 248 | void AOC_U::PrepareAddOnContent(HLERequestContext& ctx) { |
| 249 | struct Parameters { | 249 | struct Parameters { |
| 250 | s32 addon_index; | 250 | s32 addon_index; |
| 251 | u64 process_id; | 251 | u64 process_id; |
| @@ -262,7 +262,7 @@ void AOC_U::PrepareAddOnContent(Kernel::HLERequestContext& ctx) { | |||
| 262 | rb.Push(ResultSuccess); | 262 | rb.Push(ResultSuccess); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) { | 265 | void AOC_U::GetAddOnContentListChangedEvent(HLERequestContext& ctx) { |
| 266 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 266 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 267 | 267 | ||
| 268 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 268 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -270,7 +270,7 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) { | |||
| 270 | rb.PushCopyObjects(aoc_change_event->GetReadableEvent()); | 270 | rb.PushCopyObjects(aoc_change_event->GetReadableEvent()); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | void AOC_U::GetAddOnContentListChangedEventWithProcessId(Kernel::HLERequestContext& ctx) { | 273 | void AOC_U::GetAddOnContentListChangedEventWithProcessId(HLERequestContext& ctx) { |
| 274 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 274 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 275 | 275 | ||
| 276 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 276 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -278,28 +278,28 @@ void AOC_U::GetAddOnContentListChangedEventWithProcessId(Kernel::HLERequestConte | |||
| 278 | rb.PushCopyObjects(aoc_change_event->GetReadableEvent()); | 278 | rb.PushCopyObjects(aoc_change_event->GetReadableEvent()); |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | void AOC_U::NotifyMountAddOnContent(Kernel::HLERequestContext& ctx) { | 281 | void AOC_U::NotifyMountAddOnContent(HLERequestContext& ctx) { |
| 282 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 282 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 283 | 283 | ||
| 284 | IPC::ResponseBuilder rb{ctx, 2}; | 284 | IPC::ResponseBuilder rb{ctx, 2}; |
| 285 | rb.Push(ResultSuccess); | 285 | rb.Push(ResultSuccess); |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | void AOC_U::NotifyUnmountAddOnContent(Kernel::HLERequestContext& ctx) { | 288 | void AOC_U::NotifyUnmountAddOnContent(HLERequestContext& ctx) { |
| 289 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 289 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 290 | 290 | ||
| 291 | IPC::ResponseBuilder rb{ctx, 2}; | 291 | IPC::ResponseBuilder rb{ctx, 2}; |
| 292 | rb.Push(ResultSuccess); | 292 | rb.Push(ResultSuccess); |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | void AOC_U::CheckAddOnContentMountStatus(Kernel::HLERequestContext& ctx) { | 295 | void AOC_U::CheckAddOnContentMountStatus(HLERequestContext& ctx) { |
| 296 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 296 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 297 | 297 | ||
| 298 | IPC::ResponseBuilder rb{ctx, 2}; | 298 | IPC::ResponseBuilder rb{ctx, 2}; |
| 299 | rb.Push(ResultSuccess); | 299 | rb.Push(ResultSuccess); |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { | 302 | void AOC_U::CreateEcPurchasedEventManager(HLERequestContext& ctx) { |
| 303 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 303 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 304 | 304 | ||
| 305 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 305 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -307,7 +307,7 @@ void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { | |||
| 307 | rb.PushIpcInterface<IPurchaseEventManager>(system); | 307 | rb.PushIpcInterface<IPurchaseEventManager>(system); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | void AOC_U::CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { | 310 | void AOC_U::CreatePermanentEcPurchasedEventManager(HLERequestContext& ctx) { |
| 311 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | 311 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 312 | 312 | ||
| 313 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 313 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h index 5e7087e50..12ccfeb6a 100644 --- a/src/core/hle/service/aoc/aoc_u.h +++ b/src/core/hle/service/aoc/aoc_u.h | |||
| @@ -22,17 +22,17 @@ public: | |||
| 22 | ~AOC_U() override; | 22 | ~AOC_U() override; |
| 23 | 23 | ||
| 24 | private: | 24 | private: |
| 25 | void CountAddOnContent(Kernel::HLERequestContext& ctx); | 25 | void CountAddOnContent(HLERequestContext& ctx); |
| 26 | void ListAddOnContent(Kernel::HLERequestContext& ctx); | 26 | void ListAddOnContent(HLERequestContext& ctx); |
| 27 | void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx); | 27 | void GetAddOnContentBaseId(HLERequestContext& ctx); |
| 28 | void PrepareAddOnContent(Kernel::HLERequestContext& ctx); | 28 | void PrepareAddOnContent(HLERequestContext& ctx); |
| 29 | void GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx); | 29 | void GetAddOnContentListChangedEvent(HLERequestContext& ctx); |
| 30 | void GetAddOnContentListChangedEventWithProcessId(Kernel::HLERequestContext& ctx); | 30 | void GetAddOnContentListChangedEventWithProcessId(HLERequestContext& ctx); |
| 31 | void NotifyMountAddOnContent(Kernel::HLERequestContext& ctx); | 31 | void NotifyMountAddOnContent(HLERequestContext& ctx); |
| 32 | void NotifyUnmountAddOnContent(Kernel::HLERequestContext& ctx); | 32 | void NotifyUnmountAddOnContent(HLERequestContext& ctx); |
| 33 | void CheckAddOnContentMountStatus(Kernel::HLERequestContext& ctx); | 33 | void CheckAddOnContentMountStatus(HLERequestContext& ctx); |
| 34 | void CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx); | 34 | void CreateEcPurchasedEventManager(HLERequestContext& ctx); |
| 35 | void CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx); | 35 | void CreatePermanentEcPurchasedEventManager(HLERequestContext& ctx); |
| 36 | 36 | ||
| 37 | std::vector<u64> add_on_content; | 37 | std::vector<u64> add_on_content; |
| 38 | KernelHelpers::ServiceContext service_context; | 38 | KernelHelpers::ServiceContext service_context; |
diff --git a/src/core/hle/service/apm/apm_interface.cpp b/src/core/hle/service/apm/apm_interface.cpp index 041fc16bd..d29051ee7 100644 --- a/src/core/hle/service/apm/apm_interface.cpp +++ b/src/core/hle/service/apm/apm_interface.cpp | |||
| @@ -2,10 +2,10 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/apm/apm.h" | 5 | #include "core/hle/service/apm/apm.h" |
| 7 | #include "core/hle/service/apm/apm_controller.h" | 6 | #include "core/hle/service/apm/apm_controller.h" |
| 8 | #include "core/hle/service/apm/apm_interface.h" | 7 | #include "core/hle/service/apm/apm_interface.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | 9 | ||
| 10 | namespace Service::APM { | 10 | namespace Service::APM { |
| 11 | 11 | ||
| @@ -22,7 +22,7 @@ public: | |||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | private: | 24 | private: |
| 25 | void SetPerformanceConfiguration(Kernel::HLERequestContext& ctx) { | 25 | void SetPerformanceConfiguration(HLERequestContext& ctx) { |
| 26 | IPC::RequestParser rp{ctx}; | 26 | IPC::RequestParser rp{ctx}; |
| 27 | 27 | ||
| 28 | const auto mode = rp.PopEnum<PerformanceMode>(); | 28 | const auto mode = rp.PopEnum<PerformanceMode>(); |
| @@ -35,7 +35,7 @@ private: | |||
| 35 | rb.Push(ResultSuccess); | 35 | rb.Push(ResultSuccess); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void GetPerformanceConfiguration(Kernel::HLERequestContext& ctx) { | 38 | void GetPerformanceConfiguration(HLERequestContext& ctx) { |
| 39 | IPC::RequestParser rp{ctx}; | 39 | IPC::RequestParser rp{ctx}; |
| 40 | 40 | ||
| 41 | const auto mode = rp.PopEnum<PerformanceMode>(); | 41 | const auto mode = rp.PopEnum<PerformanceMode>(); |
| @@ -46,7 +46,7 @@ private: | |||
| 46 | rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode)); | 46 | rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode)); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | void SetCpuOverclockEnabled(Kernel::HLERequestContext& ctx) { | 49 | void SetCpuOverclockEnabled(HLERequestContext& ctx) { |
| 50 | IPC::RequestParser rp{ctx}; | 50 | IPC::RequestParser rp{ctx}; |
| 51 | 51 | ||
| 52 | const auto cpu_overclock_enabled = rp.Pop<bool>(); | 52 | const auto cpu_overclock_enabled = rp.Pop<bool>(); |
| @@ -74,7 +74,7 @@ APM::APM(Core::System& system_, std::shared_ptr<Module> apm_, Controller& contro | |||
| 74 | 74 | ||
| 75 | APM::~APM() = default; | 75 | APM::~APM() = default; |
| 76 | 76 | ||
| 77 | void APM::OpenSession(Kernel::HLERequestContext& ctx) { | 77 | void APM::OpenSession(HLERequestContext& ctx) { |
| 78 | LOG_DEBUG(Service_APM, "called"); | 78 | LOG_DEBUG(Service_APM, "called"); |
| 79 | 79 | ||
| 80 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 80 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -82,14 +82,14 @@ void APM::OpenSession(Kernel::HLERequestContext& ctx) { | |||
| 82 | rb.PushIpcInterface<ISession>(system, controller); | 82 | rb.PushIpcInterface<ISession>(system, controller); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void APM::GetPerformanceMode(Kernel::HLERequestContext& ctx) { | 85 | void APM::GetPerformanceMode(HLERequestContext& ctx) { |
| 86 | LOG_DEBUG(Service_APM, "called"); | 86 | LOG_DEBUG(Service_APM, "called"); |
| 87 | 87 | ||
| 88 | IPC::ResponseBuilder rb{ctx, 2}; | 88 | IPC::ResponseBuilder rb{ctx, 2}; |
| 89 | rb.PushEnum(controller.GetCurrentPerformanceMode()); | 89 | rb.PushEnum(controller.GetCurrentPerformanceMode()); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void APM::IsCpuOverclockEnabled(Kernel::HLERequestContext& ctx) { | 92 | void APM::IsCpuOverclockEnabled(HLERequestContext& ctx) { |
| 93 | LOG_WARNING(Service_APM, "(STUBBED) called"); | 93 | LOG_WARNING(Service_APM, "(STUBBED) called"); |
| 94 | 94 | ||
| 95 | IPC::ResponseBuilder rb{ctx, 3}; | 95 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -117,7 +117,7 @@ APM_Sys::APM_Sys(Core::System& system_, Controller& controller_) | |||
| 117 | 117 | ||
| 118 | APM_Sys::~APM_Sys() = default; | 118 | APM_Sys::~APM_Sys() = default; |
| 119 | 119 | ||
| 120 | void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) { | 120 | void APM_Sys::GetPerformanceEvent(HLERequestContext& ctx) { |
| 121 | LOG_DEBUG(Service_APM, "called"); | 121 | LOG_DEBUG(Service_APM, "called"); |
| 122 | 122 | ||
| 123 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 123 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -125,7 +125,7 @@ void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) { | |||
| 125 | rb.PushIpcInterface<ISession>(system, controller); | 125 | rb.PushIpcInterface<ISession>(system, controller); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { | 128 | void APM_Sys::SetCpuBoostMode(HLERequestContext& ctx) { |
| 129 | IPC::RequestParser rp{ctx}; | 129 | IPC::RequestParser rp{ctx}; |
| 130 | const auto mode = rp.PopEnum<CpuBoostMode>(); | 130 | const auto mode = rp.PopEnum<CpuBoostMode>(); |
| 131 | 131 | ||
| @@ -137,7 +137,7 @@ void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) { | |||
| 137 | rb.Push(ResultSuccess); | 137 | rb.Push(ResultSuccess); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) { | 140 | void APM_Sys::GetCurrentPerformanceConfiguration(HLERequestContext& ctx) { |
| 141 | LOG_DEBUG(Service_APM, "called"); | 141 | LOG_DEBUG(Service_APM, "called"); |
| 142 | 142 | ||
| 143 | IPC::ResponseBuilder rb{ctx, 3}; | 143 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/apm/apm_interface.h b/src/core/hle/service/apm/apm_interface.h index 0740fd4ba..58718453b 100644 --- a/src/core/hle/service/apm/apm_interface.h +++ b/src/core/hle/service/apm/apm_interface.h | |||
| @@ -17,9 +17,9 @@ public: | |||
| 17 | ~APM() override; | 17 | ~APM() override; |
| 18 | 18 | ||
| 19 | private: | 19 | private: |
| 20 | void OpenSession(Kernel::HLERequestContext& ctx); | 20 | void OpenSession(HLERequestContext& ctx); |
| 21 | void GetPerformanceMode(Kernel::HLERequestContext& ctx); | 21 | void GetPerformanceMode(HLERequestContext& ctx); |
| 22 | void IsCpuOverclockEnabled(Kernel::HLERequestContext& ctx); | 22 | void IsCpuOverclockEnabled(HLERequestContext& ctx); |
| 23 | 23 | ||
| 24 | std::shared_ptr<Module> apm; | 24 | std::shared_ptr<Module> apm; |
| 25 | Controller& controller; | 25 | Controller& controller; |
| @@ -30,11 +30,11 @@ public: | |||
| 30 | explicit APM_Sys(Core::System& system_, Controller& controller); | 30 | explicit APM_Sys(Core::System& system_, Controller& controller); |
| 31 | ~APM_Sys() override; | 31 | ~APM_Sys() override; |
| 32 | 32 | ||
| 33 | void SetCpuBoostMode(Kernel::HLERequestContext& ctx); | 33 | void SetCpuBoostMode(HLERequestContext& ctx); |
| 34 | 34 | ||
| 35 | private: | 35 | private: |
| 36 | void GetPerformanceEvent(Kernel::HLERequestContext& ctx); | 36 | void GetPerformanceEvent(HLERequestContext& ctx); |
| 37 | void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx); | 37 | void GetCurrentPerformanceConfiguration(HLERequestContext& ctx); |
| 38 | 38 | ||
| 39 | Controller& controller; | 39 | Controller& controller; |
| 40 | }; | 40 | }; |
diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index 5abf22ba4..7ad93be6b 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/audio/audctl.h" | 5 | #include "core/hle/service/audio/audctl.h" |
| 6 | #include "core/hle/service/ipc_helpers.h" | ||
| 7 | 7 | ||
| 8 | namespace Service::Audio { | 8 | namespace Service::Audio { |
| 9 | 9 | ||
| @@ -72,7 +72,7 @@ AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} { | |||
| 72 | 72 | ||
| 73 | AudCtl::~AudCtl() = default; | 73 | AudCtl::~AudCtl() = default; |
| 74 | 74 | ||
| 75 | void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) { | 75 | void AudCtl::GetTargetVolumeMin(HLERequestContext& ctx) { |
| 76 | LOG_DEBUG(Audio, "called."); | 76 | LOG_DEBUG(Audio, "called."); |
| 77 | 77 | ||
| 78 | // This service function is currently hardcoded on the | 78 | // This service function is currently hardcoded on the |
| @@ -84,7 +84,7 @@ void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) { | |||
| 84 | rb.Push(target_min_volume); | 84 | rb.Push(target_min_volume); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) { | 87 | void AudCtl::GetTargetVolumeMax(HLERequestContext& ctx) { |
| 88 | LOG_DEBUG(Audio, "called."); | 88 | LOG_DEBUG(Audio, "called."); |
| 89 | 89 | ||
| 90 | // This service function is currently hardcoded on the | 90 | // This service function is currently hardcoded on the |
diff --git a/src/core/hle/service/audio/audctl.h b/src/core/hle/service/audio/audctl.h index a27ff6cfe..8e31ac237 100644 --- a/src/core/hle/service/audio/audctl.h +++ b/src/core/hle/service/audio/audctl.h | |||
| @@ -17,8 +17,8 @@ public: | |||
| 17 | ~AudCtl() override; | 17 | ~AudCtl() override; |
| 18 | 18 | ||
| 19 | private: | 19 | private: |
| 20 | void GetTargetVolumeMin(Kernel::HLERequestContext& ctx); | 20 | void GetTargetVolumeMin(HLERequestContext& ctx); |
| 21 | void GetTargetVolumeMax(Kernel::HLERequestContext& ctx); | 21 | void GetTargetVolumeMax(HLERequestContext& ctx); |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | } // namespace Service::Audio | 24 | } // namespace Service::Audio |
diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index 26dec7147..f0640c64f 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp | |||
| @@ -7,9 +7,9 @@ | |||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/string_util.h" | 8 | #include "common/string_util.h" |
| 9 | #include "core/core.h" | 9 | #include "core/core.h" |
| 10 | #include "core/hle/ipc_helpers.h" | ||
| 11 | #include "core/hle/kernel/k_event.h" | 10 | #include "core/hle/kernel/k_event.h" |
| 12 | #include "core/hle/service/audio/audin_u.h" | 11 | #include "core/hle/service/audio/audin_u.h" |
| 12 | #include "core/hle/service/ipc_helpers.h" | ||
| 13 | 13 | ||
| 14 | namespace Service::Audio { | 14 | namespace Service::Audio { |
| 15 | using namespace AudioCore::AudioIn; | 15 | using namespace AudioCore::AudioIn; |
| @@ -61,7 +61,7 @@ public: | |||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | private: | 63 | private: |
| 64 | void GetAudioInState(Kernel::HLERequestContext& ctx) { | 64 | void GetAudioInState(HLERequestContext& ctx) { |
| 65 | const auto state = static_cast<u32>(impl->GetState()); | 65 | const auto state = static_cast<u32>(impl->GetState()); |
| 66 | 66 | ||
| 67 | LOG_DEBUG(Service_Audio, "called. State={}", state); | 67 | LOG_DEBUG(Service_Audio, "called. State={}", state); |
| @@ -71,7 +71,7 @@ private: | |||
| 71 | rb.Push(state); | 71 | rb.Push(state); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | void Start(Kernel::HLERequestContext& ctx) { | 74 | void Start(HLERequestContext& ctx) { |
| 75 | LOG_DEBUG(Service_Audio, "called"); | 75 | LOG_DEBUG(Service_Audio, "called"); |
| 76 | 76 | ||
| 77 | auto result = impl->StartSystem(); | 77 | auto result = impl->StartSystem(); |
| @@ -80,7 +80,7 @@ private: | |||
| 80 | rb.Push(result); | 80 | rb.Push(result); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | void Stop(Kernel::HLERequestContext& ctx) { | 83 | void Stop(HLERequestContext& ctx) { |
| 84 | LOG_DEBUG(Service_Audio, "called"); | 84 | LOG_DEBUG(Service_Audio, "called"); |
| 85 | 85 | ||
| 86 | auto result = impl->StopSystem(); | 86 | auto result = impl->StopSystem(); |
| @@ -89,7 +89,7 @@ private: | |||
| 89 | rb.Push(result); | 89 | rb.Push(result); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void AppendAudioInBuffer(Kernel::HLERequestContext& ctx) { | 92 | void AppendAudioInBuffer(HLERequestContext& ctx) { |
| 93 | IPC::RequestParser rp{ctx}; | 93 | IPC::RequestParser rp{ctx}; |
| 94 | u64 tag = rp.PopRaw<u64>(); | 94 | u64 tag = rp.PopRaw<u64>(); |
| 95 | 95 | ||
| @@ -111,7 +111,7 @@ private: | |||
| 111 | rb.Push(result); | 111 | rb.Push(result); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { | 114 | void RegisterBufferEvent(HLERequestContext& ctx) { |
| 115 | LOG_DEBUG(Service_Audio, "called"); | 115 | LOG_DEBUG(Service_Audio, "called"); |
| 116 | 116 | ||
| 117 | auto& buffer_event = impl->GetBufferEvent(); | 117 | auto& buffer_event = impl->GetBufferEvent(); |
| @@ -121,7 +121,7 @@ private: | |||
| 121 | rb.PushCopyObjects(buffer_event); | 121 | rb.PushCopyObjects(buffer_event); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | void GetReleasedAudioInBuffer(Kernel::HLERequestContext& ctx) { | 124 | void GetReleasedAudioInBuffer(HLERequestContext& ctx) { |
| 125 | const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); | 125 | const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); |
| 126 | std::vector<u64> released_buffers(write_buffer_size); | 126 | std::vector<u64> released_buffers(write_buffer_size); |
| 127 | 127 | ||
| @@ -141,7 +141,7 @@ private: | |||
| 141 | rb.Push(count); | 141 | rb.Push(count); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | void ContainsAudioInBuffer(Kernel::HLERequestContext& ctx) { | 144 | void ContainsAudioInBuffer(HLERequestContext& ctx) { |
| 145 | IPC::RequestParser rp{ctx}; | 145 | IPC::RequestParser rp{ctx}; |
| 146 | 146 | ||
| 147 | const u64 tag{rp.Pop<u64>()}; | 147 | const u64 tag{rp.Pop<u64>()}; |
| @@ -154,7 +154,7 @@ private: | |||
| 154 | rb.Push(buffer_queued); | 154 | rb.Push(buffer_queued); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | void GetAudioInBufferCount(Kernel::HLERequestContext& ctx) { | 157 | void GetAudioInBufferCount(HLERequestContext& ctx) { |
| 158 | const auto buffer_count = impl->GetBufferCount(); | 158 | const auto buffer_count = impl->GetBufferCount(); |
| 159 | 159 | ||
| 160 | LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count); | 160 | LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count); |
| @@ -165,7 +165,7 @@ private: | |||
| 165 | rb.Push(buffer_count); | 165 | rb.Push(buffer_count); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void SetDeviceGain(Kernel::HLERequestContext& ctx) { | 168 | void SetDeviceGain(HLERequestContext& ctx) { |
| 169 | IPC::RequestParser rp{ctx}; | 169 | IPC::RequestParser rp{ctx}; |
| 170 | 170 | ||
| 171 | const auto volume{rp.Pop<f32>()}; | 171 | const auto volume{rp.Pop<f32>()}; |
| @@ -177,7 +177,7 @@ private: | |||
| 177 | rb.Push(ResultSuccess); | 177 | rb.Push(ResultSuccess); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void GetDeviceGain(Kernel::HLERequestContext& ctx) { | 180 | void GetDeviceGain(HLERequestContext& ctx) { |
| 181 | auto volume{impl->GetVolume()}; | 181 | auto volume{impl->GetVolume()}; |
| 182 | 182 | ||
| 183 | LOG_DEBUG(Service_Audio, "called. Gain {}", volume); | 183 | LOG_DEBUG(Service_Audio, "called. Gain {}", volume); |
| @@ -187,7 +187,7 @@ private: | |||
| 187 | rb.Push(volume); | 187 | rb.Push(volume); |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | void FlushAudioInBuffers(Kernel::HLERequestContext& ctx) { | 190 | void FlushAudioInBuffers(HLERequestContext& ctx) { |
| 191 | bool flushed{impl->FlushAudioInBuffers()}; | 191 | bool flushed{impl->FlushAudioInBuffers()}; |
| 192 | 192 | ||
| 193 | LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed); | 193 | LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed); |
| @@ -221,7 +221,7 @@ AudInU::AudInU(Core::System& system_) | |||
| 221 | 221 | ||
| 222 | AudInU::~AudInU() = default; | 222 | AudInU::~AudInU() = default; |
| 223 | 223 | ||
| 224 | void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { | 224 | void AudInU::ListAudioIns(HLERequestContext& ctx) { |
| 225 | using namespace AudioCore::AudioRenderer; | 225 | using namespace AudioCore::AudioRenderer; |
| 226 | 226 | ||
| 227 | LOG_DEBUG(Service_Audio, "called"); | 227 | LOG_DEBUG(Service_Audio, "called"); |
| @@ -241,7 +241,7 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { | |||
| 241 | rb.Push(out_count); | 241 | rb.Push(out_count); |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { | 244 | void AudInU::ListAudioInsAutoFiltered(HLERequestContext& ctx) { |
| 245 | using namespace AudioCore::AudioRenderer; | 245 | using namespace AudioCore::AudioRenderer; |
| 246 | 246 | ||
| 247 | LOG_DEBUG(Service_Audio, "called"); | 247 | LOG_DEBUG(Service_Audio, "called"); |
| @@ -261,7 +261,7 @@ void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { | |||
| 261 | rb.Push(out_count); | 261 | rb.Push(out_count); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { | 264 | void AudInU::OpenAudioIn(HLERequestContext& ctx) { |
| 265 | IPC::RequestParser rp{ctx}; | 265 | IPC::RequestParser rp{ctx}; |
| 266 | auto in_params{rp.PopRaw<AudioInParameter>()}; | 266 | auto in_params{rp.PopRaw<AudioInParameter>()}; |
| 267 | auto applet_resource_user_id{rp.PopRaw<u64>()}; | 267 | auto applet_resource_user_id{rp.PopRaw<u64>()}; |
| @@ -311,7 +311,7 @@ void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { | |||
| 311 | rb.PushIpcInterface<IAudioIn>(audio_in); | 311 | rb.PushIpcInterface<IAudioIn>(audio_in); |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | void AudInU::OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx) { | 314 | void AudInU::OpenAudioInProtocolSpecified(HLERequestContext& ctx) { |
| 315 | IPC::RequestParser rp{ctx}; | 315 | IPC::RequestParser rp{ctx}; |
| 316 | auto protocol_specified{rp.PopRaw<u64>()}; | 316 | auto protocol_specified{rp.PopRaw<u64>()}; |
| 317 | auto in_params{rp.PopRaw<AudioInParameter>()}; | 317 | auto in_params{rp.PopRaw<AudioInParameter>()}; |
diff --git a/src/core/hle/service/audio/audin_u.h b/src/core/hle/service/audio/audin_u.h index b45fda78a..51e770ff9 100644 --- a/src/core/hle/service/audio/audin_u.h +++ b/src/core/hle/service/audio/audin_u.h | |||
| @@ -12,10 +12,6 @@ namespace Core { | |||
| 12 | class System; | 12 | class System; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | namespace Kernel { | ||
| 16 | class HLERequestContext; | ||
| 17 | } | ||
| 18 | |||
| 19 | namespace AudioCore::AudioOut { | 15 | namespace AudioCore::AudioOut { |
| 20 | class Manager; | 16 | class Manager; |
| 21 | class In; | 17 | class In; |
| @@ -29,11 +25,11 @@ public: | |||
| 29 | ~AudInU() override; | 25 | ~AudInU() override; |
| 30 | 26 | ||
| 31 | private: | 27 | private: |
| 32 | void ListAudioIns(Kernel::HLERequestContext& ctx); | 28 | void ListAudioIns(HLERequestContext& ctx); |
| 33 | void ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx); | 29 | void ListAudioInsAutoFiltered(HLERequestContext& ctx); |
| 34 | void OpenInOutImpl(Kernel::HLERequestContext& ctx); | 30 | void OpenInOutImpl(HLERequestContext& ctx); |
| 35 | void OpenAudioIn(Kernel::HLERequestContext& ctx); | 31 | void OpenAudioIn(HLERequestContext& ctx); |
| 36 | void OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx); | 32 | void OpenAudioInProtocolSpecified(HLERequestContext& ctx); |
| 37 | 33 | ||
| 38 | KernelHelpers::ServiceContext service_context; | 34 | KernelHelpers::ServiceContext service_context; |
| 39 | std::unique_ptr<AudioCore::AudioIn::Manager> impl; | 35 | std::unique_ptr<AudioCore::AudioIn::Manager> impl; |
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 991e30ba1..23b8be993 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -12,10 +12,10 @@ | |||
| 12 | #include "common/string_util.h" | 12 | #include "common/string_util.h" |
| 13 | #include "common/swap.h" | 13 | #include "common/swap.h" |
| 14 | #include "core/core.h" | 14 | #include "core/core.h" |
| 15 | #include "core/hle/ipc_helpers.h" | ||
| 16 | #include "core/hle/kernel/k_event.h" | 15 | #include "core/hle/kernel/k_event.h" |
| 17 | #include "core/hle/service/audio/audout_u.h" | 16 | #include "core/hle/service/audio/audout_u.h" |
| 18 | #include "core/hle/service/audio/errors.h" | 17 | #include "core/hle/service/audio/errors.h" |
| 18 | #include "core/hle/service/ipc_helpers.h" | ||
| 19 | #include "core/memory.h" | 19 | #include "core/memory.h" |
| 20 | 20 | ||
| 21 | namespace Service::Audio { | 21 | namespace Service::Audio { |
| @@ -67,7 +67,7 @@ public: | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | private: | 69 | private: |
| 70 | void GetAudioOutState(Kernel::HLERequestContext& ctx) { | 70 | void GetAudioOutState(HLERequestContext& ctx) { |
| 71 | const auto state = static_cast<u32>(impl->GetState()); | 71 | const auto state = static_cast<u32>(impl->GetState()); |
| 72 | 72 | ||
| 73 | LOG_DEBUG(Service_Audio, "called. State={}", state); | 73 | LOG_DEBUG(Service_Audio, "called. State={}", state); |
| @@ -77,7 +77,7 @@ private: | |||
| 77 | rb.Push(state); | 77 | rb.Push(state); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void Start(Kernel::HLERequestContext& ctx) { | 80 | void Start(HLERequestContext& ctx) { |
| 81 | LOG_DEBUG(Service_Audio, "called"); | 81 | LOG_DEBUG(Service_Audio, "called"); |
| 82 | 82 | ||
| 83 | auto result = impl->StartSystem(); | 83 | auto result = impl->StartSystem(); |
| @@ -86,7 +86,7 @@ private: | |||
| 86 | rb.Push(result); | 86 | rb.Push(result); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | void Stop(Kernel::HLERequestContext& ctx) { | 89 | void Stop(HLERequestContext& ctx) { |
| 90 | LOG_DEBUG(Service_Audio, "called"); | 90 | LOG_DEBUG(Service_Audio, "called"); |
| 91 | 91 | ||
| 92 | auto result = impl->StopSystem(); | 92 | auto result = impl->StopSystem(); |
| @@ -95,7 +95,7 @@ private: | |||
| 95 | rb.Push(result); | 95 | rb.Push(result); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void AppendAudioOutBuffer(Kernel::HLERequestContext& ctx) { | 98 | void AppendAudioOutBuffer(HLERequestContext& ctx) { |
| 99 | IPC::RequestParser rp{ctx}; | 99 | IPC::RequestParser rp{ctx}; |
| 100 | u64 tag = rp.PopRaw<u64>(); | 100 | u64 tag = rp.PopRaw<u64>(); |
| 101 | 101 | ||
| @@ -117,7 +117,7 @@ private: | |||
| 117 | rb.Push(result); | 117 | rb.Push(result); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { | 120 | void RegisterBufferEvent(HLERequestContext& ctx) { |
| 121 | LOG_DEBUG(Service_Audio, "called"); | 121 | LOG_DEBUG(Service_Audio, "called"); |
| 122 | 122 | ||
| 123 | auto& buffer_event = impl->GetBufferEvent(); | 123 | auto& buffer_event = impl->GetBufferEvent(); |
| @@ -127,7 +127,7 @@ private: | |||
| 127 | rb.PushCopyObjects(buffer_event); | 127 | rb.PushCopyObjects(buffer_event); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | void GetReleasedAudioOutBuffers(Kernel::HLERequestContext& ctx) { | 130 | void GetReleasedAudioOutBuffers(HLERequestContext& ctx) { |
| 131 | const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); | 131 | const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>(); |
| 132 | std::vector<u64> released_buffers(write_buffer_size); | 132 | std::vector<u64> released_buffers(write_buffer_size); |
| 133 | 133 | ||
| @@ -147,7 +147,7 @@ private: | |||
| 147 | rb.Push(count); | 147 | rb.Push(count); |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | void ContainsAudioOutBuffer(Kernel::HLERequestContext& ctx) { | 150 | void ContainsAudioOutBuffer(HLERequestContext& ctx) { |
| 151 | IPC::RequestParser rp{ctx}; | 151 | IPC::RequestParser rp{ctx}; |
| 152 | 152 | ||
| 153 | const u64 tag{rp.Pop<u64>()}; | 153 | const u64 tag{rp.Pop<u64>()}; |
| @@ -160,7 +160,7 @@ private: | |||
| 160 | rb.Push(buffer_queued); | 160 | rb.Push(buffer_queued); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | void GetAudioOutBufferCount(Kernel::HLERequestContext& ctx) { | 163 | void GetAudioOutBufferCount(HLERequestContext& ctx) { |
| 164 | const auto buffer_count = impl->GetBufferCount(); | 164 | const auto buffer_count = impl->GetBufferCount(); |
| 165 | 165 | ||
| 166 | LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count); | 166 | LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count); |
| @@ -171,7 +171,7 @@ private: | |||
| 171 | rb.Push(buffer_count); | 171 | rb.Push(buffer_count); |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | void GetAudioOutPlayedSampleCount(Kernel::HLERequestContext& ctx) { | 174 | void GetAudioOutPlayedSampleCount(HLERequestContext& ctx) { |
| 175 | const auto samples_played = impl->GetPlayedSampleCount(); | 175 | const auto samples_played = impl->GetPlayedSampleCount(); |
| 176 | 176 | ||
| 177 | LOG_DEBUG(Service_Audio, "called. Played samples={}", samples_played); | 177 | LOG_DEBUG(Service_Audio, "called. Played samples={}", samples_played); |
| @@ -182,7 +182,7 @@ private: | |||
| 182 | rb.Push(samples_played); | 182 | rb.Push(samples_played); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | void FlushAudioOutBuffers(Kernel::HLERequestContext& ctx) { | 185 | void FlushAudioOutBuffers(HLERequestContext& ctx) { |
| 186 | bool flushed{impl->FlushAudioOutBuffers()}; | 186 | bool flushed{impl->FlushAudioOutBuffers()}; |
| 187 | 187 | ||
| 188 | LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed); | 188 | LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed); |
| @@ -192,7 +192,7 @@ private: | |||
| 192 | rb.Push(flushed); | 192 | rb.Push(flushed); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void SetAudioOutVolume(Kernel::HLERequestContext& ctx) { | 195 | void SetAudioOutVolume(HLERequestContext& ctx) { |
| 196 | IPC::RequestParser rp{ctx}; | 196 | IPC::RequestParser rp{ctx}; |
| 197 | const auto volume = rp.Pop<f32>(); | 197 | const auto volume = rp.Pop<f32>(); |
| 198 | 198 | ||
| @@ -204,7 +204,7 @@ private: | |||
| 204 | rb.Push(ResultSuccess); | 204 | rb.Push(ResultSuccess); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | void GetAudioOutVolume(Kernel::HLERequestContext& ctx) { | 207 | void GetAudioOutVolume(HLERequestContext& ctx) { |
| 208 | const auto volume = impl->GetVolume(); | 208 | const auto volume = impl->GetVolume(); |
| 209 | 209 | ||
| 210 | LOG_DEBUG(Service_Audio, "called. Volume={}", volume); | 210 | LOG_DEBUG(Service_Audio, "called. Volume={}", volume); |
| @@ -236,7 +236,7 @@ AudOutU::AudOutU(Core::System& system_) | |||
| 236 | 236 | ||
| 237 | AudOutU::~AudOutU() = default; | 237 | AudOutU::~AudOutU() = default; |
| 238 | 238 | ||
| 239 | void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { | 239 | void AudOutU::ListAudioOuts(HLERequestContext& ctx) { |
| 240 | using namespace AudioCore::AudioRenderer; | 240 | using namespace AudioCore::AudioRenderer; |
| 241 | 241 | ||
| 242 | std::scoped_lock l{impl->mutex}; | 242 | std::scoped_lock l{impl->mutex}; |
| @@ -258,7 +258,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { | |||
| 258 | rb.Push<u32>(static_cast<u32>(device_names.size())); | 258 | rb.Push<u32>(static_cast<u32>(device_names.size())); |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) { | 261 | void AudOutU::OpenAudioOut(HLERequestContext& ctx) { |
| 262 | IPC::RequestParser rp{ctx}; | 262 | IPC::RequestParser rp{ctx}; |
| 263 | auto in_params{rp.PopRaw<AudioOutParameter>()}; | 263 | auto in_params{rp.PopRaw<AudioOutParameter>()}; |
| 264 | auto applet_resource_user_id{rp.PopRaw<u64>()}; | 264 | auto applet_resource_user_id{rp.PopRaw<u64>()}; |
diff --git a/src/core/hle/service/audio/audout_u.h b/src/core/hle/service/audio/audout_u.h index fdc0ee754..8f288c6e0 100644 --- a/src/core/hle/service/audio/audout_u.h +++ b/src/core/hle/service/audio/audout_u.h | |||
| @@ -12,10 +12,6 @@ namespace Core { | |||
| 12 | class System; | 12 | class System; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | namespace Kernel { | ||
| 16 | class HLERequestContext; | ||
| 17 | } | ||
| 18 | |||
| 19 | namespace AudioCore::AudioOut { | 15 | namespace AudioCore::AudioOut { |
| 20 | class Manager; | 16 | class Manager; |
| 21 | class Out; | 17 | class Out; |
| @@ -31,8 +27,8 @@ public: | |||
| 31 | ~AudOutU() override; | 27 | ~AudOutU() override; |
| 32 | 28 | ||
| 33 | private: | 29 | private: |
| 34 | void ListAudioOuts(Kernel::HLERequestContext& ctx); | 30 | void ListAudioOuts(HLERequestContext& ctx); |
| 35 | void OpenAudioOut(Kernel::HLERequestContext& ctx); | 31 | void OpenAudioOut(HLERequestContext& ctx); |
| 36 | 32 | ||
| 37 | KernelHelpers::ServiceContext service_context; | 33 | KernelHelpers::ServiceContext service_context; |
| 38 | std::unique_ptr<AudioCore::AudioOut::Manager> impl; | 34 | std::unique_ptr<AudioCore::AudioOut::Manager> impl; |
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 6c12f00a1..0a6830ffa 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -17,12 +17,12 @@ | |||
| 17 | #include "common/polyfill_ranges.h" | 17 | #include "common/polyfill_ranges.h" |
| 18 | #include "common/string_util.h" | 18 | #include "common/string_util.h" |
| 19 | #include "core/core.h" | 19 | #include "core/core.h" |
| 20 | #include "core/hle/ipc_helpers.h" | ||
| 21 | #include "core/hle/kernel/k_event.h" | 20 | #include "core/hle/kernel/k_event.h" |
| 22 | #include "core/hle/kernel/k_process.h" | 21 | #include "core/hle/kernel/k_process.h" |
| 23 | #include "core/hle/kernel/k_transfer_memory.h" | 22 | #include "core/hle/kernel/k_transfer_memory.h" |
| 24 | #include "core/hle/service/audio/audren_u.h" | 23 | #include "core/hle/service/audio/audren_u.h" |
| 25 | #include "core/hle/service/audio/errors.h" | 24 | #include "core/hle/service/audio/errors.h" |
| 25 | #include "core/hle/service/ipc_helpers.h" | ||
| 26 | #include "core/memory.h" | 26 | #include "core/memory.h" |
| 27 | 27 | ||
| 28 | using namespace AudioCore::AudioRenderer; | 28 | using namespace AudioCore::AudioRenderer; |
| @@ -68,7 +68,7 @@ public: | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | private: | 70 | private: |
| 71 | void GetSampleRate(Kernel::HLERequestContext& ctx) { | 71 | void GetSampleRate(HLERequestContext& ctx) { |
| 72 | const auto sample_rate{impl->GetSystem().GetSampleRate()}; | 72 | const auto sample_rate{impl->GetSystem().GetSampleRate()}; |
| 73 | 73 | ||
| 74 | LOG_DEBUG(Service_Audio, "called. Sample rate {}", sample_rate); | 74 | LOG_DEBUG(Service_Audio, "called. Sample rate {}", sample_rate); |
| @@ -78,7 +78,7 @@ private: | |||
| 78 | rb.Push(sample_rate); | 78 | rb.Push(sample_rate); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void GetSampleCount(Kernel::HLERequestContext& ctx) { | 81 | void GetSampleCount(HLERequestContext& ctx) { |
| 82 | const auto sample_count{impl->GetSystem().GetSampleCount()}; | 82 | const auto sample_count{impl->GetSystem().GetSampleCount()}; |
| 83 | 83 | ||
| 84 | LOG_DEBUG(Service_Audio, "called. Sample count {}", sample_count); | 84 | LOG_DEBUG(Service_Audio, "called. Sample count {}", sample_count); |
| @@ -88,7 +88,7 @@ private: | |||
| 88 | rb.Push(sample_count); | 88 | rb.Push(sample_count); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void GetState(Kernel::HLERequestContext& ctx) { | 91 | void GetState(HLERequestContext& ctx) { |
| 92 | const u32 state{!impl->GetSystem().IsActive()}; | 92 | const u32 state{!impl->GetSystem().IsActive()}; |
| 93 | 93 | ||
| 94 | LOG_DEBUG(Service_Audio, "called, state {}", state); | 94 | LOG_DEBUG(Service_Audio, "called, state {}", state); |
| @@ -98,7 +98,7 @@ private: | |||
| 98 | rb.Push(state); | 98 | rb.Push(state); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | void GetMixBufferCount(Kernel::HLERequestContext& ctx) { | 101 | void GetMixBufferCount(HLERequestContext& ctx) { |
| 102 | LOG_DEBUG(Service_Audio, "called"); | 102 | LOG_DEBUG(Service_Audio, "called"); |
| 103 | 103 | ||
| 104 | const auto buffer_count{impl->GetSystem().GetMixBufferCount()}; | 104 | const auto buffer_count{impl->GetSystem().GetMixBufferCount()}; |
| @@ -108,7 +108,7 @@ private: | |||
| 108 | rb.Push(buffer_count); | 108 | rb.Push(buffer_count); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | void RequestUpdate(Kernel::HLERequestContext& ctx) { | 111 | void RequestUpdate(HLERequestContext& ctx) { |
| 112 | LOG_TRACE(Service_Audio, "called"); | 112 | LOG_TRACE(Service_Audio, "called"); |
| 113 | 113 | ||
| 114 | const auto input{ctx.ReadBuffer(0)}; | 114 | const auto input{ctx.ReadBuffer(0)}; |
| @@ -147,7 +147,7 @@ private: | |||
| 147 | rb.Push(result); | 147 | rb.Push(result); |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | void Start(Kernel::HLERequestContext& ctx) { | 150 | void Start(HLERequestContext& ctx) { |
| 151 | LOG_DEBUG(Service_Audio, "called"); | 151 | LOG_DEBUG(Service_Audio, "called"); |
| 152 | 152 | ||
| 153 | impl->Start(); | 153 | impl->Start(); |
| @@ -156,7 +156,7 @@ private: | |||
| 156 | rb.Push(ResultSuccess); | 156 | rb.Push(ResultSuccess); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | void Stop(Kernel::HLERequestContext& ctx) { | 159 | void Stop(HLERequestContext& ctx) { |
| 160 | LOG_DEBUG(Service_Audio, "called"); | 160 | LOG_DEBUG(Service_Audio, "called"); |
| 161 | 161 | ||
| 162 | impl->Stop(); | 162 | impl->Stop(); |
| @@ -165,7 +165,7 @@ private: | |||
| 165 | rb.Push(ResultSuccess); | 165 | rb.Push(ResultSuccess); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void QuerySystemEvent(Kernel::HLERequestContext& ctx) { | 168 | void QuerySystemEvent(HLERequestContext& ctx) { |
| 169 | LOG_DEBUG(Service_Audio, "called"); | 169 | LOG_DEBUG(Service_Audio, "called"); |
| 170 | 170 | ||
| 171 | if (impl->GetSystem().GetExecutionMode() == AudioCore::ExecutionMode::Manual) { | 171 | if (impl->GetSystem().GetExecutionMode() == AudioCore::ExecutionMode::Manual) { |
| @@ -179,7 +179,7 @@ private: | |||
| 179 | rb.PushCopyObjects(rendered_event->GetReadableEvent()); | 179 | rb.PushCopyObjects(rendered_event->GetReadableEvent()); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | void SetRenderingTimeLimit(Kernel::HLERequestContext& ctx) { | 182 | void SetRenderingTimeLimit(HLERequestContext& ctx) { |
| 183 | LOG_DEBUG(Service_Audio, "called"); | 183 | LOG_DEBUG(Service_Audio, "called"); |
| 184 | 184 | ||
| 185 | IPC::RequestParser rp{ctx}; | 185 | IPC::RequestParser rp{ctx}; |
| @@ -192,7 +192,7 @@ private: | |||
| 192 | rb.Push(ResultSuccess); | 192 | rb.Push(ResultSuccess); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) { | 195 | void GetRenderingTimeLimit(HLERequestContext& ctx) { |
| 196 | LOG_DEBUG(Service_Audio, "called"); | 196 | LOG_DEBUG(Service_Audio, "called"); |
| 197 | 197 | ||
| 198 | auto& system_ = impl->GetSystem(); | 198 | auto& system_ = impl->GetSystem(); |
| @@ -203,11 +203,11 @@ private: | |||
| 203 | rb.Push(time); | 203 | rb.Push(time); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | void ExecuteAudioRendererRendering(Kernel::HLERequestContext& ctx) { | 206 | void ExecuteAudioRendererRendering(HLERequestContext& ctx) { |
| 207 | LOG_DEBUG(Service_Audio, "called"); | 207 | LOG_DEBUG(Service_Audio, "called"); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | void SetVoiceDropParameter(Kernel::HLERequestContext& ctx) { | 210 | void SetVoiceDropParameter(HLERequestContext& ctx) { |
| 211 | LOG_DEBUG(Service_Audio, "called"); | 211 | LOG_DEBUG(Service_Audio, "called"); |
| 212 | 212 | ||
| 213 | IPC::RequestParser rp{ctx}; | 213 | IPC::RequestParser rp{ctx}; |
| @@ -220,7 +220,7 @@ private: | |||
| 220 | rb.Push(ResultSuccess); | 220 | rb.Push(ResultSuccess); |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | void GetVoiceDropParameter(Kernel::HLERequestContext& ctx) { | 223 | void GetVoiceDropParameter(HLERequestContext& ctx) { |
| 224 | LOG_DEBUG(Service_Audio, "called"); | 224 | LOG_DEBUG(Service_Audio, "called"); |
| 225 | 225 | ||
| 226 | auto& system_ = impl->GetSystem(); | 226 | auto& system_ = impl->GetSystem(); |
| @@ -271,7 +271,7 @@ public: | |||
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | private: | 273 | private: |
| 274 | void ListAudioDeviceName(Kernel::HLERequestContext& ctx) { | 274 | void ListAudioDeviceName(HLERequestContext& ctx) { |
| 275 | const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>(); | 275 | const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>(); |
| 276 | 276 | ||
| 277 | std::vector<AudioDevice::AudioDeviceName> out_names{}; | 277 | std::vector<AudioDevice::AudioDeviceName> out_names{}; |
| @@ -299,7 +299,7 @@ private: | |||
| 299 | rb.Push(out_count); | 299 | rb.Push(out_count); |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | void SetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { | 302 | void SetAudioDeviceOutputVolume(HLERequestContext& ctx) { |
| 303 | IPC::RequestParser rp{ctx}; | 303 | IPC::RequestParser rp{ctx}; |
| 304 | const f32 volume = rp.Pop<f32>(); | 304 | const f32 volume = rp.Pop<f32>(); |
| 305 | 305 | ||
| @@ -316,7 +316,7 @@ private: | |||
| 316 | rb.Push(ResultSuccess); | 316 | rb.Push(ResultSuccess); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { | 319 | void GetAudioDeviceOutputVolume(HLERequestContext& ctx) { |
| 320 | const auto device_name_buffer = ctx.ReadBuffer(); | 320 | const auto device_name_buffer = ctx.ReadBuffer(); |
| 321 | const std::string name = Common::StringFromBuffer(device_name_buffer); | 321 | const std::string name = Common::StringFromBuffer(device_name_buffer); |
| 322 | 322 | ||
| @@ -332,7 +332,7 @@ private: | |||
| 332 | rb.Push(volume); | 332 | rb.Push(volume); |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | void GetActiveAudioDeviceName(Kernel::HLERequestContext& ctx) { | 335 | void GetActiveAudioDeviceName(HLERequestContext& ctx) { |
| 336 | const auto write_size = ctx.GetWriteBufferSize(); | 336 | const auto write_size = ctx.GetWriteBufferSize(); |
| 337 | std::string out_name{"AudioTvOutput"}; | 337 | std::string out_name{"AudioTvOutput"}; |
| 338 | 338 | ||
| @@ -346,7 +346,7 @@ private: | |||
| 346 | rb.Push(ResultSuccess); | 346 | rb.Push(ResultSuccess); |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { | 349 | void QueryAudioDeviceSystemEvent(HLERequestContext& ctx) { |
| 350 | LOG_DEBUG(Service_Audio, "(STUBBED) called"); | 350 | LOG_DEBUG(Service_Audio, "(STUBBED) called"); |
| 351 | 351 | ||
| 352 | event->Signal(); | 352 | event->Signal(); |
| @@ -356,7 +356,7 @@ private: | |||
| 356 | rb.PushCopyObjects(event->GetReadableEvent()); | 356 | rb.PushCopyObjects(event->GetReadableEvent()); |
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | void GetActiveChannelCount(Kernel::HLERequestContext& ctx) { | 359 | void GetActiveChannelCount(HLERequestContext& ctx) { |
| 360 | const auto& sink{system.AudioCore().GetOutputSink()}; | 360 | const auto& sink{system.AudioCore().GetOutputSink()}; |
| 361 | u32 channel_count{sink.GetDeviceChannels()}; | 361 | u32 channel_count{sink.GetDeviceChannels()}; |
| 362 | 362 | ||
| @@ -368,7 +368,7 @@ private: | |||
| 368 | rb.Push<u32>(channel_count); | 368 | rb.Push<u32>(channel_count); |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | void QueryAudioDeviceInputEvent(Kernel::HLERequestContext& ctx) { | 371 | void QueryAudioDeviceInputEvent(HLERequestContext& ctx) { |
| 372 | LOG_DEBUG(Service_Audio, "(STUBBED) called"); | 372 | LOG_DEBUG(Service_Audio, "(STUBBED) called"); |
| 373 | 373 | ||
| 374 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 374 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -376,7 +376,7 @@ private: | |||
| 376 | rb.PushCopyObjects(event->GetReadableEvent()); | 376 | rb.PushCopyObjects(event->GetReadableEvent()); |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | void QueryAudioDeviceOutputEvent(Kernel::HLERequestContext& ctx) { | 379 | void QueryAudioDeviceOutputEvent(HLERequestContext& ctx) { |
| 380 | LOG_DEBUG(Service_Audio, "called"); | 380 | LOG_DEBUG(Service_Audio, "called"); |
| 381 | 381 | ||
| 382 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 382 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -384,7 +384,7 @@ private: | |||
| 384 | rb.PushCopyObjects(event->GetReadableEvent()); | 384 | rb.PushCopyObjects(event->GetReadableEvent()); |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | void ListAudioOutputDeviceName(Kernel::HLERequestContext& ctx) { | 387 | void ListAudioOutputDeviceName(HLERequestContext& ctx) { |
| 388 | const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>(); | 388 | const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>(); |
| 389 | 389 | ||
| 390 | std::vector<AudioDevice::AudioDeviceName> out_names{}; | 390 | std::vector<AudioDevice::AudioDeviceName> out_names{}; |
| @@ -435,7 +435,7 @@ AudRenU::AudRenU(Core::System& system_) | |||
| 435 | 435 | ||
| 436 | AudRenU::~AudRenU() = default; | 436 | AudRenU::~AudRenU() = default; |
| 437 | 437 | ||
| 438 | void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) { | 438 | void AudRenU::OpenAudioRenderer(HLERequestContext& ctx) { |
| 439 | IPC::RequestParser rp{ctx}; | 439 | IPC::RequestParser rp{ctx}; |
| 440 | 440 | ||
| 441 | AudioCore::AudioRendererParameterInternal params; | 441 | AudioCore::AudioRendererParameterInternal params; |
| @@ -475,7 +475,7 @@ void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) { | |||
| 475 | applet_resource_user_id, session_id); | 475 | applet_resource_user_id, session_id); |
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | void AudRenU::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { | 478 | void AudRenU::GetWorkBufferSize(HLERequestContext& ctx) { |
| 479 | AudioCore::AudioRendererParameterInternal params; | 479 | AudioCore::AudioRendererParameterInternal params; |
| 480 | 480 | ||
| 481 | IPC::RequestParser rp{ctx}; | 481 | IPC::RequestParser rp{ctx}; |
| @@ -506,7 +506,7 @@ void AudRenU::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { | |||
| 506 | rb.Push<u64>(size); | 506 | rb.Push<u64>(size); |
| 507 | } | 507 | } |
| 508 | 508 | ||
| 509 | void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) { | 509 | void AudRenU::GetAudioDeviceService(HLERequestContext& ctx) { |
| 510 | IPC::RequestParser rp{ctx}; | 510 | IPC::RequestParser rp{ctx}; |
| 511 | 511 | ||
| 512 | const auto applet_resource_user_id = rp.Pop<u64>(); | 512 | const auto applet_resource_user_id = rp.Pop<u64>(); |
| @@ -520,11 +520,11 @@ void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) { | |||
| 520 | ::Common::MakeMagic('R', 'E', 'V', '1'), num_audio_devices++); | 520 | ::Common::MakeMagic('R', 'E', 'V', '1'), num_audio_devices++); |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | void AudRenU::OpenAudioRendererForManualExecution(Kernel::HLERequestContext& ctx) { | 523 | void AudRenU::OpenAudioRendererForManualExecution(HLERequestContext& ctx) { |
| 524 | LOG_DEBUG(Service_Audio, "called"); | 524 | LOG_DEBUG(Service_Audio, "called"); |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | void AudRenU::GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx) { | 527 | void AudRenU::GetAudioDeviceServiceWithRevisionInfo(HLERequestContext& ctx) { |
| 528 | struct Parameters { | 528 | struct Parameters { |
| 529 | u32 revision; | 529 | u32 revision; |
| 530 | u64 applet_resource_user_id; | 530 | u64 applet_resource_user_id; |
diff --git a/src/core/hle/service/audio/audren_u.h b/src/core/hle/service/audio/audren_u.h index 4384a9b3c..24ce37e87 100644 --- a/src/core/hle/service/audio/audren_u.h +++ b/src/core/hle/service/audio/audren_u.h | |||
| @@ -11,10 +11,6 @@ namespace Core { | |||
| 11 | class System; | 11 | class System; |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | namespace Kernel { | ||
| 15 | class HLERequestContext; | ||
| 16 | } | ||
| 17 | |||
| 18 | namespace Service::Audio { | 14 | namespace Service::Audio { |
| 19 | class IAudioRenderer; | 15 | class IAudioRenderer; |
| 20 | 16 | ||
| @@ -24,11 +20,11 @@ public: | |||
| 24 | ~AudRenU() override; | 20 | ~AudRenU() override; |
| 25 | 21 | ||
| 26 | private: | 22 | private: |
| 27 | void OpenAudioRenderer(Kernel::HLERequestContext& ctx); | 23 | void OpenAudioRenderer(HLERequestContext& ctx); |
| 28 | void GetWorkBufferSize(Kernel::HLERequestContext& ctx); | 24 | void GetWorkBufferSize(HLERequestContext& ctx); |
| 29 | void GetAudioDeviceService(Kernel::HLERequestContext& ctx); | 25 | void GetAudioDeviceService(HLERequestContext& ctx); |
| 30 | void OpenAudioRendererForManualExecution(Kernel::HLERequestContext& ctx); | 26 | void OpenAudioRendererForManualExecution(HLERequestContext& ctx); |
| 31 | void GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx); | 27 | void GetAudioDeviceServiceWithRevisionInfo(HLERequestContext& ctx); |
| 32 | 28 | ||
| 33 | KernelHelpers::ServiceContext service_context; | 29 | KernelHelpers::ServiceContext service_context; |
| 34 | std::unique_ptr<AudioCore::AudioRenderer::Manager> impl; | 30 | std::unique_ptr<AudioCore::AudioRenderer::Manager> impl; |
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 3db3fe188..451ac224a 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | 11 | ||
| 12 | #include "common/assert.h" | 12 | #include "common/assert.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "core/hle/ipc_helpers.h" | ||
| 15 | #include "core/hle/service/audio/hwopus.h" | 14 | #include "core/hle/service/audio/hwopus.h" |
| 15 | #include "core/hle/service/ipc_helpers.h" | ||
| 16 | 16 | ||
| 17 | namespace Service::Audio { | 17 | namespace Service::Audio { |
| 18 | namespace { | 18 | namespace { |
| @@ -53,7 +53,7 @@ public: | |||
| 53 | 53 | ||
| 54 | // Decodes interleaved Opus packets. Optionally allows reporting time taken to | 54 | // Decodes interleaved Opus packets. Optionally allows reporting time taken to |
| 55 | // perform the decoding, as well as any relevant extra behavior. | 55 | // perform the decoding, as well as any relevant extra behavior. |
| 56 | void DecodeInterleaved(Kernel::HLERequestContext& ctx, PerfTime perf_time, | 56 | void DecodeInterleaved(HLERequestContext& ctx, PerfTime perf_time, |
| 57 | ExtraBehavior extra_behavior) { | 57 | ExtraBehavior extra_behavior) { |
| 58 | if (perf_time == PerfTime::Disabled) { | 58 | if (perf_time == PerfTime::Disabled) { |
| 59 | DecodeInterleavedHelper(ctx, nullptr, extra_behavior); | 59 | DecodeInterleavedHelper(ctx, nullptr, extra_behavior); |
| @@ -64,7 +64,7 @@ public: | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | private: | 66 | private: |
| 67 | void DecodeInterleavedHelper(Kernel::HLERequestContext& ctx, u64* performance, | 67 | void DecodeInterleavedHelper(HLERequestContext& ctx, u64* performance, |
| 68 | ExtraBehavior extra_behavior) { | 68 | ExtraBehavior extra_behavior) { |
| 69 | u32 consumed = 0; | 69 | u32 consumed = 0; |
| 70 | u32 sample_count = 0; | 70 | u32 sample_count = 0; |
| @@ -180,21 +180,21 @@ public: | |||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | private: | 182 | private: |
| 183 | void DecodeInterleavedOld(Kernel::HLERequestContext& ctx) { | 183 | void DecodeInterleavedOld(HLERequestContext& ctx) { |
| 184 | LOG_DEBUG(Audio, "called"); | 184 | LOG_DEBUG(Audio, "called"); |
| 185 | 185 | ||
| 186 | decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Disabled, | 186 | decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Disabled, |
| 187 | OpusDecoderState::ExtraBehavior::None); | 187 | OpusDecoderState::ExtraBehavior::None); |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | void DecodeInterleavedWithPerfOld(Kernel::HLERequestContext& ctx) { | 190 | void DecodeInterleavedWithPerfOld(HLERequestContext& ctx) { |
| 191 | LOG_DEBUG(Audio, "called"); | 191 | LOG_DEBUG(Audio, "called"); |
| 192 | 192 | ||
| 193 | decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Enabled, | 193 | decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Enabled, |
| 194 | OpusDecoderState::ExtraBehavior::None); | 194 | OpusDecoderState::ExtraBehavior::None); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | void DecodeInterleaved(Kernel::HLERequestContext& ctx) { | 197 | void DecodeInterleaved(HLERequestContext& ctx) { |
| 198 | LOG_DEBUG(Audio, "called"); | 198 | LOG_DEBUG(Audio, "called"); |
| 199 | 199 | ||
| 200 | IPC::RequestParser rp{ctx}; | 200 | IPC::RequestParser rp{ctx}; |
| @@ -231,7 +231,7 @@ std::array<u8, 2> CreateMappingTable(u32 channel_count) { | |||
| 231 | } | 231 | } |
| 232 | } // Anonymous namespace | 232 | } // Anonymous namespace |
| 233 | 233 | ||
| 234 | void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { | 234 | void HwOpus::GetWorkBufferSize(HLERequestContext& ctx) { |
| 235 | IPC::RequestParser rp{ctx}; | 235 | IPC::RequestParser rp{ctx}; |
| 236 | const auto sample_rate = rp.Pop<u32>(); | 236 | const auto sample_rate = rp.Pop<u32>(); |
| 237 | const auto channel_count = rp.Pop<u32>(); | 237 | const auto channel_count = rp.Pop<u32>(); |
| @@ -251,11 +251,11 @@ void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { | |||
| 251 | rb.Push<u32>(worker_buffer_sz); | 251 | rb.Push<u32>(worker_buffer_sz); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | void HwOpus::GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx) { | 254 | void HwOpus::GetWorkBufferSizeEx(HLERequestContext& ctx) { |
| 255 | GetWorkBufferSize(ctx); | 255 | GetWorkBufferSize(ctx); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) { | 258 | void HwOpus::GetWorkBufferSizeForMultiStreamEx(HLERequestContext& ctx) { |
| 259 | OpusMultiStreamParametersEx param; | 259 | OpusMultiStreamParametersEx param; |
| 260 | std::memcpy(¶m, ctx.ReadBuffer().data(), ctx.GetReadBufferSize()); | 260 | std::memcpy(¶m, ctx.ReadBuffer().data(), ctx.GetReadBufferSize()); |
| 261 | 261 | ||
| @@ -281,7 +281,7 @@ void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) { | |||
| 281 | rb.Push<u32>(worker_buffer_sz); | 281 | rb.Push<u32>(worker_buffer_sz); |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) { | 284 | void HwOpus::OpenHardwareOpusDecoder(HLERequestContext& ctx) { |
| 285 | IPC::RequestParser rp{ctx}; | 285 | IPC::RequestParser rp{ctx}; |
| 286 | const auto sample_rate = rp.Pop<u32>(); | 286 | const auto sample_rate = rp.Pop<u32>(); |
| 287 | const auto channel_count = rp.Pop<u32>(); | 287 | const auto channel_count = rp.Pop<u32>(); |
| @@ -319,7 +319,7 @@ void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) { | |||
| 319 | system, OpusDecoderState{std::move(decoder), sample_rate, channel_count}); | 319 | system, OpusDecoderState{std::move(decoder), sample_rate, channel_count}); |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | void HwOpus::OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx) { | 322 | void HwOpus::OpenHardwareOpusDecoderEx(HLERequestContext& ctx) { |
| 323 | IPC::RequestParser rp{ctx}; | 323 | IPC::RequestParser rp{ctx}; |
| 324 | const auto sample_rate = rp.Pop<u32>(); | 324 | const auto sample_rate = rp.Pop<u32>(); |
| 325 | const auto channel_count = rp.Pop<u32>(); | 325 | const auto channel_count = rp.Pop<u32>(); |
diff --git a/src/core/hle/service/audio/hwopus.h b/src/core/hle/service/audio/hwopus.h index e6092e290..ece65c02c 100644 --- a/src/core/hle/service/audio/hwopus.h +++ b/src/core/hle/service/audio/hwopus.h | |||
| @@ -27,11 +27,11 @@ public: | |||
| 27 | ~HwOpus() override; | 27 | ~HwOpus() override; |
| 28 | 28 | ||
| 29 | private: | 29 | private: |
| 30 | void OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx); | 30 | void OpenHardwareOpusDecoder(HLERequestContext& ctx); |
| 31 | void OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx); | 31 | void OpenHardwareOpusDecoderEx(HLERequestContext& ctx); |
| 32 | void GetWorkBufferSize(Kernel::HLERequestContext& ctx); | 32 | void GetWorkBufferSize(HLERequestContext& ctx); |
| 33 | void GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx); | 33 | void GetWorkBufferSizeEx(HLERequestContext& ctx); |
| 34 | void GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx); | 34 | void GetWorkBufferSizeForMultiStreamEx(HLERequestContext& ctx); |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | } // namespace Service::Audio | 37 | } // namespace Service::Audio |
diff --git a/src/core/hle/service/bcat/bcat_module.cpp b/src/core/hle/service/bcat/bcat_module.cpp index 1db3f026b..a6281913a 100644 --- a/src/core/hle/service/bcat/bcat_module.cpp +++ b/src/core/hle/service/bcat/bcat_module.cpp | |||
| @@ -9,12 +9,12 @@ | |||
| 9 | #include "common/string_util.h" | 9 | #include "common/string_util.h" |
| 10 | #include "core/core.h" | 10 | #include "core/core.h" |
| 11 | #include "core/file_sys/vfs.h" | 11 | #include "core/file_sys/vfs.h" |
| 12 | #include "core/hle/ipc_helpers.h" | ||
| 13 | #include "core/hle/kernel/k_readable_event.h" | 12 | #include "core/hle/kernel/k_readable_event.h" |
| 14 | #include "core/hle/service/bcat/backend/backend.h" | 13 | #include "core/hle/service/bcat/backend/backend.h" |
| 15 | #include "core/hle/service/bcat/bcat.h" | 14 | #include "core/hle/service/bcat/bcat.h" |
| 16 | #include "core/hle/service/bcat/bcat_module.h" | 15 | #include "core/hle/service/bcat/bcat_module.h" |
| 17 | #include "core/hle/service/filesystem/filesystem.h" | 16 | #include "core/hle/service/filesystem/filesystem.h" |
| 17 | #include "core/hle/service/ipc_helpers.h" | ||
| 18 | #include "core/hle/service/server_manager.h" | 18 | #include "core/hle/service/server_manager.h" |
| 19 | 19 | ||
| 20 | namespace Service::BCAT { | 20 | namespace Service::BCAT { |
| @@ -51,8 +51,7 @@ BCATDigest DigestFile(const FileSys::VirtualFile& file) { | |||
| 51 | // For a name to be valid it must be non-empty, must have a null terminating character as the final | 51 | // For a name to be valid it must be non-empty, must have a null terminating character as the final |
| 52 | // char, can only contain numbers, letters, underscores and a hyphen if directory and a period if | 52 | // char, can only contain numbers, letters, underscores and a hyphen if directory and a period if |
| 53 | // file. | 53 | // file. |
| 54 | bool VerifyNameValidInternal(Kernel::HLERequestContext& ctx, std::array<char, 0x20> name, | 54 | bool VerifyNameValidInternal(HLERequestContext& ctx, std::array<char, 0x20> name, char match_char) { |
| 55 | char match_char) { | ||
| 56 | const auto null_chars = std::count(name.begin(), name.end(), 0); | 55 | const auto null_chars = std::count(name.begin(), name.end(), 0); |
| 57 | const auto bad_chars = std::count_if(name.begin(), name.end(), [match_char](char c) { | 56 | const auto bad_chars = std::count_if(name.begin(), name.end(), [match_char](char c) { |
| 58 | return !std::isalnum(static_cast<u8>(c)) && c != '_' && c != match_char && c != '\0'; | 57 | return !std::isalnum(static_cast<u8>(c)) && c != '_' && c != match_char && c != '\0'; |
| @@ -67,11 +66,11 @@ bool VerifyNameValidInternal(Kernel::HLERequestContext& ctx, std::array<char, 0x | |||
| 67 | return true; | 66 | return true; |
| 68 | } | 67 | } |
| 69 | 68 | ||
| 70 | bool VerifyNameValidDir(Kernel::HLERequestContext& ctx, DirectoryName name) { | 69 | bool VerifyNameValidDir(HLERequestContext& ctx, DirectoryName name) { |
| 71 | return VerifyNameValidInternal(ctx, name, '-'); | 70 | return VerifyNameValidInternal(ctx, name, '-'); |
| 72 | } | 71 | } |
| 73 | 72 | ||
| 74 | bool VerifyNameValidFile(Kernel::HLERequestContext& ctx, FileName name) { | 73 | bool VerifyNameValidFile(HLERequestContext& ctx, FileName name) { |
| 75 | return VerifyNameValidInternal(ctx, name, '.'); | 74 | return VerifyNameValidInternal(ctx, name, '.'); |
| 76 | } | 75 | } |
| 77 | 76 | ||
| @@ -99,7 +98,7 @@ public: | |||
| 99 | } | 98 | } |
| 100 | 99 | ||
| 101 | private: | 100 | private: |
| 102 | void GetEvent(Kernel::HLERequestContext& ctx) { | 101 | void GetEvent(HLERequestContext& ctx) { |
| 103 | LOG_DEBUG(Service_BCAT, "called"); | 102 | LOG_DEBUG(Service_BCAT, "called"); |
| 104 | 103 | ||
| 105 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 104 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -107,7 +106,7 @@ private: | |||
| 107 | rb.PushCopyObjects(event); | 106 | rb.PushCopyObjects(event); |
| 108 | } | 107 | } |
| 109 | 108 | ||
| 110 | void GetImpl(Kernel::HLERequestContext& ctx) { | 109 | void GetImpl(HLERequestContext& ctx) { |
| 111 | LOG_DEBUG(Service_BCAT, "called"); | 110 | LOG_DEBUG(Service_BCAT, "called"); |
| 112 | 111 | ||
| 113 | ctx.WriteBuffer(impl); | 112 | ctx.WriteBuffer(impl); |
| @@ -174,7 +173,7 @@ private: | |||
| 174 | progress_backend.GetImpl()); | 173 | progress_backend.GetImpl()); |
| 175 | } | 174 | } |
| 176 | 175 | ||
| 177 | void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) { | 176 | void RequestSyncDeliveryCache(HLERequestContext& ctx) { |
| 178 | LOG_DEBUG(Service_BCAT, "called"); | 177 | LOG_DEBUG(Service_BCAT, "called"); |
| 179 | 178 | ||
| 180 | backend.Synchronize({system.GetApplicationProcessProgramID(), | 179 | backend.Synchronize({system.GetApplicationProcessProgramID(), |
| @@ -186,7 +185,7 @@ private: | |||
| 186 | rb.PushIpcInterface(CreateProgressService(SyncType::Normal)); | 185 | rb.PushIpcInterface(CreateProgressService(SyncType::Normal)); |
| 187 | } | 186 | } |
| 188 | 187 | ||
| 189 | void RequestSyncDeliveryCacheWithDirectoryName(Kernel::HLERequestContext& ctx) { | 188 | void RequestSyncDeliveryCacheWithDirectoryName(HLERequestContext& ctx) { |
| 190 | IPC::RequestParser rp{ctx}; | 189 | IPC::RequestParser rp{ctx}; |
| 191 | const auto name_raw = rp.PopRaw<DirectoryName>(); | 190 | const auto name_raw = rp.PopRaw<DirectoryName>(); |
| 192 | const auto name = | 191 | const auto name = |
| @@ -203,7 +202,7 @@ private: | |||
| 203 | rb.PushIpcInterface(CreateProgressService(SyncType::Directory)); | 202 | rb.PushIpcInterface(CreateProgressService(SyncType::Directory)); |
| 204 | } | 203 | } |
| 205 | 204 | ||
| 206 | void SetPassphrase(Kernel::HLERequestContext& ctx) { | 205 | void SetPassphrase(HLERequestContext& ctx) { |
| 207 | IPC::RequestParser rp{ctx}; | 206 | IPC::RequestParser rp{ctx}; |
| 208 | const auto title_id = rp.PopRaw<u64>(); | 207 | const auto title_id = rp.PopRaw<u64>(); |
| 209 | 208 | ||
| @@ -235,7 +234,7 @@ private: | |||
| 235 | rb.Push(ResultSuccess); | 234 | rb.Push(ResultSuccess); |
| 236 | } | 235 | } |
| 237 | 236 | ||
| 238 | void ClearDeliveryCacheStorage(Kernel::HLERequestContext& ctx) { | 237 | void ClearDeliveryCacheStorage(HLERequestContext& ctx) { |
| 239 | IPC::RequestParser rp{ctx}; | 238 | IPC::RequestParser rp{ctx}; |
| 240 | const auto title_id = rp.PopRaw<u64>(); | 239 | const auto title_id = rp.PopRaw<u64>(); |
| 241 | 240 | ||
| @@ -271,7 +270,7 @@ private: | |||
| 271 | std::array<ProgressServiceBackend, static_cast<size_t>(SyncType::Count)> progress; | 270 | std::array<ProgressServiceBackend, static_cast<size_t>(SyncType::Count)> progress; |
| 272 | }; | 271 | }; |
| 273 | 272 | ||
| 274 | void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) { | 273 | void Module::Interface::CreateBcatService(HLERequestContext& ctx) { |
| 275 | LOG_DEBUG(Service_BCAT, "called"); | 274 | LOG_DEBUG(Service_BCAT, "called"); |
| 276 | 275 | ||
| 277 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 276 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -296,7 +295,7 @@ public: | |||
| 296 | } | 295 | } |
| 297 | 296 | ||
| 298 | private: | 297 | private: |
| 299 | void Open(Kernel::HLERequestContext& ctx) { | 298 | void Open(HLERequestContext& ctx) { |
| 300 | IPC::RequestParser rp{ctx}; | 299 | IPC::RequestParser rp{ctx}; |
| 301 | const auto dir_name_raw = rp.PopRaw<DirectoryName>(); | 300 | const auto dir_name_raw = rp.PopRaw<DirectoryName>(); |
| 302 | const auto file_name_raw = rp.PopRaw<FileName>(); | 301 | const auto file_name_raw = rp.PopRaw<FileName>(); |
| @@ -340,7 +339,7 @@ private: | |||
| 340 | rb.Push(ResultSuccess); | 339 | rb.Push(ResultSuccess); |
| 341 | } | 340 | } |
| 342 | 341 | ||
| 343 | void Read(Kernel::HLERequestContext& ctx) { | 342 | void Read(HLERequestContext& ctx) { |
| 344 | IPC::RequestParser rp{ctx}; | 343 | IPC::RequestParser rp{ctx}; |
| 345 | const auto offset{rp.PopRaw<u64>()}; | 344 | const auto offset{rp.PopRaw<u64>()}; |
| 346 | 345 | ||
| @@ -363,7 +362,7 @@ private: | |||
| 363 | rb.Push<u64>(buffer.size()); | 362 | rb.Push<u64>(buffer.size()); |
| 364 | } | 363 | } |
| 365 | 364 | ||
| 366 | void GetSize(Kernel::HLERequestContext& ctx) { | 365 | void GetSize(HLERequestContext& ctx) { |
| 367 | LOG_DEBUG(Service_BCAT, "called"); | 366 | LOG_DEBUG(Service_BCAT, "called"); |
| 368 | 367 | ||
| 369 | if (current_file == nullptr) { | 368 | if (current_file == nullptr) { |
| @@ -377,7 +376,7 @@ private: | |||
| 377 | rb.Push<u64>(current_file->GetSize()); | 376 | rb.Push<u64>(current_file->GetSize()); |
| 378 | } | 377 | } |
| 379 | 378 | ||
| 380 | void GetDigest(Kernel::HLERequestContext& ctx) { | 379 | void GetDigest(HLERequestContext& ctx) { |
| 381 | LOG_DEBUG(Service_BCAT, "called"); | 380 | LOG_DEBUG(Service_BCAT, "called"); |
| 382 | 381 | ||
| 383 | if (current_file == nullptr) { | 382 | if (current_file == nullptr) { |
| @@ -412,7 +411,7 @@ public: | |||
| 412 | } | 411 | } |
| 413 | 412 | ||
| 414 | private: | 413 | private: |
| 415 | void Open(Kernel::HLERequestContext& ctx) { | 414 | void Open(HLERequestContext& ctx) { |
| 416 | IPC::RequestParser rp{ctx}; | 415 | IPC::RequestParser rp{ctx}; |
| 417 | const auto name_raw = rp.PopRaw<DirectoryName>(); | 416 | const auto name_raw = rp.PopRaw<DirectoryName>(); |
| 418 | const auto name = | 417 | const auto name = |
| @@ -443,7 +442,7 @@ private: | |||
| 443 | rb.Push(ResultSuccess); | 442 | rb.Push(ResultSuccess); |
| 444 | } | 443 | } |
| 445 | 444 | ||
| 446 | void Read(Kernel::HLERequestContext& ctx) { | 445 | void Read(HLERequestContext& ctx) { |
| 447 | auto write_size = ctx.GetWriteBufferNumElements<DeliveryCacheDirectoryEntry>(); | 446 | auto write_size = ctx.GetWriteBufferNumElements<DeliveryCacheDirectoryEntry>(); |
| 448 | 447 | ||
| 449 | LOG_DEBUG(Service_BCAT, "called, write_size={:016X}", write_size); | 448 | LOG_DEBUG(Service_BCAT, "called, write_size={:016X}", write_size); |
| @@ -473,7 +472,7 @@ private: | |||
| 473 | rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry))); | 472 | rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry))); |
| 474 | } | 473 | } |
| 475 | 474 | ||
| 476 | void GetCount(Kernel::HLERequestContext& ctx) { | 475 | void GetCount(HLERequestContext& ctx) { |
| 477 | LOG_DEBUG(Service_BCAT, "called"); | 476 | LOG_DEBUG(Service_BCAT, "called"); |
| 478 | 477 | ||
| 479 | if (current_dir == nullptr) { | 478 | if (current_dir == nullptr) { |
| @@ -517,7 +516,7 @@ public: | |||
| 517 | } | 516 | } |
| 518 | 517 | ||
| 519 | private: | 518 | private: |
| 520 | void CreateFileService(Kernel::HLERequestContext& ctx) { | 519 | void CreateFileService(HLERequestContext& ctx) { |
| 521 | LOG_DEBUG(Service_BCAT, "called"); | 520 | LOG_DEBUG(Service_BCAT, "called"); |
| 522 | 521 | ||
| 523 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 522 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -525,7 +524,7 @@ private: | |||
| 525 | rb.PushIpcInterface<IDeliveryCacheFileService>(system, root); | 524 | rb.PushIpcInterface<IDeliveryCacheFileService>(system, root); |
| 526 | } | 525 | } |
| 527 | 526 | ||
| 528 | void CreateDirectoryService(Kernel::HLERequestContext& ctx) { | 527 | void CreateDirectoryService(HLERequestContext& ctx) { |
| 529 | LOG_DEBUG(Service_BCAT, "called"); | 528 | LOG_DEBUG(Service_BCAT, "called"); |
| 530 | 529 | ||
| 531 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 530 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -533,7 +532,7 @@ private: | |||
| 533 | rb.PushIpcInterface<IDeliveryCacheDirectoryService>(system, root); | 532 | rb.PushIpcInterface<IDeliveryCacheDirectoryService>(system, root); |
| 534 | } | 533 | } |
| 535 | 534 | ||
| 536 | void EnumerateDeliveryCacheDirectory(Kernel::HLERequestContext& ctx) { | 535 | void EnumerateDeliveryCacheDirectory(HLERequestContext& ctx) { |
| 537 | auto size = ctx.GetWriteBufferNumElements<DirectoryName>(); | 536 | auto size = ctx.GetWriteBufferNumElements<DirectoryName>(); |
| 538 | 537 | ||
| 539 | LOG_DEBUG(Service_BCAT, "called, size={:016X}", size); | 538 | LOG_DEBUG(Service_BCAT, "called, size={:016X}", size); |
| @@ -552,7 +551,7 @@ private: | |||
| 552 | u64 next_read_index = 0; | 551 | u64 next_read_index = 0; |
| 553 | }; | 552 | }; |
| 554 | 553 | ||
| 555 | void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx) { | 554 | void Module::Interface::CreateDeliveryCacheStorageService(HLERequestContext& ctx) { |
| 556 | LOG_DEBUG(Service_BCAT, "called"); | 555 | LOG_DEBUG(Service_BCAT, "called"); |
| 557 | 556 | ||
| 558 | const auto title_id = system.GetApplicationProcessProgramID(); | 557 | const auto title_id = system.GetApplicationProcessProgramID(); |
| @@ -561,8 +560,7 @@ void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestCont | |||
| 561 | rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id)); | 560 | rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id)); |
| 562 | } | 561 | } |
| 563 | 562 | ||
| 564 | void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId( | 563 | void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId(HLERequestContext& ctx) { |
| 565 | Kernel::HLERequestContext& ctx) { | ||
| 566 | IPC::RequestParser rp{ctx}; | 564 | IPC::RequestParser rp{ctx}; |
| 567 | const auto title_id = rp.PopRaw<u64>(); | 565 | const auto title_id = rp.PopRaw<u64>(); |
| 568 | 566 | ||
diff --git a/src/core/hle/service/bcat/bcat_module.h b/src/core/hle/service/bcat/bcat_module.h index 0c134d1ff..87576288b 100644 --- a/src/core/hle/service/bcat/bcat_module.h +++ b/src/core/hle/service/bcat/bcat_module.h | |||
| @@ -27,9 +27,9 @@ public: | |||
| 27 | FileSystem::FileSystemController& fsc_, const char* name); | 27 | FileSystem::FileSystemController& fsc_, const char* name); |
| 28 | ~Interface() override; | 28 | ~Interface() override; |
| 29 | 29 | ||
| 30 | void CreateBcatService(Kernel::HLERequestContext& ctx); | 30 | void CreateBcatService(HLERequestContext& ctx); |
| 31 | void CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx); | 31 | void CreateDeliveryCacheStorageService(HLERequestContext& ctx); |
| 32 | void CreateDeliveryCacheStorageServiceWithApplicationId(Kernel::HLERequestContext& ctx); | 32 | void CreateDeliveryCacheStorageServiceWithApplicationId(HLERequestContext& ctx); |
| 33 | 33 | ||
| 34 | protected: | 34 | protected: |
| 35 | FileSystem::FileSystemController& fsc; | 35 | FileSystem::FileSystemController& fsc; |
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index ed020d03f..38cdd57ad 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/kernel/k_event.h" | 6 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/service/btdrv/btdrv.h" | 7 | #include "core/hle/service/btdrv/btdrv.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/kernel_helpers.h" | 9 | #include "core/hle/service/kernel_helpers.h" |
| 10 | #include "core/hle/service/server_manager.h" | 10 | #include "core/hle/service/server_manager.h" |
| 11 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| @@ -41,7 +41,7 @@ public: | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | private: | 43 | private: |
| 44 | void RegisterBleEvent(Kernel::HLERequestContext& ctx) { | 44 | void RegisterBleEvent(HLERequestContext& ctx) { |
| 45 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | 45 | LOG_WARNING(Service_BTM, "(STUBBED) called"); |
| 46 | 46 | ||
| 47 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 47 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index dbd9d6a88..8069f75b7 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp | |||
| @@ -5,9 +5,9 @@ | |||
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/k_event.h" | 8 | #include "core/hle/kernel/k_event.h" |
| 10 | #include "core/hle/service/btm/btm.h" | 9 | #include "core/hle/service/btm/btm.h" |
| 10 | #include "core/hle/service/ipc_helpers.h" | ||
| 11 | #include "core/hle/service/kernel_helpers.h" | 11 | #include "core/hle/service/kernel_helpers.h" |
| 12 | #include "core/hle/service/server_manager.h" | 12 | #include "core/hle/service/server_manager.h" |
| 13 | #include "core/hle/service/service.h" | 13 | #include "core/hle/service/service.h" |
| @@ -70,7 +70,7 @@ public: | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | private: | 72 | private: |
| 73 | void AcquireBleScanEvent(Kernel::HLERequestContext& ctx) { | 73 | void AcquireBleScanEvent(HLERequestContext& ctx) { |
| 74 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | 74 | LOG_WARNING(Service_BTM, "(STUBBED) called"); |
| 75 | 75 | ||
| 76 | IPC::ResponseBuilder rb{ctx, 3, 1}; | 76 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| @@ -79,7 +79,7 @@ private: | |||
| 79 | rb.PushCopyObjects(scan_event->GetReadableEvent()); | 79 | rb.PushCopyObjects(scan_event->GetReadableEvent()); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | void AcquireBleConnectionEvent(Kernel::HLERequestContext& ctx) { | 82 | void AcquireBleConnectionEvent(HLERequestContext& ctx) { |
| 83 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | 83 | LOG_WARNING(Service_BTM, "(STUBBED) called"); |
| 84 | 84 | ||
| 85 | IPC::ResponseBuilder rb{ctx, 3, 1}; | 85 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| @@ -88,7 +88,7 @@ private: | |||
| 88 | rb.PushCopyObjects(connection_event->GetReadableEvent()); | 88 | rb.PushCopyObjects(connection_event->GetReadableEvent()); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void AcquireBleServiceDiscoveryEvent(Kernel::HLERequestContext& ctx) { | 91 | void AcquireBleServiceDiscoveryEvent(HLERequestContext& ctx) { |
| 92 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | 92 | LOG_WARNING(Service_BTM, "(STUBBED) called"); |
| 93 | 93 | ||
| 94 | IPC::ResponseBuilder rb{ctx, 3, 1}; | 94 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| @@ -97,7 +97,7 @@ private: | |||
| 97 | rb.PushCopyObjects(service_discovery_event->GetReadableEvent()); | 97 | rb.PushCopyObjects(service_discovery_event->GetReadableEvent()); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void AcquireBleMtuConfigEvent(Kernel::HLERequestContext& ctx) { | 100 | void AcquireBleMtuConfigEvent(HLERequestContext& ctx) { |
| 101 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | 101 | LOG_WARNING(Service_BTM, "(STUBBED) called"); |
| 102 | 102 | ||
| 103 | IPC::ResponseBuilder rb{ctx, 3, 1}; | 103 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| @@ -126,7 +126,7 @@ public: | |||
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | private: | 128 | private: |
| 129 | void GetCore(Kernel::HLERequestContext& ctx) { | 129 | void GetCore(HLERequestContext& ctx) { |
| 130 | LOG_DEBUG(Service_BTM, "called"); | 130 | LOG_DEBUG(Service_BTM, "called"); |
| 131 | 131 | ||
| 132 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 132 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -307,7 +307,7 @@ public: | |||
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | private: | 309 | private: |
| 310 | void GetCore(Kernel::HLERequestContext& ctx) { | 310 | void GetCore(HLERequestContext& ctx) { |
| 311 | LOG_DEBUG(Service_BTM, "called"); | 311 | LOG_DEBUG(Service_BTM, "called"); |
| 312 | 312 | ||
| 313 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 313 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/caps/caps_a.h b/src/core/hle/service/caps/caps_a.h index 319c173d8..98a21a5ad 100644 --- a/src/core/hle/service/caps/caps_a.h +++ b/src/core/hle/service/caps/caps_a.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::Capture { | 12 | namespace Service::Capture { |
| 17 | 13 | ||
| 18 | class CAPS_A final : public ServiceFramework<CAPS_A> { | 14 | class CAPS_A final : public ServiceFramework<CAPS_A> { |
diff --git a/src/core/hle/service/caps/caps_c.cpp b/src/core/hle/service/caps/caps_c.cpp index 725a2e3a7..fc77e35cd 100644 --- a/src/core/hle/service/caps/caps_c.cpp +++ b/src/core/hle/service/caps/caps_c.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/caps/caps_c.h" | 5 | #include "core/hle/service/caps/caps_c.h" |
| 6 | #include "core/hle/service/ipc_helpers.h" | ||
| 7 | 7 | ||
| 8 | namespace Service::Capture { | 8 | namespace Service::Capture { |
| 9 | 9 | ||
| @@ -74,7 +74,7 @@ CAPS_C::CAPS_C(Core::System& system_) : ServiceFramework{system_, "caps:c"} { | |||
| 74 | 74 | ||
| 75 | CAPS_C::~CAPS_C() = default; | 75 | CAPS_C::~CAPS_C() = default; |
| 76 | 76 | ||
| 77 | void CAPS_C::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) { | 77 | void CAPS_C::SetShimLibraryVersion(HLERequestContext& ctx) { |
| 78 | IPC::RequestParser rp{ctx}; | 78 | IPC::RequestParser rp{ctx}; |
| 79 | const auto library_version{rp.Pop<u64>()}; | 79 | const auto library_version{rp.Pop<u64>()}; |
| 80 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 80 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
diff --git a/src/core/hle/service/caps/caps_c.h b/src/core/hle/service/caps/caps_c.h index 983a4212d..537b3a2e3 100644 --- a/src/core/hle/service/caps/caps_c.h +++ b/src/core/hle/service/caps/caps_c.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::Capture { | 12 | namespace Service::Capture { |
| 17 | 13 | ||
| 18 | class CAPS_C final : public ServiceFramework<CAPS_C> { | 14 | class CAPS_C final : public ServiceFramework<CAPS_C> { |
| @@ -21,7 +17,7 @@ public: | |||
| 21 | ~CAPS_C() override; | 17 | ~CAPS_C() override; |
| 22 | 18 | ||
| 23 | private: | 19 | private: |
| 24 | void SetShimLibraryVersion(Kernel::HLERequestContext& ctx); | 20 | void SetShimLibraryVersion(HLERequestContext& ctx); |
| 25 | }; | 21 | }; |
| 26 | 22 | ||
| 27 | } // namespace Service::Capture | 23 | } // namespace Service::Capture |
diff --git a/src/core/hle/service/caps/caps_su.cpp b/src/core/hle/service/caps/caps_su.cpp index fcb496756..3b11cc95c 100644 --- a/src/core/hle/service/caps/caps_su.cpp +++ b/src/core/hle/service/caps/caps_su.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/caps/caps_su.h" | 5 | #include "core/hle/service/caps/caps_su.h" |
| 6 | #include "core/hle/service/ipc_helpers.h" | ||
| 7 | 7 | ||
| 8 | namespace Service::Capture { | 8 | namespace Service::Capture { |
| 9 | 9 | ||
| @@ -23,7 +23,7 @@ CAPS_SU::CAPS_SU(Core::System& system_) : ServiceFramework{system_, "caps:su"} { | |||
| 23 | 23 | ||
| 24 | CAPS_SU::~CAPS_SU() = default; | 24 | CAPS_SU::~CAPS_SU() = default; |
| 25 | 25 | ||
| 26 | void CAPS_SU::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) { | 26 | void CAPS_SU::SetShimLibraryVersion(HLERequestContext& ctx) { |
| 27 | IPC::RequestParser rp{ctx}; | 27 | IPC::RequestParser rp{ctx}; |
| 28 | const auto library_version{rp.Pop<u64>()}; | 28 | const auto library_version{rp.Pop<u64>()}; |
| 29 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 29 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
diff --git a/src/core/hle/service/caps/caps_su.h b/src/core/hle/service/caps/caps_su.h index c9a1d507b..c6398858d 100644 --- a/src/core/hle/service/caps/caps_su.h +++ b/src/core/hle/service/caps/caps_su.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::Capture { | 12 | namespace Service::Capture { |
| 17 | 13 | ||
| 18 | class CAPS_SU final : public ServiceFramework<CAPS_SU> { | 14 | class CAPS_SU final : public ServiceFramework<CAPS_SU> { |
| @@ -21,7 +17,7 @@ public: | |||
| 21 | ~CAPS_SU() override; | 17 | ~CAPS_SU() override; |
| 22 | 18 | ||
| 23 | private: | 19 | private: |
| 24 | void SetShimLibraryVersion(Kernel::HLERequestContext& ctx); | 20 | void SetShimLibraryVersion(HLERequestContext& ctx); |
| 25 | }; | 21 | }; |
| 26 | 22 | ||
| 27 | } // namespace Service::Capture | 23 | } // namespace Service::Capture |
diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp index 5fbba8673..bffe0f8d0 100644 --- a/src/core/hle/service/caps/caps_u.cpp +++ b/src/core/hle/service/caps/caps_u.cpp | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/caps/caps.h" | 5 | #include "core/hle/service/caps/caps.h" |
| 7 | #include "core/hle/service/caps/caps_u.h" | 6 | #include "core/hle/service/caps/caps_u.h" |
| 7 | #include "core/hle/service/ipc_helpers.h" | ||
| 8 | 8 | ||
| 9 | namespace Service::Capture { | 9 | namespace Service::Capture { |
| 10 | 10 | ||
| @@ -52,7 +52,7 @@ CAPS_U::CAPS_U(Core::System& system_) : ServiceFramework{system_, "caps:u"} { | |||
| 52 | 52 | ||
| 53 | CAPS_U::~CAPS_U() = default; | 53 | CAPS_U::~CAPS_U() = default; |
| 54 | 54 | ||
| 55 | void CAPS_U::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) { | 55 | void CAPS_U::SetShimLibraryVersion(HLERequestContext& ctx) { |
| 56 | IPC::RequestParser rp{ctx}; | 56 | IPC::RequestParser rp{ctx}; |
| 57 | const auto library_version{rp.Pop<u64>()}; | 57 | const auto library_version{rp.Pop<u64>()}; |
| 58 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 58 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| @@ -64,7 +64,7 @@ void CAPS_U::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) { | |||
| 64 | rb.Push(ResultSuccess); | 64 | rb.Push(ResultSuccess); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx) { | 67 | void CAPS_U::GetAlbumContentsFileListForApplication(HLERequestContext& ctx) { |
| 68 | // Takes a type-0x6 output buffer containing an array of ApplicationAlbumFileEntry, a PID, an | 68 | // Takes a type-0x6 output buffer containing an array of ApplicationAlbumFileEntry, a PID, an |
| 69 | // u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total | 69 | // u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total |
| 70 | // output entries (which is copied to a s32 by official SW). | 70 | // output entries (which is copied to a s32 by official SW). |
| @@ -93,7 +93,7 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c | |||
| 93 | rb.Push(total_entries_2); | 93 | rb.Push(total_entries_2); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void CAPS_U::GetAlbumFileList3AaeAruid(Kernel::HLERequestContext& ctx) { | 96 | void CAPS_U::GetAlbumFileList3AaeAruid(HLERequestContext& ctx) { |
| 97 | GetAlbumContentsFileListForApplication(ctx); | 97 | GetAlbumContentsFileListForApplication(ctx); |
| 98 | } | 98 | } |
| 99 | 99 | ||
diff --git a/src/core/hle/service/caps/caps_u.h b/src/core/hle/service/caps/caps_u.h index c3d4b9cea..e8dd037d7 100644 --- a/src/core/hle/service/caps/caps_u.h +++ b/src/core/hle/service/caps/caps_u.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::Capture { | 12 | namespace Service::Capture { |
| 17 | 13 | ||
| 18 | class CAPS_U final : public ServiceFramework<CAPS_U> { | 14 | class CAPS_U final : public ServiceFramework<CAPS_U> { |
| @@ -21,9 +17,9 @@ public: | |||
| 21 | ~CAPS_U() override; | 17 | ~CAPS_U() override; |
| 22 | 18 | ||
| 23 | private: | 19 | private: |
| 24 | void SetShimLibraryVersion(Kernel::HLERequestContext& ctx); | 20 | void SetShimLibraryVersion(HLERequestContext& ctx); |
| 25 | void GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx); | 21 | void GetAlbumContentsFileListForApplication(HLERequestContext& ctx); |
| 26 | void GetAlbumFileList3AaeAruid(Kernel::HLERequestContext& ctx); | 22 | void GetAlbumFileList3AaeAruid(HLERequestContext& ctx); |
| 27 | }; | 23 | }; |
| 28 | 24 | ||
| 29 | } // namespace Service::Capture | 25 | } // namespace Service::Capture |
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index d9736af4e..446f46b3c 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/crypto/key_manager.h" | 4 | #include "core/crypto/key_manager.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/es/es.h" | 5 | #include "core/hle/service/es/es.h" |
| 6 | #include "core/hle/service/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/server_manager.h" | 7 | #include "core/hle/service/server_manager.h" |
| 8 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| 9 | 9 | ||
| @@ -110,7 +110,7 @@ public: | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | private: | 112 | private: |
| 113 | bool CheckRightsId(Kernel::HLERequestContext& ctx, const u128& rights_id) { | 113 | bool CheckRightsId(HLERequestContext& ctx, const u128& rights_id) { |
| 114 | if (rights_id == u128{}) { | 114 | if (rights_id == u128{}) { |
| 115 | LOG_ERROR(Service_ETicket, "The rights ID was invalid!"); | 115 | LOG_ERROR(Service_ETicket, "The rights ID was invalid!"); |
| 116 | IPC::ResponseBuilder rb{ctx, 2}; | 116 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -121,7 +121,7 @@ private: | |||
| 121 | return true; | 121 | return true; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | void ImportTicket(Kernel::HLERequestContext& ctx) { | 124 | void ImportTicket(HLERequestContext& ctx) { |
| 125 | const auto ticket = ctx.ReadBuffer(); | 125 | const auto ticket = ctx.ReadBuffer(); |
| 126 | [[maybe_unused]] const auto cert = ctx.ReadBuffer(1); | 126 | [[maybe_unused]] const auto cert = ctx.ReadBuffer(1); |
| 127 | 127 | ||
| @@ -146,7 +146,7 @@ private: | |||
| 146 | rb.Push(ResultSuccess); | 146 | rb.Push(ResultSuccess); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | void GetTitleKey(Kernel::HLERequestContext& ctx) { | 149 | void GetTitleKey(HLERequestContext& ctx) { |
| 150 | IPC::RequestParser rp{ctx}; | 150 | IPC::RequestParser rp{ctx}; |
| 151 | const auto rights_id = rp.PopRaw<u128>(); | 151 | const auto rights_id = rp.PopRaw<u128>(); |
| 152 | 152 | ||
| @@ -172,7 +172,7 @@ private: | |||
| 172 | rb.Push(ResultSuccess); | 172 | rb.Push(ResultSuccess); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void CountCommonTicket(Kernel::HLERequestContext& ctx) { | 175 | void CountCommonTicket(HLERequestContext& ctx) { |
| 176 | LOG_DEBUG(Service_ETicket, "called"); | 176 | LOG_DEBUG(Service_ETicket, "called"); |
| 177 | 177 | ||
| 178 | const u32 count = static_cast<u32>(keys.GetCommonTickets().size()); | 178 | const u32 count = static_cast<u32>(keys.GetCommonTickets().size()); |
| @@ -182,7 +182,7 @@ private: | |||
| 182 | rb.Push<u32>(count); | 182 | rb.Push<u32>(count); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | void CountPersonalizedTicket(Kernel::HLERequestContext& ctx) { | 185 | void CountPersonalizedTicket(HLERequestContext& ctx) { |
| 186 | LOG_DEBUG(Service_ETicket, "called"); | 186 | LOG_DEBUG(Service_ETicket, "called"); |
| 187 | 187 | ||
| 188 | const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size()); | 188 | const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size()); |
| @@ -192,7 +192,7 @@ private: | |||
| 192 | rb.Push<u32>(count); | 192 | rb.Push<u32>(count); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void ListCommonTicketRightsIds(Kernel::HLERequestContext& ctx) { | 195 | void ListCommonTicketRightsIds(HLERequestContext& ctx) { |
| 196 | size_t out_entries = 0; | 196 | size_t out_entries = 0; |
| 197 | if (!keys.GetCommonTickets().empty()) { | 197 | if (!keys.GetCommonTickets().empty()) { |
| 198 | out_entries = ctx.GetWriteBufferNumElements<u128>(); | 198 | out_entries = ctx.GetWriteBufferNumElements<u128>(); |
| @@ -213,7 +213,7 @@ private: | |||
| 213 | rb.Push<u32>(static_cast<u32>(out_entries)); | 213 | rb.Push<u32>(static_cast<u32>(out_entries)); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | void ListPersonalizedTicketRightsIds(Kernel::HLERequestContext& ctx) { | 216 | void ListPersonalizedTicketRightsIds(HLERequestContext& ctx) { |
| 217 | size_t out_entries = 0; | 217 | size_t out_entries = 0; |
| 218 | if (!keys.GetPersonalizedTickets().empty()) { | 218 | if (!keys.GetPersonalizedTickets().empty()) { |
| 219 | out_entries = ctx.GetWriteBufferNumElements<u128>(); | 219 | out_entries = ctx.GetWriteBufferNumElements<u128>(); |
| @@ -235,7 +235,7 @@ private: | |||
| 235 | rb.Push<u32>(static_cast<u32>(out_entries)); | 235 | rb.Push<u32>(static_cast<u32>(out_entries)); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | void GetCommonTicketSize(Kernel::HLERequestContext& ctx) { | 238 | void GetCommonTicketSize(HLERequestContext& ctx) { |
| 239 | IPC::RequestParser rp{ctx}; | 239 | IPC::RequestParser rp{ctx}; |
| 240 | const auto rights_id = rp.PopRaw<u128>(); | 240 | const auto rights_id = rp.PopRaw<u128>(); |
| 241 | 241 | ||
| @@ -251,7 +251,7 @@ private: | |||
| 251 | rb.Push<u64>(ticket.GetSize()); | 251 | rb.Push<u64>(ticket.GetSize()); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | void GetPersonalizedTicketSize(Kernel::HLERequestContext& ctx) { | 254 | void GetPersonalizedTicketSize(HLERequestContext& ctx) { |
| 255 | IPC::RequestParser rp{ctx}; | 255 | IPC::RequestParser rp{ctx}; |
| 256 | const auto rights_id = rp.PopRaw<u128>(); | 256 | const auto rights_id = rp.PopRaw<u128>(); |
| 257 | 257 | ||
| @@ -267,7 +267,7 @@ private: | |||
| 267 | rb.Push<u64>(ticket.GetSize()); | 267 | rb.Push<u64>(ticket.GetSize()); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | void GetCommonTicketData(Kernel::HLERequestContext& ctx) { | 270 | void GetCommonTicketData(HLERequestContext& ctx) { |
| 271 | IPC::RequestParser rp{ctx}; | 271 | IPC::RequestParser rp{ctx}; |
| 272 | const auto rights_id = rp.PopRaw<u128>(); | 272 | const auto rights_id = rp.PopRaw<u128>(); |
| 273 | 273 | ||
| @@ -286,7 +286,7 @@ private: | |||
| 286 | rb.Push<u64>(write_size); | 286 | rb.Push<u64>(write_size); |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | void GetPersonalizedTicketData(Kernel::HLERequestContext& ctx) { | 289 | void GetPersonalizedTicketData(HLERequestContext& ctx) { |
| 290 | IPC::RequestParser rp{ctx}; | 290 | IPC::RequestParser rp{ctx}; |
| 291 | const auto rights_id = rp.PopRaw<u128>(); | 291 | const auto rights_id = rp.PopRaw<u128>(); |
| 292 | 292 | ||
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp index 3b7b636f3..fe2ed8df8 100644 --- a/src/core/hle/service/fatal/fatal.cpp +++ b/src/core/hle/service/fatal/fatal.cpp | |||
| @@ -9,10 +9,10 @@ | |||
| 9 | #include "common/scm_rev.h" | 9 | #include "common/scm_rev.h" |
| 10 | #include "common/swap.h" | 10 | #include "common/swap.h" |
| 11 | #include "core/core.h" | 11 | #include "core/core.h" |
| 12 | #include "core/hle/ipc_helpers.h" | ||
| 13 | #include "core/hle/service/fatal/fatal.h" | 12 | #include "core/hle/service/fatal/fatal.h" |
| 14 | #include "core/hle/service/fatal/fatal_p.h" | 13 | #include "core/hle/service/fatal/fatal_p.h" |
| 15 | #include "core/hle/service/fatal/fatal_u.h" | 14 | #include "core/hle/service/fatal/fatal_u.h" |
| 15 | #include "core/hle/service/ipc_helpers.h" | ||
| 16 | #include "core/hle/service/server_manager.h" | 16 | #include "core/hle/service/server_manager.h" |
| 17 | #include "core/reporter.h" | 17 | #include "core/reporter.h" |
| 18 | 18 | ||
| @@ -126,7 +126,7 @@ static void ThrowFatalError(Core::System& system, Result error_code, FatalType f | |||
| 126 | } | 126 | } |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { | 129 | void Module::Interface::ThrowFatal(HLERequestContext& ctx) { |
| 130 | LOG_ERROR(Service_Fatal, "called"); | 130 | LOG_ERROR(Service_Fatal, "called"); |
| 131 | IPC::RequestParser rp{ctx}; | 131 | IPC::RequestParser rp{ctx}; |
| 132 | const auto error_code = rp.Pop<Result>(); | 132 | const auto error_code = rp.Pop<Result>(); |
| @@ -136,7 +136,7 @@ void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { | |||
| 136 | rb.Push(ResultSuccess); | 136 | rb.Push(ResultSuccess); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { | 139 | void Module::Interface::ThrowFatalWithPolicy(HLERequestContext& ctx) { |
| 140 | LOG_ERROR(Service_Fatal, "called"); | 140 | LOG_ERROR(Service_Fatal, "called"); |
| 141 | IPC::RequestParser rp(ctx); | 141 | IPC::RequestParser rp(ctx); |
| 142 | const auto error_code = rp.Pop<Result>(); | 142 | const auto error_code = rp.Pop<Result>(); |
| @@ -148,7 +148,7 @@ void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { | |||
| 148 | rb.Push(ResultSuccess); | 148 | rb.Push(ResultSuccess); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) { | 151 | void Module::Interface::ThrowFatalWithCpuContext(HLERequestContext& ctx) { |
| 152 | LOG_ERROR(Service_Fatal, "called"); | 152 | LOG_ERROR(Service_Fatal, "called"); |
| 153 | IPC::RequestParser rp(ctx); | 153 | IPC::RequestParser rp(ctx); |
| 154 | const auto error_code = rp.Pop<Result>(); | 154 | const auto error_code = rp.Pop<Result>(); |
diff --git a/src/core/hle/service/fatal/fatal.h b/src/core/hle/service/fatal/fatal.h index 2e4e4c2f6..f1c110406 100644 --- a/src/core/hle/service/fatal/fatal.h +++ b/src/core/hle/service/fatal/fatal.h | |||
| @@ -19,9 +19,9 @@ public: | |||
| 19 | const char* name); | 19 | const char* name); |
| 20 | ~Interface() override; | 20 | ~Interface() override; |
| 21 | 21 | ||
| 22 | void ThrowFatal(Kernel::HLERequestContext& ctx); | 22 | void ThrowFatal(HLERequestContext& ctx); |
| 23 | void ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx); | 23 | void ThrowFatalWithPolicy(HLERequestContext& ctx); |
| 24 | void ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx); | 24 | void ThrowFatalWithCpuContext(HLERequestContext& ctx); |
| 25 | 25 | ||
| 26 | protected: | 26 | protected: |
| 27 | std::shared_ptr<Module> module; | 27 | std::shared_ptr<Module> module; |
diff --git a/src/core/hle/service/fgm/fgm.cpp b/src/core/hle/service/fgm/fgm.cpp index 612491270..6b3f77be2 100644 --- a/src/core/hle/service/fgm/fgm.cpp +++ b/src/core/hle/service/fgm/fgm.cpp | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/fgm/fgm.h" | 6 | #include "core/hle/service/fgm/fgm.h" |
| 7 | #include "core/hle/service/ipc_helpers.h" | ||
| 8 | #include "core/hle/service/server_manager.h" | 8 | #include "core/hle/service/server_manager.h" |
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 10 | #include "core/hle/service/sm/sm.h" | 10 | #include "core/hle/service/sm/sm.h" |
| @@ -40,7 +40,7 @@ public: | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | private: | 42 | private: |
| 43 | void Initialize(Kernel::HLERequestContext& ctx) { | 43 | void Initialize(HLERequestContext& ctx) { |
| 44 | LOG_DEBUG(Service_FGM, "called"); | 44 | LOG_DEBUG(Service_FGM, "called"); |
| 45 | 45 | ||
| 46 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 46 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 89eddb510..9e559d97e 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -24,9 +24,9 @@ | |||
| 24 | #include "core/file_sys/savedata_factory.h" | 24 | #include "core/file_sys/savedata_factory.h" |
| 25 | #include "core/file_sys/system_archive/system_archive.h" | 25 | #include "core/file_sys/system_archive/system_archive.h" |
| 26 | #include "core/file_sys/vfs.h" | 26 | #include "core/file_sys/vfs.h" |
| 27 | #include "core/hle/ipc_helpers.h" | ||
| 28 | #include "core/hle/service/filesystem/filesystem.h" | 27 | #include "core/hle/service/filesystem/filesystem.h" |
| 29 | #include "core/hle/service/filesystem/fsp_srv.h" | 28 | #include "core/hle/service/filesystem/fsp_srv.h" |
| 29 | #include "core/hle/service/ipc_helpers.h" | ||
| 30 | #include "core/reporter.h" | 30 | #include "core/reporter.h" |
| 31 | 31 | ||
| 32 | namespace Service::FileSystem { | 32 | namespace Service::FileSystem { |
| @@ -72,7 +72,7 @@ public: | |||
| 72 | private: | 72 | private: |
| 73 | FileSys::VirtualFile backend; | 73 | FileSys::VirtualFile backend; |
| 74 | 74 | ||
| 75 | void Read(Kernel::HLERequestContext& ctx) { | 75 | void Read(HLERequestContext& ctx) { |
| 76 | IPC::RequestParser rp{ctx}; | 76 | IPC::RequestParser rp{ctx}; |
| 77 | const s64 offset = rp.Pop<s64>(); | 77 | const s64 offset = rp.Pop<s64>(); |
| 78 | const s64 length = rp.Pop<s64>(); | 78 | const s64 length = rp.Pop<s64>(); |
| @@ -102,7 +102,7 @@ private: | |||
| 102 | rb.Push(ResultSuccess); | 102 | rb.Push(ResultSuccess); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | void GetSize(Kernel::HLERequestContext& ctx) { | 105 | void GetSize(HLERequestContext& ctx) { |
| 106 | const u64 size = backend->GetSize(); | 106 | const u64 size = backend->GetSize(); |
| 107 | LOG_DEBUG(Service_FS, "called, size={}", size); | 107 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| 108 | 108 | ||
| @@ -131,7 +131,7 @@ public: | |||
| 131 | private: | 131 | private: |
| 132 | FileSys::VirtualFile backend; | 132 | FileSys::VirtualFile backend; |
| 133 | 133 | ||
| 134 | void Read(Kernel::HLERequestContext& ctx) { | 134 | void Read(HLERequestContext& ctx) { |
| 135 | IPC::RequestParser rp{ctx}; | 135 | IPC::RequestParser rp{ctx}; |
| 136 | const u64 option = rp.Pop<u64>(); | 136 | const u64 option = rp.Pop<u64>(); |
| 137 | const s64 offset = rp.Pop<s64>(); | 137 | const s64 offset = rp.Pop<s64>(); |
| @@ -165,7 +165,7 @@ private: | |||
| 165 | rb.Push(static_cast<u64>(output.size())); | 165 | rb.Push(static_cast<u64>(output.size())); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void Write(Kernel::HLERequestContext& ctx) { | 168 | void Write(HLERequestContext& ctx) { |
| 169 | IPC::RequestParser rp{ctx}; | 169 | IPC::RequestParser rp{ctx}; |
| 170 | const u64 option = rp.Pop<u64>(); | 170 | const u64 option = rp.Pop<u64>(); |
| 171 | const s64 offset = rp.Pop<s64>(); | 171 | const s64 offset = rp.Pop<s64>(); |
| @@ -208,7 +208,7 @@ private: | |||
| 208 | rb.Push(ResultSuccess); | 208 | rb.Push(ResultSuccess); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | void Flush(Kernel::HLERequestContext& ctx) { | 211 | void Flush(HLERequestContext& ctx) { |
| 212 | LOG_DEBUG(Service_FS, "called"); | 212 | LOG_DEBUG(Service_FS, "called"); |
| 213 | 213 | ||
| 214 | // Exists for SDK compatibiltity -- No need to flush file. | 214 | // Exists for SDK compatibiltity -- No need to flush file. |
| @@ -217,7 +217,7 @@ private: | |||
| 217 | rb.Push(ResultSuccess); | 217 | rb.Push(ResultSuccess); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | void SetSize(Kernel::HLERequestContext& ctx) { | 220 | void SetSize(HLERequestContext& ctx) { |
| 221 | IPC::RequestParser rp{ctx}; | 221 | IPC::RequestParser rp{ctx}; |
| 222 | const u64 size = rp.Pop<u64>(); | 222 | const u64 size = rp.Pop<u64>(); |
| 223 | LOG_DEBUG(Service_FS, "called, size={}", size); | 223 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| @@ -228,7 +228,7 @@ private: | |||
| 228 | rb.Push(ResultSuccess); | 228 | rb.Push(ResultSuccess); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void GetSize(Kernel::HLERequestContext& ctx) { | 231 | void GetSize(HLERequestContext& ctx) { |
| 232 | const u64 size = backend->GetSize(); | 232 | const u64 size = backend->GetSize(); |
| 233 | LOG_DEBUG(Service_FS, "called, size={}", size); | 233 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| 234 | 234 | ||
| @@ -270,7 +270,7 @@ private: | |||
| 270 | std::vector<FileSys::Entry> entries; | 270 | std::vector<FileSys::Entry> entries; |
| 271 | u64 next_entry_index = 0; | 271 | u64 next_entry_index = 0; |
| 272 | 272 | ||
| 273 | void Read(Kernel::HLERequestContext& ctx) { | 273 | void Read(HLERequestContext& ctx) { |
| 274 | LOG_DEBUG(Service_FS, "called."); | 274 | LOG_DEBUG(Service_FS, "called."); |
| 275 | 275 | ||
| 276 | // Calculate how many entries we can fit in the output buffer | 276 | // Calculate how many entries we can fit in the output buffer |
| @@ -294,7 +294,7 @@ private: | |||
| 294 | rb.Push(actual_entries); | 294 | rb.Push(actual_entries); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | void GetEntryCount(Kernel::HLERequestContext& ctx) { | 297 | void GetEntryCount(HLERequestContext& ctx) { |
| 298 | LOG_DEBUG(Service_FS, "called"); | 298 | LOG_DEBUG(Service_FS, "called"); |
| 299 | 299 | ||
| 300 | u64 count = entries.size() - next_entry_index; | 300 | u64 count = entries.size() - next_entry_index; |
| @@ -331,7 +331,7 @@ public: | |||
| 331 | RegisterHandlers(functions); | 331 | RegisterHandlers(functions); |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | void CreateFile(Kernel::HLERequestContext& ctx) { | 334 | void CreateFile(HLERequestContext& ctx) { |
| 335 | IPC::RequestParser rp{ctx}; | 335 | IPC::RequestParser rp{ctx}; |
| 336 | 336 | ||
| 337 | const auto file_buffer = ctx.ReadBuffer(); | 337 | const auto file_buffer = ctx.ReadBuffer(); |
| @@ -347,7 +347,7 @@ public: | |||
| 347 | rb.Push(backend.CreateFile(name, file_size)); | 347 | rb.Push(backend.CreateFile(name, file_size)); |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | void DeleteFile(Kernel::HLERequestContext& ctx) { | 350 | void DeleteFile(HLERequestContext& ctx) { |
| 351 | const auto file_buffer = ctx.ReadBuffer(); | 351 | const auto file_buffer = ctx.ReadBuffer(); |
| 352 | const std::string name = Common::StringFromBuffer(file_buffer); | 352 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 353 | 353 | ||
| @@ -357,7 +357,7 @@ public: | |||
| 357 | rb.Push(backend.DeleteFile(name)); | 357 | rb.Push(backend.DeleteFile(name)); |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | void CreateDirectory(Kernel::HLERequestContext& ctx) { | 360 | void CreateDirectory(HLERequestContext& ctx) { |
| 361 | const auto file_buffer = ctx.ReadBuffer(); | 361 | const auto file_buffer = ctx.ReadBuffer(); |
| 362 | const std::string name = Common::StringFromBuffer(file_buffer); | 362 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 363 | 363 | ||
| @@ -367,7 +367,7 @@ public: | |||
| 367 | rb.Push(backend.CreateDirectory(name)); | 367 | rb.Push(backend.CreateDirectory(name)); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | void DeleteDirectory(Kernel::HLERequestContext& ctx) { | 370 | void DeleteDirectory(HLERequestContext& ctx) { |
| 371 | const auto file_buffer = ctx.ReadBuffer(); | 371 | const auto file_buffer = ctx.ReadBuffer(); |
| 372 | const std::string name = Common::StringFromBuffer(file_buffer); | 372 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 373 | 373 | ||
| @@ -377,7 +377,7 @@ public: | |||
| 377 | rb.Push(backend.DeleteDirectory(name)); | 377 | rb.Push(backend.DeleteDirectory(name)); |
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | void DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) { | 380 | void DeleteDirectoryRecursively(HLERequestContext& ctx) { |
| 381 | const auto file_buffer = ctx.ReadBuffer(); | 381 | const auto file_buffer = ctx.ReadBuffer(); |
| 382 | const std::string name = Common::StringFromBuffer(file_buffer); | 382 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 383 | 383 | ||
| @@ -387,7 +387,7 @@ public: | |||
| 387 | rb.Push(backend.DeleteDirectoryRecursively(name)); | 387 | rb.Push(backend.DeleteDirectoryRecursively(name)); |
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | void CleanDirectoryRecursively(Kernel::HLERequestContext& ctx) { | 390 | void CleanDirectoryRecursively(HLERequestContext& ctx) { |
| 391 | const auto file_buffer = ctx.ReadBuffer(); | 391 | const auto file_buffer = ctx.ReadBuffer(); |
| 392 | const std::string name = Common::StringFromBuffer(file_buffer); | 392 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 393 | 393 | ||
| @@ -397,7 +397,7 @@ public: | |||
| 397 | rb.Push(backend.CleanDirectoryRecursively(name)); | 397 | rb.Push(backend.CleanDirectoryRecursively(name)); |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | void RenameFile(Kernel::HLERequestContext& ctx) { | 400 | void RenameFile(HLERequestContext& ctx) { |
| 401 | const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0)); | 401 | const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0)); |
| 402 | const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1)); | 402 | const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1)); |
| 403 | 403 | ||
| @@ -407,7 +407,7 @@ public: | |||
| 407 | rb.Push(backend.RenameFile(src_name, dst_name)); | 407 | rb.Push(backend.RenameFile(src_name, dst_name)); |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | void OpenFile(Kernel::HLERequestContext& ctx) { | 410 | void OpenFile(HLERequestContext& ctx) { |
| 411 | IPC::RequestParser rp{ctx}; | 411 | IPC::RequestParser rp{ctx}; |
| 412 | 412 | ||
| 413 | const auto file_buffer = ctx.ReadBuffer(); | 413 | const auto file_buffer = ctx.ReadBuffer(); |
| @@ -431,7 +431,7 @@ public: | |||
| 431 | rb.PushIpcInterface<IFile>(std::move(file)); | 431 | rb.PushIpcInterface<IFile>(std::move(file)); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | void OpenDirectory(Kernel::HLERequestContext& ctx) { | 434 | void OpenDirectory(HLERequestContext& ctx) { |
| 435 | IPC::RequestParser rp{ctx}; | 435 | IPC::RequestParser rp{ctx}; |
| 436 | 436 | ||
| 437 | const auto file_buffer = ctx.ReadBuffer(); | 437 | const auto file_buffer = ctx.ReadBuffer(); |
| @@ -456,7 +456,7 @@ public: | |||
| 456 | rb.PushIpcInterface<IDirectory>(std::move(directory)); | 456 | rb.PushIpcInterface<IDirectory>(std::move(directory)); |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | void GetEntryType(Kernel::HLERequestContext& ctx) { | 459 | void GetEntryType(HLERequestContext& ctx) { |
| 460 | const auto file_buffer = ctx.ReadBuffer(); | 460 | const auto file_buffer = ctx.ReadBuffer(); |
| 461 | const std::string name = Common::StringFromBuffer(file_buffer); | 461 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 462 | 462 | ||
| @@ -474,14 +474,14 @@ public: | |||
| 474 | rb.Push<u32>(static_cast<u32>(*result)); | 474 | rb.Push<u32>(static_cast<u32>(*result)); |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | void Commit(Kernel::HLERequestContext& ctx) { | 477 | void Commit(HLERequestContext& ctx) { |
| 478 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 478 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 479 | 479 | ||
| 480 | IPC::ResponseBuilder rb{ctx, 2}; | 480 | IPC::ResponseBuilder rb{ctx, 2}; |
| 481 | rb.Push(ResultSuccess); | 481 | rb.Push(ResultSuccess); |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | void GetFreeSpaceSize(Kernel::HLERequestContext& ctx) { | 484 | void GetFreeSpaceSize(HLERequestContext& ctx) { |
| 485 | LOG_DEBUG(Service_FS, "called"); | 485 | LOG_DEBUG(Service_FS, "called"); |
| 486 | 486 | ||
| 487 | IPC::ResponseBuilder rb{ctx, 4}; | 487 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -489,7 +489,7 @@ public: | |||
| 489 | rb.Push(size.get_free_size()); | 489 | rb.Push(size.get_free_size()); |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | void GetTotalSpaceSize(Kernel::HLERequestContext& ctx) { | 492 | void GetTotalSpaceSize(HLERequestContext& ctx) { |
| 493 | LOG_DEBUG(Service_FS, "called"); | 493 | LOG_DEBUG(Service_FS, "called"); |
| 494 | 494 | ||
| 495 | IPC::ResponseBuilder rb{ctx, 4}; | 495 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -497,7 +497,7 @@ public: | |||
| 497 | rb.Push(size.get_total_size()); | 497 | rb.Push(size.get_total_size()); |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | void GetFileTimeStampRaw(Kernel::HLERequestContext& ctx) { | 500 | void GetFileTimeStampRaw(HLERequestContext& ctx) { |
| 501 | const auto file_buffer = ctx.ReadBuffer(); | 501 | const auto file_buffer = ctx.ReadBuffer(); |
| 502 | const std::string name = Common::StringFromBuffer(file_buffer); | 502 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 503 | 503 | ||
| @@ -533,7 +533,7 @@ public: | |||
| 533 | FindAllSaves(space); | 533 | FindAllSaves(space); |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | void ReadSaveDataInfo(Kernel::HLERequestContext& ctx) { | 536 | void ReadSaveDataInfo(HLERequestContext& ctx) { |
| 537 | LOG_DEBUG(Service_FS, "called"); | 537 | LOG_DEBUG(Service_FS, "called"); |
| 538 | 538 | ||
| 539 | // Calculate how many entries we can fit in the output buffer | 539 | // Calculate how many entries we can fit in the output buffer |
| @@ -811,7 +811,7 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 811 | 811 | ||
| 812 | FSP_SRV::~FSP_SRV() = default; | 812 | FSP_SRV::~FSP_SRV() = default; |
| 813 | 813 | ||
| 814 | void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) { | 814 | void FSP_SRV::SetCurrentProcess(HLERequestContext& ctx) { |
| 815 | IPC::RequestParser rp{ctx}; | 815 | IPC::RequestParser rp{ctx}; |
| 816 | current_process_id = rp.Pop<u64>(); | 816 | current_process_id = rp.Pop<u64>(); |
| 817 | 817 | ||
| @@ -821,7 +821,7 @@ void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 821 | rb.Push(ResultSuccess); | 821 | rb.Push(ResultSuccess); |
| 822 | } | 822 | } |
| 823 | 823 | ||
| 824 | void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { | 824 | void FSP_SRV::OpenFileSystemWithPatch(HLERequestContext& ctx) { |
| 825 | IPC::RequestParser rp{ctx}; | 825 | IPC::RequestParser rp{ctx}; |
| 826 | 826 | ||
| 827 | const auto type = rp.PopRaw<FileSystemType>(); | 827 | const auto type = rp.PopRaw<FileSystemType>(); |
| @@ -832,7 +832,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { | |||
| 832 | rb.Push(ResultUnknown); | 832 | rb.Push(ResultUnknown); |
| 833 | } | 833 | } |
| 834 | 834 | ||
| 835 | void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { | 835 | void FSP_SRV::OpenSdCardFileSystem(HLERequestContext& ctx) { |
| 836 | LOG_DEBUG(Service_FS, "called"); | 836 | LOG_DEBUG(Service_FS, "called"); |
| 837 | 837 | ||
| 838 | auto filesystem = | 838 | auto filesystem = |
| @@ -844,7 +844,7 @@ void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 844 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); | 844 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); |
| 845 | } | 845 | } |
| 846 | 846 | ||
| 847 | void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | 847 | void FSP_SRV::CreateSaveDataFileSystem(HLERequestContext& ctx) { |
| 848 | IPC::RequestParser rp{ctx}; | 848 | IPC::RequestParser rp{ctx}; |
| 849 | 849 | ||
| 850 | auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>(); | 850 | auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>(); |
| @@ -860,7 +860,7 @@ void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 860 | rb.Push(ResultSuccess); | 860 | rb.Push(ResultSuccess); |
| 861 | } | 861 | } |
| 862 | 862 | ||
| 863 | void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | 863 | void FSP_SRV::OpenSaveDataFileSystem(HLERequestContext& ctx) { |
| 864 | IPC::RequestParser rp{ctx}; | 864 | IPC::RequestParser rp{ctx}; |
| 865 | 865 | ||
| 866 | struct Parameters { | 866 | struct Parameters { |
| @@ -905,12 +905,12 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 905 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); | 905 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | void FSP_SRV::OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx) { | 908 | void FSP_SRV::OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx) { |
| 909 | LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem"); | 909 | LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem"); |
| 910 | OpenSaveDataFileSystem(ctx); | 910 | OpenSaveDataFileSystem(ctx); |
| 911 | } | 911 | } |
| 912 | 912 | ||
| 913 | void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& ctx) { | 913 | void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx) { |
| 914 | IPC::RequestParser rp{ctx}; | 914 | IPC::RequestParser rp{ctx}; |
| 915 | const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>(); | 915 | const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>(); |
| 916 | LOG_INFO(Service_FS, "called, space={}", space); | 916 | LOG_INFO(Service_FS, "called, space={}", space); |
| @@ -921,15 +921,14 @@ void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& | |||
| 921 | std::make_shared<ISaveDataInfoReader>(system, space, fsc)); | 921 | std::make_shared<ISaveDataInfoReader>(system, space, fsc)); |
| 922 | } | 922 | } |
| 923 | 923 | ||
| 924 | void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLERequestContext& ctx) { | 924 | void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx) { |
| 925 | LOG_WARNING(Service_FS, "(STUBBED) called."); | 925 | LOG_WARNING(Service_FS, "(STUBBED) called."); |
| 926 | 926 | ||
| 927 | IPC::ResponseBuilder rb{ctx, 2}; | 927 | IPC::ResponseBuilder rb{ctx, 2}; |
| 928 | rb.Push(ResultSuccess); | 928 | rb.Push(ResultSuccess); |
| 929 | } | 929 | } |
| 930 | 930 | ||
| 931 | void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | 931 | void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx) { |
| 932 | Kernel::HLERequestContext& ctx) { | ||
| 933 | IPC::RequestParser rp{ctx}; | 932 | IPC::RequestParser rp{ctx}; |
| 934 | 933 | ||
| 935 | struct Parameters { | 934 | struct Parameters { |
| @@ -955,7 +954,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | |||
| 955 | rb.Push(flags); | 954 | rb.Push(flags); |
| 956 | } | 955 | } |
| 957 | 956 | ||
| 958 | void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | 957 | void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) { |
| 959 | LOG_DEBUG(Service_FS, "called"); | 958 | LOG_DEBUG(Service_FS, "called"); |
| 960 | 959 | ||
| 961 | auto current_romfs = fsc.OpenRomFSCurrentProcess(); | 960 | auto current_romfs = fsc.OpenRomFSCurrentProcess(); |
| @@ -974,7 +973,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 974 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 973 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 975 | } | 974 | } |
| 976 | 975 | ||
| 977 | void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | 976 | void FSP_SRV::OpenDataStorageByDataId(HLERequestContext& ctx) { |
| 978 | IPC::RequestParser rp{ctx}; | 977 | IPC::RequestParser rp{ctx}; |
| 979 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); | 978 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); |
| 980 | const auto unknown = rp.PopRaw<u32>(); | 979 | const auto unknown = rp.PopRaw<u32>(); |
| @@ -1014,7 +1013,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | |||
| 1014 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1013 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1015 | } | 1014 | } |
| 1016 | 1015 | ||
| 1017 | void FSP_SRV::OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | 1016 | void FSP_SRV::OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx) { |
| 1018 | IPC::RequestParser rp{ctx}; | 1017 | IPC::RequestParser rp{ctx}; |
| 1019 | 1018 | ||
| 1020 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); | 1019 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); |
| @@ -1026,7 +1025,7 @@ void FSP_SRV::OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ct | |||
| 1026 | rb.Push(FileSys::ERROR_ENTITY_NOT_FOUND); | 1025 | rb.Push(FileSys::ERROR_ENTITY_NOT_FOUND); |
| 1027 | } | 1026 | } |
| 1028 | 1027 | ||
| 1029 | void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { | 1028 | void FSP_SRV::OpenDataStorageWithProgramIndex(HLERequestContext& ctx) { |
| 1030 | IPC::RequestParser rp{ctx}; | 1029 | IPC::RequestParser rp{ctx}; |
| 1031 | 1030 | ||
| 1032 | const auto program_index = rp.PopRaw<u8>(); | 1031 | const auto program_index = rp.PopRaw<u8>(); |
| @@ -1053,7 +1052,7 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { | |||
| 1053 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1052 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1054 | } | 1053 | } |
| 1055 | 1054 | ||
| 1056 | void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { | 1055 | void FSP_SRV::DisableAutoSaveDataCreation(HLERequestContext& ctx) { |
| 1057 | LOG_DEBUG(Service_FS, "called"); | 1056 | LOG_DEBUG(Service_FS, "called"); |
| 1058 | 1057 | ||
| 1059 | fsc.SetAutoSaveDataCreation(false); | 1058 | fsc.SetAutoSaveDataCreation(false); |
| @@ -1062,7 +1061,7 @@ void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { | |||
| 1062 | rb.Push(ResultSuccess); | 1061 | rb.Push(ResultSuccess); |
| 1063 | } | 1062 | } |
| 1064 | 1063 | ||
| 1065 | void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 1064 | void FSP_SRV::SetGlobalAccessLogMode(HLERequestContext& ctx) { |
| 1066 | IPC::RequestParser rp{ctx}; | 1065 | IPC::RequestParser rp{ctx}; |
| 1067 | access_log_mode = rp.PopEnum<AccessLogMode>(); | 1066 | access_log_mode = rp.PopEnum<AccessLogMode>(); |
| 1068 | 1067 | ||
| @@ -1072,7 +1071,7 @@ void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | |||
| 1072 | rb.Push(ResultSuccess); | 1071 | rb.Push(ResultSuccess); |
| 1073 | } | 1072 | } |
| 1074 | 1073 | ||
| 1075 | void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 1074 | void FSP_SRV::GetGlobalAccessLogMode(HLERequestContext& ctx) { |
| 1076 | LOG_DEBUG(Service_FS, "called"); | 1075 | LOG_DEBUG(Service_FS, "called"); |
| 1077 | 1076 | ||
| 1078 | IPC::ResponseBuilder rb{ctx, 3}; | 1077 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -1080,7 +1079,7 @@ void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | |||
| 1080 | rb.PushEnum(access_log_mode); | 1079 | rb.PushEnum(access_log_mode); |
| 1081 | } | 1080 | } |
| 1082 | 1081 | ||
| 1083 | void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | 1082 | void FSP_SRV::OutputAccessLogToSdCard(HLERequestContext& ctx) { |
| 1084 | const auto raw = ctx.ReadBufferCopy(); | 1083 | const auto raw = ctx.ReadBufferCopy(); |
| 1085 | auto log = Common::StringFromFixedZeroTerminatedBuffer( | 1084 | auto log = Common::StringFromFixedZeroTerminatedBuffer( |
| 1086 | reinterpret_cast<const char*>(raw.data()), raw.size()); | 1085 | reinterpret_cast<const char*>(raw.data()), raw.size()); |
| @@ -1093,7 +1092,7 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | |||
| 1093 | rb.Push(ResultSuccess); | 1092 | rb.Push(ResultSuccess); |
| 1094 | } | 1093 | } |
| 1095 | 1094 | ||
| 1096 | void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) { | 1095 | void FSP_SRV::GetProgramIndexForAccessLog(HLERequestContext& ctx) { |
| 1097 | LOG_DEBUG(Service_FS, "called"); | 1096 | LOG_DEBUG(Service_FS, "called"); |
| 1098 | 1097 | ||
| 1099 | IPC::ResponseBuilder rb{ctx, 4}; | 1098 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -1102,7 +1101,7 @@ void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) { | |||
| 1102 | rb.Push(access_log_program_index); | 1101 | rb.Push(access_log_program_index); |
| 1103 | } | 1102 | } |
| 1104 | 1103 | ||
| 1105 | void FSP_SRV::GetCacheStorageSize(Kernel::HLERequestContext& ctx) { | 1104 | void FSP_SRV::GetCacheStorageSize(HLERequestContext& ctx) { |
| 1106 | IPC::RequestParser rp{ctx}; | 1105 | IPC::RequestParser rp{ctx}; |
| 1107 | const auto index{rp.Pop<s32>()}; | 1106 | const auto index{rp.Pop<s32>()}; |
| 1108 | 1107 | ||
| @@ -1128,14 +1127,14 @@ public: | |||
| 1128 | private: | 1127 | private: |
| 1129 | FileSys::VirtualFile backend; | 1128 | FileSys::VirtualFile backend; |
| 1130 | 1129 | ||
| 1131 | void Add(Kernel::HLERequestContext& ctx) { | 1130 | void Add(HLERequestContext& ctx) { |
| 1132 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 1131 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 1133 | 1132 | ||
| 1134 | IPC::ResponseBuilder rb{ctx, 2}; | 1133 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1135 | rb.Push(ResultSuccess); | 1134 | rb.Push(ResultSuccess); |
| 1136 | } | 1135 | } |
| 1137 | 1136 | ||
| 1138 | void Commit(Kernel::HLERequestContext& ctx) { | 1137 | void Commit(HLERequestContext& ctx) { |
| 1139 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 1138 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 1140 | 1139 | ||
| 1141 | IPC::ResponseBuilder rb{ctx, 2}; | 1140 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -1143,7 +1142,7 @@ private: | |||
| 1143 | } | 1142 | } |
| 1144 | }; | 1143 | }; |
| 1145 | 1144 | ||
| 1146 | void FSP_SRV::OpenMultiCommitManager(Kernel::HLERequestContext& ctx) { | 1145 | void FSP_SRV::OpenMultiCommitManager(HLERequestContext& ctx) { |
| 1147 | LOG_DEBUG(Service_FS, "called"); | 1146 | LOG_DEBUG(Service_FS, "called"); |
| 1148 | 1147 | ||
| 1149 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 1148 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index 3d88b97f9..49f17c7c3 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h | |||
| @@ -35,26 +35,26 @@ public: | |||
| 35 | ~FSP_SRV() override; | 35 | ~FSP_SRV() override; |
| 36 | 36 | ||
| 37 | private: | 37 | private: |
| 38 | void SetCurrentProcess(Kernel::HLERequestContext& ctx); | 38 | void SetCurrentProcess(HLERequestContext& ctx); |
| 39 | void OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx); | 39 | void OpenFileSystemWithPatch(HLERequestContext& ctx); |
| 40 | void OpenSdCardFileSystem(Kernel::HLERequestContext& ctx); | 40 | void OpenSdCardFileSystem(HLERequestContext& ctx); |
| 41 | void CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx); | 41 | void CreateSaveDataFileSystem(HLERequestContext& ctx); |
| 42 | void OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx); | 42 | void OpenSaveDataFileSystem(HLERequestContext& ctx); |
| 43 | void OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx); | 43 | void OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx); |
| 44 | void OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& ctx); | 44 | void OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx); |
| 45 | void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLERequestContext& ctx); | 45 | void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx); |
| 46 | void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(Kernel::HLERequestContext& ctx); | 46 | void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx); |
| 47 | void OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); | 47 | void OpenDataStorageByCurrentProcess(HLERequestContext& ctx); |
| 48 | void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); | 48 | void OpenDataStorageByDataId(HLERequestContext& ctx); |
| 49 | void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); | 49 | void OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx); |
| 50 | void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx); | 50 | void OpenDataStorageWithProgramIndex(HLERequestContext& ctx); |
| 51 | void DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx); | 51 | void DisableAutoSaveDataCreation(HLERequestContext& ctx); |
| 52 | void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 52 | void SetGlobalAccessLogMode(HLERequestContext& ctx); |
| 53 | void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 53 | void GetGlobalAccessLogMode(HLERequestContext& ctx); |
| 54 | void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); | 54 | void OutputAccessLogToSdCard(HLERequestContext& ctx); |
| 55 | void GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx); | 55 | void GetProgramIndexForAccessLog(HLERequestContext& ctx); |
| 56 | void OpenMultiCommitManager(Kernel::HLERequestContext& ctx); | 56 | void OpenMultiCommitManager(HLERequestContext& ctx); |
| 57 | void GetCacheStorageSize(Kernel::HLERequestContext& ctx); | 57 | void GetCacheStorageSize(HLERequestContext& ctx); |
| 58 | 58 | ||
| 59 | FileSystemController& fsc; | 59 | FileSystemController& fsc; |
| 60 | const FileSys::ContentProvider& content_provider; | 60 | const FileSys::ContentProvider& content_provider; |
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index fcf10bfeb..447deab8b 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp | |||
| @@ -5,11 +5,11 @@ | |||
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "common/uuid.h" | 6 | #include "common/uuid.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/k_event.h" | 8 | #include "core/hle/kernel/k_event.h" |
| 10 | #include "core/hle/service/friend/errors.h" | 9 | #include "core/hle/service/friend/errors.h" |
| 11 | #include "core/hle/service/friend/friend.h" | 10 | #include "core/hle/service/friend/friend.h" |
| 12 | #include "core/hle/service/friend/friend_interface.h" | 11 | #include "core/hle/service/friend/friend_interface.h" |
| 12 | #include "core/hle/service/ipc_helpers.h" | ||
| 13 | #include "core/hle/service/kernel_helpers.h" | 13 | #include "core/hle/service/kernel_helpers.h" |
| 14 | #include "core/hle/service/server_manager.h" | 14 | #include "core/hle/service/server_manager.h" |
| 15 | 15 | ||
| @@ -136,7 +136,7 @@ private: | |||
| 136 | }; | 136 | }; |
| 137 | static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size"); | 137 | static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size"); |
| 138 | 138 | ||
| 139 | void GetCompletionEvent(Kernel::HLERequestContext& ctx) { | 139 | void GetCompletionEvent(HLERequestContext& ctx) { |
| 140 | LOG_DEBUG(Service_Friend, "called"); | 140 | LOG_DEBUG(Service_Friend, "called"); |
| 141 | 141 | ||
| 142 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 142 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -144,7 +144,7 @@ private: | |||
| 144 | rb.PushCopyObjects(completion_event->GetReadableEvent()); | 144 | rb.PushCopyObjects(completion_event->GetReadableEvent()); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | void GetBlockedUserListIds(Kernel::HLERequestContext& ctx) { | 147 | void GetBlockedUserListIds(HLERequestContext& ctx) { |
| 148 | // This is safe to stub, as there should be no adverse consequences from reporting no | 148 | // This is safe to stub, as there should be no adverse consequences from reporting no |
| 149 | // blocked users. | 149 | // blocked users. |
| 150 | LOG_WARNING(Service_Friend, "(STUBBED) called"); | 150 | LOG_WARNING(Service_Friend, "(STUBBED) called"); |
| @@ -153,21 +153,21 @@ private: | |||
| 153 | rb.Push<u32>(0); // Indicates there are no blocked users | 153 | rb.Push<u32>(0); // Indicates there are no blocked users |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | void DeclareCloseOnlinePlaySession(Kernel::HLERequestContext& ctx) { | 156 | void DeclareCloseOnlinePlaySession(HLERequestContext& ctx) { |
| 157 | // Stub used by Splatoon 2 | 157 | // Stub used by Splatoon 2 |
| 158 | LOG_WARNING(Service_Friend, "(STUBBED) called"); | 158 | LOG_WARNING(Service_Friend, "(STUBBED) called"); |
| 159 | IPC::ResponseBuilder rb{ctx, 2}; | 159 | IPC::ResponseBuilder rb{ctx, 2}; |
| 160 | rb.Push(ResultSuccess); | 160 | rb.Push(ResultSuccess); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | void UpdateUserPresence(Kernel::HLERequestContext& ctx) { | 163 | void UpdateUserPresence(HLERequestContext& ctx) { |
| 164 | // Stub used by Retro City Rampage | 164 | // Stub used by Retro City Rampage |
| 165 | LOG_WARNING(Service_Friend, "(STUBBED) called"); | 165 | LOG_WARNING(Service_Friend, "(STUBBED) called"); |
| 166 | IPC::ResponseBuilder rb{ctx, 2}; | 166 | IPC::ResponseBuilder rb{ctx, 2}; |
| 167 | rb.Push(ResultSuccess); | 167 | rb.Push(ResultSuccess); |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | void GetPlayHistoryRegistrationKey(Kernel::HLERequestContext& ctx) { | 170 | void GetPlayHistoryRegistrationKey(HLERequestContext& ctx) { |
| 171 | IPC::RequestParser rp{ctx}; | 171 | IPC::RequestParser rp{ctx}; |
| 172 | const auto local_play = rp.Pop<bool>(); | 172 | const auto local_play = rp.Pop<bool>(); |
| 173 | const auto uuid = rp.PopRaw<Common::UUID>(); | 173 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| @@ -179,7 +179,7 @@ private: | |||
| 179 | rb.Push(ResultSuccess); | 179 | rb.Push(ResultSuccess); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | void GetFriendList(Kernel::HLERequestContext& ctx) { | 182 | void GetFriendList(HLERequestContext& ctx) { |
| 183 | IPC::RequestParser rp{ctx}; | 183 | IPC::RequestParser rp{ctx}; |
| 184 | const auto friend_offset = rp.Pop<u32>(); | 184 | const auto friend_offset = rp.Pop<u32>(); |
| 185 | const auto uuid = rp.PopRaw<Common::UUID>(); | 185 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| @@ -195,7 +195,7 @@ private: | |||
| 195 | // TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId" | 195 | // TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId" |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | void CheckFriendListAvailability(Kernel::HLERequestContext& ctx) { | 198 | void CheckFriendListAvailability(HLERequestContext& ctx) { |
| 199 | IPC::RequestParser rp{ctx}; | 199 | IPC::RequestParser rp{ctx}; |
| 200 | const auto uuid{rp.PopRaw<Common::UUID>()}; | 200 | const auto uuid{rp.PopRaw<Common::UUID>()}; |
| 201 | 201 | ||
| @@ -234,7 +234,7 @@ public: | |||
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | private: | 236 | private: |
| 237 | void GetEvent(Kernel::HLERequestContext& ctx) { | 237 | void GetEvent(HLERequestContext& ctx) { |
| 238 | LOG_DEBUG(Service_Friend, "called"); | 238 | LOG_DEBUG(Service_Friend, "called"); |
| 239 | 239 | ||
| 240 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 240 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -242,7 +242,7 @@ private: | |||
| 242 | rb.PushCopyObjects(notification_event->GetReadableEvent()); | 242 | rb.PushCopyObjects(notification_event->GetReadableEvent()); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | void Clear(Kernel::HLERequestContext& ctx) { | 245 | void Clear(HLERequestContext& ctx) { |
| 246 | LOG_DEBUG(Service_Friend, "called"); | 246 | LOG_DEBUG(Service_Friend, "called"); |
| 247 | while (!notifications.empty()) { | 247 | while (!notifications.empty()) { |
| 248 | notifications.pop(); | 248 | notifications.pop(); |
| @@ -253,7 +253,7 @@ private: | |||
| 253 | rb.Push(ResultSuccess); | 253 | rb.Push(ResultSuccess); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | void Pop(Kernel::HLERequestContext& ctx) { | 256 | void Pop(HLERequestContext& ctx) { |
| 257 | LOG_DEBUG(Service_Friend, "called"); | 257 | LOG_DEBUG(Service_Friend, "called"); |
| 258 | 258 | ||
| 259 | if (notifications.empty()) { | 259 | if (notifications.empty()) { |
| @@ -312,14 +312,14 @@ private: | |||
| 312 | States states{}; | 312 | States states{}; |
| 313 | }; | 313 | }; |
| 314 | 314 | ||
| 315 | void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) { | 315 | void Module::Interface::CreateFriendService(HLERequestContext& ctx) { |
| 316 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 316 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 317 | rb.Push(ResultSuccess); | 317 | rb.Push(ResultSuccess); |
| 318 | rb.PushIpcInterface<IFriendService>(system); | 318 | rb.PushIpcInterface<IFriendService>(system); |
| 319 | LOG_DEBUG(Service_Friend, "called"); | 319 | LOG_DEBUG(Service_Friend, "called"); |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | void Module::Interface::CreateNotificationService(Kernel::HLERequestContext& ctx) { | 322 | void Module::Interface::CreateNotificationService(HLERequestContext& ctx) { |
| 323 | IPC::RequestParser rp{ctx}; | 323 | IPC::RequestParser rp{ctx}; |
| 324 | auto uuid = rp.PopRaw<Common::UUID>(); | 324 | auto uuid = rp.PopRaw<Common::UUID>(); |
| 325 | 325 | ||
diff --git a/src/core/hle/service/friend/friend.h b/src/core/hle/service/friend/friend.h index 41be06a4f..2824dc786 100644 --- a/src/core/hle/service/friend/friend.h +++ b/src/core/hle/service/friend/friend.h | |||
| @@ -19,8 +19,8 @@ public: | |||
| 19 | const char* name); | 19 | const char* name); |
| 20 | ~Interface() override; | 20 | ~Interface() override; |
| 21 | 21 | ||
| 22 | void CreateFriendService(Kernel::HLERequestContext& ctx); | 22 | void CreateFriendService(HLERequestContext& ctx); |
| 23 | void CreateNotificationService(Kernel::HLERequestContext& ctx); | 23 | void CreateNotificationService(HLERequestContext& ctx); |
| 24 | 24 | ||
| 25 | protected: | 25 | protected: |
| 26 | std::shared_ptr<Module> module; | 26 | std::shared_ptr<Module> module; |
diff --git a/src/core/hle/service/glue/arp.cpp b/src/core/hle/service/glue/arp.cpp index ce21b69e3..9db136bac 100644 --- a/src/core/hle/service/glue/arp.cpp +++ b/src/core/hle/service/glue/arp.cpp | |||
| @@ -5,12 +5,12 @@ | |||
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/k_process.h" | 8 | #include "core/hle/kernel/k_process.h" |
| 10 | #include "core/hle/kernel/kernel.h" | 9 | #include "core/hle/kernel/kernel.h" |
| 11 | #include "core/hle/service/glue/arp.h" | 10 | #include "core/hle/service/glue/arp.h" |
| 12 | #include "core/hle/service/glue/errors.h" | 11 | #include "core/hle/service/glue/errors.h" |
| 13 | #include "core/hle/service/glue/glue_manager.h" | 12 | #include "core/hle/service/glue/glue_manager.h" |
| 13 | #include "core/hle/service/ipc_helpers.h" | ||
| 14 | 14 | ||
| 15 | namespace Service::Glue { | 15 | namespace Service::Glue { |
| 16 | 16 | ||
| @@ -51,7 +51,7 @@ ARP_R::ARP_R(Core::System& system_, const ARPManager& manager_) | |||
| 51 | 51 | ||
| 52 | ARP_R::~ARP_R() = default; | 52 | ARP_R::~ARP_R() = default; |
| 53 | 53 | ||
| 54 | void ARP_R::GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) { | 54 | void ARP_R::GetApplicationLaunchProperty(HLERequestContext& ctx) { |
| 55 | IPC::RequestParser rp{ctx}; | 55 | IPC::RequestParser rp{ctx}; |
| 56 | const auto process_id = rp.PopRaw<u64>(); | 56 | const auto process_id = rp.PopRaw<u64>(); |
| 57 | 57 | ||
| @@ -79,7 +79,7 @@ void ARP_R::GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) { | |||
| 79 | rb.PushRaw(*res); | 79 | rb.PushRaw(*res); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | void ARP_R::GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestContext& ctx) { | 82 | void ARP_R::GetApplicationLaunchPropertyWithApplicationId(HLERequestContext& ctx) { |
| 83 | IPC::RequestParser rp{ctx}; | 83 | IPC::RequestParser rp{ctx}; |
| 84 | const auto title_id = rp.PopRaw<u64>(); | 84 | const auto title_id = rp.PopRaw<u64>(); |
| 85 | 85 | ||
| @@ -99,7 +99,7 @@ void ARP_R::GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestCont | |||
| 99 | rb.PushRaw(*res); | 99 | rb.PushRaw(*res); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | void ARP_R::GetApplicationControlProperty(Kernel::HLERequestContext& ctx) { | 102 | void ARP_R::GetApplicationControlProperty(HLERequestContext& ctx) { |
| 103 | IPC::RequestParser rp{ctx}; | 103 | IPC::RequestParser rp{ctx}; |
| 104 | const auto process_id = rp.PopRaw<u64>(); | 104 | const auto process_id = rp.PopRaw<u64>(); |
| 105 | 105 | ||
| @@ -128,7 +128,7 @@ void ARP_R::GetApplicationControlProperty(Kernel::HLERequestContext& ctx) { | |||
| 128 | rb.Push(ResultSuccess); | 128 | rb.Push(ResultSuccess); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | void ARP_R::GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestContext& ctx) { | 131 | void ARP_R::GetApplicationControlPropertyWithApplicationId(HLERequestContext& ctx) { |
| 132 | IPC::RequestParser rp{ctx}; | 132 | IPC::RequestParser rp{ctx}; |
| 133 | const auto title_id = rp.PopRaw<u64>(); | 133 | const auto title_id = rp.PopRaw<u64>(); |
| 134 | 134 | ||
| @@ -169,7 +169,7 @@ public: | |||
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | private: | 171 | private: |
| 172 | void Issue(Kernel::HLERequestContext& ctx) { | 172 | void Issue(HLERequestContext& ctx) { |
| 173 | IPC::RequestParser rp{ctx}; | 173 | IPC::RequestParser rp{ctx}; |
| 174 | const auto process_id = rp.PopRaw<u64>(); | 174 | const auto process_id = rp.PopRaw<u64>(); |
| 175 | 175 | ||
| @@ -197,7 +197,7 @@ private: | |||
| 197 | rb.Push(ResultSuccess); | 197 | rb.Push(ResultSuccess); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | void SetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) { | 200 | void SetApplicationLaunchProperty(HLERequestContext& ctx) { |
| 201 | LOG_DEBUG(Service_ARP, "called"); | 201 | LOG_DEBUG(Service_ARP, "called"); |
| 202 | 202 | ||
| 203 | if (issued) { | 203 | if (issued) { |
| @@ -216,7 +216,7 @@ private: | |||
| 216 | rb.Push(ResultSuccess); | 216 | rb.Push(ResultSuccess); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | void SetApplicationControlProperty(Kernel::HLERequestContext& ctx) { | 219 | void SetApplicationControlProperty(HLERequestContext& ctx) { |
| 220 | LOG_DEBUG(Service_ARP, "called"); | 220 | LOG_DEBUG(Service_ARP, "called"); |
| 221 | 221 | ||
| 222 | if (issued) { | 222 | if (issued) { |
| @@ -256,7 +256,7 @@ ARP_W::ARP_W(Core::System& system_, ARPManager& manager_) | |||
| 256 | 256 | ||
| 257 | ARP_W::~ARP_W() = default; | 257 | ARP_W::~ARP_W() = default; |
| 258 | 258 | ||
| 259 | void ARP_W::AcquireRegistrar(Kernel::HLERequestContext& ctx) { | 259 | void ARP_W::AcquireRegistrar(HLERequestContext& ctx) { |
| 260 | LOG_DEBUG(Service_ARP, "called"); | 260 | LOG_DEBUG(Service_ARP, "called"); |
| 261 | 261 | ||
| 262 | registrar = std::make_shared<IRegistrar>( | 262 | registrar = std::make_shared<IRegistrar>( |
| @@ -274,7 +274,7 @@ void ARP_W::AcquireRegistrar(Kernel::HLERequestContext& ctx) { | |||
| 274 | rb.PushIpcInterface(registrar); | 274 | rb.PushIpcInterface(registrar); |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | void ARP_W::UnregisterApplicationInstance(Kernel::HLERequestContext& ctx) { | 277 | void ARP_W::UnregisterApplicationInstance(HLERequestContext& ctx) { |
| 278 | IPC::RequestParser rp{ctx}; | 278 | IPC::RequestParser rp{ctx}; |
| 279 | const auto process_id = rp.PopRaw<u64>(); | 279 | const auto process_id = rp.PopRaw<u64>(); |
| 280 | 280 | ||
diff --git a/src/core/hle/service/glue/arp.h b/src/core/hle/service/glue/arp.h index 06c992e88..5bce80175 100644 --- a/src/core/hle/service/glue/arp.h +++ b/src/core/hle/service/glue/arp.h | |||
| @@ -16,10 +16,10 @@ public: | |||
| 16 | ~ARP_R() override; | 16 | ~ARP_R() override; |
| 17 | 17 | ||
| 18 | private: | 18 | private: |
| 19 | void GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx); | 19 | void GetApplicationLaunchProperty(HLERequestContext& ctx); |
| 20 | void GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestContext& ctx); | 20 | void GetApplicationLaunchPropertyWithApplicationId(HLERequestContext& ctx); |
| 21 | void GetApplicationControlProperty(Kernel::HLERequestContext& ctx); | 21 | void GetApplicationControlProperty(HLERequestContext& ctx); |
| 22 | void GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestContext& ctx); | 22 | void GetApplicationControlPropertyWithApplicationId(HLERequestContext& ctx); |
| 23 | 23 | ||
| 24 | const ARPManager& manager; | 24 | const ARPManager& manager; |
| 25 | }; | 25 | }; |
| @@ -30,8 +30,8 @@ public: | |||
| 30 | ~ARP_W() override; | 30 | ~ARP_W() override; |
| 31 | 31 | ||
| 32 | private: | 32 | private: |
| 33 | void AcquireRegistrar(Kernel::HLERequestContext& ctx); | 33 | void AcquireRegistrar(HLERequestContext& ctx); |
| 34 | void UnregisterApplicationInstance(Kernel::HLERequestContext& ctx); | 34 | void UnregisterApplicationInstance(HLERequestContext& ctx); |
| 35 | 35 | ||
| 36 | ARPManager& manager; | 36 | ARPManager& manager; |
| 37 | std::shared_ptr<IRegistrar> registrar; | 37 | std::shared_ptr<IRegistrar> registrar; |
diff --git a/src/core/hle/service/glue/bgtc.cpp b/src/core/hle/service/glue/bgtc.cpp index 3248091c3..ae22ac4f7 100644 --- a/src/core/hle/service/glue/bgtc.cpp +++ b/src/core/hle/service/glue/bgtc.cpp | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/glue/bgtc.h" | 6 | #include "core/hle/service/glue/bgtc.h" |
| 7 | #include "core/hle/service/ipc_helpers.h" | ||
| 8 | 8 | ||
| 9 | namespace Service::Glue { | 9 | namespace Service::Glue { |
| 10 | 10 | ||
| @@ -20,7 +20,7 @@ BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} { | |||
| 20 | 20 | ||
| 21 | BGTC_T::~BGTC_T() = default; | 21 | BGTC_T::~BGTC_T() = default; |
| 22 | 22 | ||
| 23 | void BGTC_T::OpenTaskService(Kernel::HLERequestContext& ctx) { | 23 | void BGTC_T::OpenTaskService(HLERequestContext& ctx) { |
| 24 | LOG_DEBUG(Service_BGTC, "called"); | 24 | LOG_DEBUG(Service_BGTC, "called"); |
| 25 | 25 | ||
| 26 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 26 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/glue/bgtc.h b/src/core/hle/service/glue/bgtc.h index d6e2baec1..5a5d9c9a7 100644 --- a/src/core/hle/service/glue/bgtc.h +++ b/src/core/hle/service/glue/bgtc.h | |||
| @@ -16,7 +16,7 @@ public: | |||
| 16 | explicit BGTC_T(Core::System& system_); | 16 | explicit BGTC_T(Core::System& system_); |
| 17 | ~BGTC_T() override; | 17 | ~BGTC_T() override; |
| 18 | 18 | ||
| 19 | void OpenTaskService(Kernel::HLERequestContext& ctx); | 19 | void OpenTaskService(HLERequestContext& ctx); |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | class ITaskService final : public ServiceFramework<ITaskService> { | 22 | class ITaskService final : public ServiceFramework<ITaskService> { |
diff --git a/src/core/hle/service/glue/notif.cpp b/src/core/hle/service/glue/notif.cpp index 3ace2dabd..fec4ad86c 100644 --- a/src/core/hle/service/glue/notif.cpp +++ b/src/core/hle/service/glue/notif.cpp | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "core/hle/ipc_helpers.h" | ||
| 10 | #include "core/hle/service/glue/notif.h" | 9 | #include "core/hle/service/glue/notif.h" |
| 10 | #include "core/hle/service/ipc_helpers.h" | ||
| 11 | 11 | ||
| 12 | namespace Service::Glue { | 12 | namespace Service::Glue { |
| 13 | 13 | ||
| @@ -28,7 +28,7 @@ NOTIF_A::NOTIF_A(Core::System& system_) : ServiceFramework{system_, "notif:a"} { | |||
| 28 | 28 | ||
| 29 | NOTIF_A::~NOTIF_A() = default; | 29 | NOTIF_A::~NOTIF_A() = default; |
| 30 | 30 | ||
| 31 | void NOTIF_A::RegisterAlarmSetting(Kernel::HLERequestContext& ctx) { | 31 | void NOTIF_A::RegisterAlarmSetting(HLERequestContext& ctx) { |
| 32 | const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0); | 32 | const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0); |
| 33 | const auto application_parameter_size = ctx.GetReadBufferSize(1); | 33 | const auto application_parameter_size = ctx.GetReadBufferSize(1); |
| 34 | 34 | ||
| @@ -63,7 +63,7 @@ void NOTIF_A::RegisterAlarmSetting(Kernel::HLERequestContext& ctx) { | |||
| 63 | rb.Push(new_alarm.alarm_setting_id); | 63 | rb.Push(new_alarm.alarm_setting_id); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | void NOTIF_A::UpdateAlarmSetting(Kernel::HLERequestContext& ctx) { | 66 | void NOTIF_A::UpdateAlarmSetting(HLERequestContext& ctx) { |
| 67 | const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0); | 67 | const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0); |
| 68 | const auto application_parameter_size = ctx.GetReadBufferSize(1); | 68 | const auto application_parameter_size = ctx.GetReadBufferSize(1); |
| 69 | 69 | ||
| @@ -91,7 +91,7 @@ void NOTIF_A::UpdateAlarmSetting(Kernel::HLERequestContext& ctx) { | |||
| 91 | rb.Push(ResultSuccess); | 91 | rb.Push(ResultSuccess); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | void NOTIF_A::ListAlarmSettings(Kernel::HLERequestContext& ctx) { | 94 | void NOTIF_A::ListAlarmSettings(HLERequestContext& ctx) { |
| 95 | LOG_INFO(Service_NOTIF, "called, alarm_count={}", alarms.size()); | 95 | LOG_INFO(Service_NOTIF, "called, alarm_count={}", alarms.size()); |
| 96 | 96 | ||
| 97 | // TODO: Only return alarms of this game id | 97 | // TODO: Only return alarms of this game id |
| @@ -102,7 +102,7 @@ void NOTIF_A::ListAlarmSettings(Kernel::HLERequestContext& ctx) { | |||
| 102 | rb.Push(static_cast<u32>(alarms.size())); | 102 | rb.Push(static_cast<u32>(alarms.size())); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | void NOTIF_A::LoadApplicationParameter(Kernel::HLERequestContext& ctx) { | 105 | void NOTIF_A::LoadApplicationParameter(HLERequestContext& ctx) { |
| 106 | IPC::RequestParser rp{ctx}; | 106 | IPC::RequestParser rp{ctx}; |
| 107 | const auto alarm_setting_id{rp.Pop<AlarmSettingId>()}; | 107 | const auto alarm_setting_id{rp.Pop<AlarmSettingId>()}; |
| 108 | 108 | ||
| @@ -126,7 +126,7 @@ void NOTIF_A::LoadApplicationParameter(Kernel::HLERequestContext& ctx) { | |||
| 126 | rb.Push(static_cast<u32>(application_parameter.size())); | 126 | rb.Push(static_cast<u32>(application_parameter.size())); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | void NOTIF_A::DeleteAlarmSetting(Kernel::HLERequestContext& ctx) { | 129 | void NOTIF_A::DeleteAlarmSetting(HLERequestContext& ctx) { |
| 130 | IPC::RequestParser rp{ctx}; | 130 | IPC::RequestParser rp{ctx}; |
| 131 | const auto alarm_setting_id{rp.Pop<AlarmSettingId>()}; | 131 | const auto alarm_setting_id{rp.Pop<AlarmSettingId>()}; |
| 132 | 132 | ||
| @@ -140,7 +140,7 @@ void NOTIF_A::DeleteAlarmSetting(Kernel::HLERequestContext& ctx) { | |||
| 140 | rb.Push(ResultSuccess); | 140 | rb.Push(ResultSuccess); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | void NOTIF_A::Initialize(Kernel::HLERequestContext& ctx) { | 143 | void NOTIF_A::Initialize(HLERequestContext& ctx) { |
| 144 | // TODO: Load previous alarms from config | 144 | // TODO: Load previous alarms from config |
| 145 | 145 | ||
| 146 | LOG_WARNING(Service_NOTIF, "(STUBBED) called"); | 146 | LOG_WARNING(Service_NOTIF, "(STUBBED) called"); |
diff --git a/src/core/hle/service/glue/notif.h b/src/core/hle/service/glue/notif.h index 4467e1f35..b1187f3a3 100644 --- a/src/core/hle/service/glue/notif.h +++ b/src/core/hle/service/glue/notif.h | |||
| @@ -56,12 +56,12 @@ private: | |||
| 56 | }; | 56 | }; |
| 57 | static_assert(sizeof(AlarmSetting) == 0x40, "AlarmSetting is an invalid size"); | 57 | static_assert(sizeof(AlarmSetting) == 0x40, "AlarmSetting is an invalid size"); |
| 58 | 58 | ||
| 59 | void RegisterAlarmSetting(Kernel::HLERequestContext& ctx); | 59 | void RegisterAlarmSetting(HLERequestContext& ctx); |
| 60 | void UpdateAlarmSetting(Kernel::HLERequestContext& ctx); | 60 | void UpdateAlarmSetting(HLERequestContext& ctx); |
| 61 | void ListAlarmSettings(Kernel::HLERequestContext& ctx); | 61 | void ListAlarmSettings(HLERequestContext& ctx); |
| 62 | void LoadApplicationParameter(Kernel::HLERequestContext& ctx); | 62 | void LoadApplicationParameter(HLERequestContext& ctx); |
| 63 | void DeleteAlarmSetting(Kernel::HLERequestContext& ctx); | 63 | void DeleteAlarmSetting(HLERequestContext& ctx); |
| 64 | void Initialize(Kernel::HLERequestContext& ctx); | 64 | void Initialize(HLERequestContext& ctx); |
| 65 | 65 | ||
| 66 | std::vector<AlarmSetting>::iterator GetAlarmFromId(AlarmSettingId alarm_setting_id); | 66 | std::vector<AlarmSetting>::iterator GetAlarmFromId(AlarmSettingId alarm_setting_id); |
| 67 | 67 | ||
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 4b5130469..56c7275df 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include "core/core.h" | 8 | #include "core/core.h" |
| 9 | #include "core/core_timing.h" | 9 | #include "core/core_timing.h" |
| 10 | #include "core/hid/hid_core.h" | 10 | #include "core/hid/hid_core.h" |
| 11 | #include "core/hle/ipc_helpers.h" | ||
| 12 | #include "core/hle/kernel/k_readable_event.h" | 11 | #include "core/hle/kernel/k_readable_event.h" |
| 13 | #include "core/hle/kernel/k_shared_memory.h" | 12 | #include "core/hle/kernel/k_shared_memory.h" |
| 14 | #include "core/hle/kernel/k_transfer_memory.h" | 13 | #include "core/hle/kernel/k_transfer_memory.h" |
| @@ -18,6 +17,7 @@ | |||
| 18 | #include "core/hle/service/hid/hidbus.h" | 17 | #include "core/hle/service/hid/hidbus.h" |
| 19 | #include "core/hle/service/hid/irs.h" | 18 | #include "core/hle/service/hid/irs.h" |
| 20 | #include "core/hle/service/hid/xcd.h" | 19 | #include "core/hle/service/hid/xcd.h" |
| 20 | #include "core/hle/service/ipc_helpers.h" | ||
| 21 | #include "core/hle/service/server_manager.h" | 21 | #include "core/hle/service/server_manager.h" |
| 22 | #include "core/memory.h" | 22 | #include "core/memory.h" |
| 23 | 23 | ||
| @@ -138,7 +138,7 @@ IAppletResource::~IAppletResource() { | |||
| 138 | system.CoreTiming().UnscheduleEvent(motion_update_event, 0); | 138 | system.CoreTiming().UnscheduleEvent(motion_update_event, 0); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { | 141 | void IAppletResource::GetSharedMemoryHandle(HLERequestContext& ctx) { |
| 142 | LOG_DEBUG(Service_HID, "called"); | 142 | LOG_DEBUG(Service_HID, "called"); |
| 143 | 143 | ||
| 144 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 144 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -203,7 +203,7 @@ public: | |||
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | private: | 205 | private: |
| 206 | void InitializeVibrationDevice(Kernel::HLERequestContext& ctx) { | 206 | void InitializeVibrationDevice(HLERequestContext& ctx) { |
| 207 | IPC::RequestParser rp{ctx}; | 207 | IPC::RequestParser rp{ctx}; |
| 208 | const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()}; | 208 | const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()}; |
| 209 | 209 | ||
| @@ -382,7 +382,7 @@ Hid::Hid(Core::System& system_) | |||
| 382 | 382 | ||
| 383 | Hid::~Hid() = default; | 383 | Hid::~Hid() = default; |
| 384 | 384 | ||
| 385 | void Hid::CreateAppletResource(Kernel::HLERequestContext& ctx) { | 385 | void Hid::CreateAppletResource(HLERequestContext& ctx) { |
| 386 | IPC::RequestParser rp{ctx}; | 386 | IPC::RequestParser rp{ctx}; |
| 387 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 387 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 388 | 388 | ||
| @@ -397,7 +397,7 @@ void Hid::CreateAppletResource(Kernel::HLERequestContext& ctx) { | |||
| 397 | rb.PushIpcInterface<IAppletResource>(applet_resource); | 397 | rb.PushIpcInterface<IAppletResource>(applet_resource); |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | void Hid::ActivateDebugPad(Kernel::HLERequestContext& ctx) { | 400 | void Hid::ActivateDebugPad(HLERequestContext& ctx) { |
| 401 | IPC::RequestParser rp{ctx}; | 401 | IPC::RequestParser rp{ctx}; |
| 402 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 402 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 403 | 403 | ||
| @@ -409,7 +409,7 @@ void Hid::ActivateDebugPad(Kernel::HLERequestContext& ctx) { | |||
| 409 | rb.Push(ResultSuccess); | 409 | rb.Push(ResultSuccess); |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) { | 412 | void Hid::ActivateTouchScreen(HLERequestContext& ctx) { |
| 413 | IPC::RequestParser rp{ctx}; | 413 | IPC::RequestParser rp{ctx}; |
| 414 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 414 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 415 | 415 | ||
| @@ -421,7 +421,7 @@ void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) { | |||
| 421 | rb.Push(ResultSuccess); | 421 | rb.Push(ResultSuccess); |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) { | 424 | void Hid::ActivateMouse(HLERequestContext& ctx) { |
| 425 | IPC::RequestParser rp{ctx}; | 425 | IPC::RequestParser rp{ctx}; |
| 426 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 426 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 427 | 427 | ||
| @@ -433,7 +433,7 @@ void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) { | |||
| 433 | rb.Push(ResultSuccess); | 433 | rb.Push(ResultSuccess); |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) { | 436 | void Hid::ActivateKeyboard(HLERequestContext& ctx) { |
| 437 | IPC::RequestParser rp{ctx}; | 437 | IPC::RequestParser rp{ctx}; |
| 438 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 438 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 439 | 439 | ||
| @@ -445,7 +445,7 @@ void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) { | |||
| 445 | rb.Push(ResultSuccess); | 445 | rb.Push(ResultSuccess); |
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) { | 448 | void Hid::SendKeyboardLockKeyEvent(HLERequestContext& ctx) { |
| 449 | IPC::RequestParser rp{ctx}; | 449 | IPC::RequestParser rp{ctx}; |
| 450 | const auto flags{rp.Pop<u32>()}; | 450 | const auto flags{rp.Pop<u32>()}; |
| 451 | 451 | ||
| @@ -455,7 +455,7 @@ void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) { | |||
| 455 | rb.Push(ResultSuccess); | 455 | rb.Push(ResultSuccess); |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) { | 458 | void Hid::ActivateXpad(HLERequestContext& ctx) { |
| 459 | IPC::RequestParser rp{ctx}; | 459 | IPC::RequestParser rp{ctx}; |
| 460 | struct Parameters { | 460 | struct Parameters { |
| 461 | u32 basic_xpad_id; | 461 | u32 basic_xpad_id; |
| @@ -475,7 +475,7 @@ void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) { | |||
| 475 | rb.Push(ResultSuccess); | 475 | rb.Push(ResultSuccess); |
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) { | 478 | void Hid::GetXpadIDs(HLERequestContext& ctx) { |
| 479 | IPC::RequestParser rp{ctx}; | 479 | IPC::RequestParser rp{ctx}; |
| 480 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 480 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 481 | 481 | ||
| @@ -486,7 +486,7 @@ void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) { | |||
| 486 | rb.Push(0); | 486 | rb.Push(0); |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | void Hid::ActivateSixAxisSensor(Kernel::HLERequestContext& ctx) { | 489 | void Hid::ActivateSixAxisSensor(HLERequestContext& ctx) { |
| 490 | IPC::RequestParser rp{ctx}; | 490 | IPC::RequestParser rp{ctx}; |
| 491 | struct Parameters { | 491 | struct Parameters { |
| 492 | u32 basic_xpad_id; | 492 | u32 basic_xpad_id; |
| @@ -506,7 +506,7 @@ void Hid::ActivateSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 506 | rb.Push(ResultSuccess); | 506 | rb.Push(ResultSuccess); |
| 507 | } | 507 | } |
| 508 | 508 | ||
| 509 | void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) { | 509 | void Hid::DeactivateSixAxisSensor(HLERequestContext& ctx) { |
| 510 | IPC::RequestParser rp{ctx}; | 510 | IPC::RequestParser rp{ctx}; |
| 511 | struct Parameters { | 511 | struct Parameters { |
| 512 | u32 basic_xpad_id; | 512 | u32 basic_xpad_id; |
| @@ -526,7 +526,7 @@ void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 526 | rb.Push(ResultSuccess); | 526 | rb.Push(ResultSuccess); |
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) { | 529 | void Hid::StartSixAxisSensor(HLERequestContext& ctx) { |
| 530 | IPC::RequestParser rp{ctx}; | 530 | IPC::RequestParser rp{ctx}; |
| 531 | struct Parameters { | 531 | struct Parameters { |
| 532 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 532 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -549,7 +549,7 @@ void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 549 | rb.Push(result); | 549 | rb.Push(result); |
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) { | 552 | void Hid::StopSixAxisSensor(HLERequestContext& ctx) { |
| 553 | IPC::RequestParser rp{ctx}; | 553 | IPC::RequestParser rp{ctx}; |
| 554 | struct Parameters { | 554 | struct Parameters { |
| 555 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 555 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -572,7 +572,7 @@ void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 572 | rb.Push(result); | 572 | rb.Push(result); |
| 573 | } | 573 | } |
| 574 | 574 | ||
| 575 | void Hid::IsSixAxisSensorFusionEnabled(Kernel::HLERequestContext& ctx) { | 575 | void Hid::IsSixAxisSensorFusionEnabled(HLERequestContext& ctx) { |
| 576 | IPC::RequestParser rp{ctx}; | 576 | IPC::RequestParser rp{ctx}; |
| 577 | struct Parameters { | 577 | struct Parameters { |
| 578 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 578 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -598,7 +598,7 @@ void Hid::IsSixAxisSensorFusionEnabled(Kernel::HLERequestContext& ctx) { | |||
| 598 | rb.Push(is_enabled); | 598 | rb.Push(is_enabled); |
| 599 | } | 599 | } |
| 600 | 600 | ||
| 601 | void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) { | 601 | void Hid::EnableSixAxisSensorFusion(HLERequestContext& ctx) { |
| 602 | IPC::RequestParser rp{ctx}; | 602 | IPC::RequestParser rp{ctx}; |
| 603 | struct Parameters { | 603 | struct Parameters { |
| 604 | bool enable_sixaxis_sensor_fusion; | 604 | bool enable_sixaxis_sensor_fusion; |
| @@ -625,7 +625,7 @@ void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) { | |||
| 625 | rb.Push(result); | 625 | rb.Push(result); |
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) { | 628 | void Hid::SetSixAxisSensorFusionParameters(HLERequestContext& ctx) { |
| 629 | IPC::RequestParser rp{ctx}; | 629 | IPC::RequestParser rp{ctx}; |
| 630 | struct Parameters { | 630 | struct Parameters { |
| 631 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 631 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -652,7 +652,7 @@ void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) { | |||
| 652 | rb.Push(result); | 652 | rb.Push(result); |
| 653 | } | 653 | } |
| 654 | 654 | ||
| 655 | void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) { | 655 | void Hid::GetSixAxisSensorFusionParameters(HLERequestContext& ctx) { |
| 656 | IPC::RequestParser rp{ctx}; | 656 | IPC::RequestParser rp{ctx}; |
| 657 | struct Parameters { | 657 | struct Parameters { |
| 658 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 658 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -679,7 +679,7 @@ void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) { | |||
| 679 | rb.PushRaw(fusion_parameters); | 679 | rb.PushRaw(fusion_parameters); |
| 680 | } | 680 | } |
| 681 | 681 | ||
| 682 | void Hid::ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) { | 682 | void Hid::ResetSixAxisSensorFusionParameters(HLERequestContext& ctx) { |
| 683 | IPC::RequestParser rp{ctx}; | 683 | IPC::RequestParser rp{ctx}; |
| 684 | struct Parameters { | 684 | struct Parameters { |
| 685 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 685 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -713,7 +713,7 @@ void Hid::ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) { | |||
| 713 | rb.Push(result2); | 713 | rb.Push(result2); |
| 714 | } | 714 | } |
| 715 | 715 | ||
| 716 | void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | 716 | void Hid::SetGyroscopeZeroDriftMode(HLERequestContext& ctx) { |
| 717 | IPC::RequestParser rp{ctx}; | 717 | IPC::RequestParser rp{ctx}; |
| 718 | const auto sixaxis_handle{rp.PopRaw<Core::HID::SixAxisSensorHandle>()}; | 718 | const auto sixaxis_handle{rp.PopRaw<Core::HID::SixAxisSensorHandle>()}; |
| 719 | const auto drift_mode{rp.PopEnum<Core::HID::GyroscopeZeroDriftMode>()}; | 719 | const auto drift_mode{rp.PopEnum<Core::HID::GyroscopeZeroDriftMode>()}; |
| @@ -732,7 +732,7 @@ void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | |||
| 732 | rb.Push(result); | 732 | rb.Push(result); |
| 733 | } | 733 | } |
| 734 | 734 | ||
| 735 | void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | 735 | void Hid::GetGyroscopeZeroDriftMode(HLERequestContext& ctx) { |
| 736 | IPC::RequestParser rp{ctx}; | 736 | IPC::RequestParser rp{ctx}; |
| 737 | struct Parameters { | 737 | struct Parameters { |
| 738 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 738 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -757,7 +757,7 @@ void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | |||
| 757 | rb.PushEnum(drift_mode); | 757 | rb.PushEnum(drift_mode); |
| 758 | } | 758 | } |
| 759 | 759 | ||
| 760 | void Hid::ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | 760 | void Hid::ResetGyroscopeZeroDriftMode(HLERequestContext& ctx) { |
| 761 | IPC::RequestParser rp{ctx}; | 761 | IPC::RequestParser rp{ctx}; |
| 762 | struct Parameters { | 762 | struct Parameters { |
| 763 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 763 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -781,7 +781,7 @@ void Hid::ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | |||
| 781 | rb.Push(result); | 781 | rb.Push(result); |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) { | 784 | void Hid::IsSixAxisSensorAtRest(HLERequestContext& ctx) { |
| 785 | IPC::RequestParser rp{ctx}; | 785 | IPC::RequestParser rp{ctx}; |
| 786 | struct Parameters { | 786 | struct Parameters { |
| 787 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 787 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -806,7 +806,7 @@ void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) { | |||
| 806 | rb.Push(is_at_rest); | 806 | rb.Push(is_at_rest); |
| 807 | } | 807 | } |
| 808 | 808 | ||
| 809 | void Hid::IsFirmwareUpdateAvailableForSixAxisSensor(Kernel::HLERequestContext& ctx) { | 809 | void Hid::IsFirmwareUpdateAvailableForSixAxisSensor(HLERequestContext& ctx) { |
| 810 | IPC::RequestParser rp{ctx}; | 810 | IPC::RequestParser rp{ctx}; |
| 811 | struct Parameters { | 811 | struct Parameters { |
| 812 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 812 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -833,7 +833,7 @@ void Hid::IsFirmwareUpdateAvailableForSixAxisSensor(Kernel::HLERequestContext& c | |||
| 833 | rb.Push(is_firmware_available); | 833 | rb.Push(is_firmware_available); |
| 834 | } | 834 | } |
| 835 | 835 | ||
| 836 | void Hid::EnableSixAxisSensorUnalteredPassthrough(Kernel::HLERequestContext& ctx) { | 836 | void Hid::EnableSixAxisSensorUnalteredPassthrough(HLERequestContext& ctx) { |
| 837 | IPC::RequestParser rp{ctx}; | 837 | IPC::RequestParser rp{ctx}; |
| 838 | struct Parameters { | 838 | struct Parameters { |
| 839 | bool enabled; | 839 | bool enabled; |
| @@ -859,7 +859,7 @@ void Hid::EnableSixAxisSensorUnalteredPassthrough(Kernel::HLERequestContext& ctx | |||
| 859 | rb.Push(result); | 859 | rb.Push(result); |
| 860 | } | 860 | } |
| 861 | 861 | ||
| 862 | void Hid::IsSixAxisSensorUnalteredPassthroughEnabled(Kernel::HLERequestContext& ctx) { | 862 | void Hid::IsSixAxisSensorUnalteredPassthroughEnabled(HLERequestContext& ctx) { |
| 863 | IPC::RequestParser rp{ctx}; | 863 | IPC::RequestParser rp{ctx}; |
| 864 | struct Parameters { | 864 | struct Parameters { |
| 865 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 865 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -886,7 +886,7 @@ void Hid::IsSixAxisSensorUnalteredPassthroughEnabled(Kernel::HLERequestContext& | |||
| 886 | rb.Push(is_unaltered_sisxaxis_enabled); | 886 | rb.Push(is_unaltered_sisxaxis_enabled); |
| 887 | } | 887 | } |
| 888 | 888 | ||
| 889 | void Hid::LoadSixAxisSensorCalibrationParameter(Kernel::HLERequestContext& ctx) { | 889 | void Hid::LoadSixAxisSensorCalibrationParameter(HLERequestContext& ctx) { |
| 890 | IPC::RequestParser rp{ctx}; | 890 | IPC::RequestParser rp{ctx}; |
| 891 | struct Parameters { | 891 | struct Parameters { |
| 892 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 892 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -916,7 +916,7 @@ void Hid::LoadSixAxisSensorCalibrationParameter(Kernel::HLERequestContext& ctx) | |||
| 916 | rb.Push(result); | 916 | rb.Push(result); |
| 917 | } | 917 | } |
| 918 | 918 | ||
| 919 | void Hid::GetSixAxisSensorIcInformation(Kernel::HLERequestContext& ctx) { | 919 | void Hid::GetSixAxisSensorIcInformation(HLERequestContext& ctx) { |
| 920 | IPC::RequestParser rp{ctx}; | 920 | IPC::RequestParser rp{ctx}; |
| 921 | struct Parameters { | 921 | struct Parameters { |
| 922 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 922 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -946,7 +946,7 @@ void Hid::GetSixAxisSensorIcInformation(Kernel::HLERequestContext& ctx) { | |||
| 946 | rb.Push(result); | 946 | rb.Push(result); |
| 947 | } | 947 | } |
| 948 | 948 | ||
| 949 | void Hid::ResetIsSixAxisSensorDeviceNewlyAssigned(Kernel::HLERequestContext& ctx) { | 949 | void Hid::ResetIsSixAxisSensorDeviceNewlyAssigned(HLERequestContext& ctx) { |
| 950 | IPC::RequestParser rp{ctx}; | 950 | IPC::RequestParser rp{ctx}; |
| 951 | struct Parameters { | 951 | struct Parameters { |
| 952 | Core::HID::SixAxisSensorHandle sixaxis_handle; | 952 | Core::HID::SixAxisSensorHandle sixaxis_handle; |
| @@ -971,7 +971,7 @@ void Hid::ResetIsSixAxisSensorDeviceNewlyAssigned(Kernel::HLERequestContext& ctx | |||
| 971 | rb.Push(result); | 971 | rb.Push(result); |
| 972 | } | 972 | } |
| 973 | 973 | ||
| 974 | void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) { | 974 | void Hid::ActivateGesture(HLERequestContext& ctx) { |
| 975 | IPC::RequestParser rp{ctx}; | 975 | IPC::RequestParser rp{ctx}; |
| 976 | struct Parameters { | 976 | struct Parameters { |
| 977 | u32 unknown; | 977 | u32 unknown; |
| @@ -991,7 +991,7 @@ void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) { | |||
| 991 | rb.Push(ResultSuccess); | 991 | rb.Push(ResultSuccess); |
| 992 | } | 992 | } |
| 993 | 993 | ||
| 994 | void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | 994 | void Hid::SetSupportedNpadStyleSet(HLERequestContext& ctx) { |
| 995 | IPC::RequestParser rp{ctx}; | 995 | IPC::RequestParser rp{ctx}; |
| 996 | struct Parameters { | 996 | struct Parameters { |
| 997 | Core::HID::NpadStyleSet supported_styleset; | 997 | Core::HID::NpadStyleSet supported_styleset; |
| @@ -1012,7 +1012,7 @@ void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | |||
| 1012 | rb.Push(ResultSuccess); | 1012 | rb.Push(ResultSuccess); |
| 1013 | } | 1013 | } |
| 1014 | 1014 | ||
| 1015 | void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | 1015 | void Hid::GetSupportedNpadStyleSet(HLERequestContext& ctx) { |
| 1016 | IPC::RequestParser rp{ctx}; | 1016 | IPC::RequestParser rp{ctx}; |
| 1017 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1017 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1018 | 1018 | ||
| @@ -1025,7 +1025,7 @@ void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | |||
| 1025 | .raw); | 1025 | .raw); |
| 1026 | } | 1026 | } |
| 1027 | 1027 | ||
| 1028 | void Hid::SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) { | 1028 | void Hid::SetSupportedNpadIdType(HLERequestContext& ctx) { |
| 1029 | IPC::RequestParser rp{ctx}; | 1029 | IPC::RequestParser rp{ctx}; |
| 1030 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1030 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1031 | 1031 | ||
| @@ -1038,7 +1038,7 @@ void Hid::SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) { | |||
| 1038 | rb.Push(result); | 1038 | rb.Push(result); |
| 1039 | } | 1039 | } |
| 1040 | 1040 | ||
| 1041 | void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) { | 1041 | void Hid::ActivateNpad(HLERequestContext& ctx) { |
| 1042 | IPC::RequestParser rp{ctx}; | 1042 | IPC::RequestParser rp{ctx}; |
| 1043 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1043 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1044 | 1044 | ||
| @@ -1050,7 +1050,7 @@ void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) { | |||
| 1050 | rb.Push(ResultSuccess); | 1050 | rb.Push(ResultSuccess); |
| 1051 | } | 1051 | } |
| 1052 | 1052 | ||
| 1053 | void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) { | 1053 | void Hid::DeactivateNpad(HLERequestContext& ctx) { |
| 1054 | IPC::RequestParser rp{ctx}; | 1054 | IPC::RequestParser rp{ctx}; |
| 1055 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1055 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1056 | 1056 | ||
| @@ -1062,7 +1062,7 @@ void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) { | |||
| 1062 | rb.Push(ResultSuccess); | 1062 | rb.Push(ResultSuccess); |
| 1063 | } | 1063 | } |
| 1064 | 1064 | ||
| 1065 | void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) { | 1065 | void Hid::AcquireNpadStyleSetUpdateEventHandle(HLERequestContext& ctx) { |
| 1066 | IPC::RequestParser rp{ctx}; | 1066 | IPC::RequestParser rp{ctx}; |
| 1067 | struct Parameters { | 1067 | struct Parameters { |
| 1068 | Core::HID::NpadIdType npad_id; | 1068 | Core::HID::NpadIdType npad_id; |
| @@ -1087,7 +1087,7 @@ void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) { | |||
| 1087 | .GetStyleSetChangedEvent(parameters.npad_id)); | 1087 | .GetStyleSetChangedEvent(parameters.npad_id)); |
| 1088 | } | 1088 | } |
| 1089 | 1089 | ||
| 1090 | void Hid::DisconnectNpad(Kernel::HLERequestContext& ctx) { | 1090 | void Hid::DisconnectNpad(HLERequestContext& ctx) { |
| 1091 | IPC::RequestParser rp{ctx}; | 1091 | IPC::RequestParser rp{ctx}; |
| 1092 | struct Parameters { | 1092 | struct Parameters { |
| 1093 | Core::HID::NpadIdType npad_id; | 1093 | Core::HID::NpadIdType npad_id; |
| @@ -1108,7 +1108,7 @@ void Hid::DisconnectNpad(Kernel::HLERequestContext& ctx) { | |||
| 1108 | rb.Push(ResultSuccess); | 1108 | rb.Push(ResultSuccess); |
| 1109 | } | 1109 | } |
| 1110 | 1110 | ||
| 1111 | void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) { | 1111 | void Hid::GetPlayerLedPattern(HLERequestContext& ctx) { |
| 1112 | IPC::RequestParser rp{ctx}; | 1112 | IPC::RequestParser rp{ctx}; |
| 1113 | const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()}; | 1113 | const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()}; |
| 1114 | 1114 | ||
| @@ -1123,7 +1123,7 @@ void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) { | |||
| 1123 | rb.Push(pattern.raw); | 1123 | rb.Push(pattern.raw); |
| 1124 | } | 1124 | } |
| 1125 | 1125 | ||
| 1126 | void Hid::ActivateNpadWithRevision(Kernel::HLERequestContext& ctx) { | 1126 | void Hid::ActivateNpadWithRevision(HLERequestContext& ctx) { |
| 1127 | // Should have no effect with how our npad sets up the data | 1127 | // Should have no effect with how our npad sets up the data |
| 1128 | IPC::RequestParser rp{ctx}; | 1128 | IPC::RequestParser rp{ctx}; |
| 1129 | struct Parameters { | 1129 | struct Parameters { |
| @@ -1144,7 +1144,7 @@ void Hid::ActivateNpadWithRevision(Kernel::HLERequestContext& ctx) { | |||
| 1144 | rb.Push(ResultSuccess); | 1144 | rb.Push(ResultSuccess); |
| 1145 | } | 1145 | } |
| 1146 | 1146 | ||
| 1147 | void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { | 1147 | void Hid::SetNpadJoyHoldType(HLERequestContext& ctx) { |
| 1148 | IPC::RequestParser rp{ctx}; | 1148 | IPC::RequestParser rp{ctx}; |
| 1149 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1149 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1150 | const auto hold_type{rp.PopEnum<Controller_NPad::NpadJoyHoldType>()}; | 1150 | const auto hold_type{rp.PopEnum<Controller_NPad::NpadJoyHoldType>()}; |
| @@ -1158,7 +1158,7 @@ void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { | |||
| 1158 | rb.Push(ResultSuccess); | 1158 | rb.Push(ResultSuccess); |
| 1159 | } | 1159 | } |
| 1160 | 1160 | ||
| 1161 | void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { | 1161 | void Hid::GetNpadJoyHoldType(HLERequestContext& ctx) { |
| 1162 | IPC::RequestParser rp{ctx}; | 1162 | IPC::RequestParser rp{ctx}; |
| 1163 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1163 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1164 | 1164 | ||
| @@ -1169,7 +1169,7 @@ void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { | |||
| 1169 | rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad).GetHoldType()); | 1169 | rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad).GetHoldType()); |
| 1170 | } | 1170 | } |
| 1171 | 1171 | ||
| 1172 | void Hid::SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx) { | 1172 | void Hid::SetNpadJoyAssignmentModeSingleByDefault(HLERequestContext& ctx) { |
| 1173 | IPC::RequestParser rp{ctx}; | 1173 | IPC::RequestParser rp{ctx}; |
| 1174 | struct Parameters { | 1174 | struct Parameters { |
| 1175 | Core::HID::NpadIdType npad_id; | 1175 | Core::HID::NpadIdType npad_id; |
| @@ -1191,7 +1191,7 @@ void Hid::SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx | |||
| 1191 | rb.Push(ResultSuccess); | 1191 | rb.Push(ResultSuccess); |
| 1192 | } | 1192 | } |
| 1193 | 1193 | ||
| 1194 | void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) { | 1194 | void Hid::SetNpadJoyAssignmentModeSingle(HLERequestContext& ctx) { |
| 1195 | IPC::RequestParser rp{ctx}; | 1195 | IPC::RequestParser rp{ctx}; |
| 1196 | struct Parameters { | 1196 | struct Parameters { |
| 1197 | Core::HID::NpadIdType npad_id; | 1197 | Core::HID::NpadIdType npad_id; |
| @@ -1215,7 +1215,7 @@ void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) { | |||
| 1215 | rb.Push(ResultSuccess); | 1215 | rb.Push(ResultSuccess); |
| 1216 | } | 1216 | } |
| 1217 | 1217 | ||
| 1218 | void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) { | 1218 | void Hid::SetNpadJoyAssignmentModeDual(HLERequestContext& ctx) { |
| 1219 | IPC::RequestParser rp{ctx}; | 1219 | IPC::RequestParser rp{ctx}; |
| 1220 | struct Parameters { | 1220 | struct Parameters { |
| 1221 | Core::HID::NpadIdType npad_id; | 1221 | Core::HID::NpadIdType npad_id; |
| @@ -1236,7 +1236,7 @@ void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) { | |||
| 1236 | rb.Push(ResultSuccess); | 1236 | rb.Push(ResultSuccess); |
| 1237 | } | 1237 | } |
| 1238 | 1238 | ||
| 1239 | void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) { | 1239 | void Hid::MergeSingleJoyAsDualJoy(HLERequestContext& ctx) { |
| 1240 | IPC::RequestParser rp{ctx}; | 1240 | IPC::RequestParser rp{ctx}; |
| 1241 | const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()}; | 1241 | const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()}; |
| 1242 | const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()}; | 1242 | const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()}; |
| @@ -1252,7 +1252,7 @@ void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) { | |||
| 1252 | rb.Push(result); | 1252 | rb.Push(result); |
| 1253 | } | 1253 | } |
| 1254 | 1254 | ||
| 1255 | void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) { | 1255 | void Hid::StartLrAssignmentMode(HLERequestContext& ctx) { |
| 1256 | IPC::RequestParser rp{ctx}; | 1256 | IPC::RequestParser rp{ctx}; |
| 1257 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1257 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1258 | 1258 | ||
| @@ -1264,7 +1264,7 @@ void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) { | |||
| 1264 | rb.Push(ResultSuccess); | 1264 | rb.Push(ResultSuccess); |
| 1265 | } | 1265 | } |
| 1266 | 1266 | ||
| 1267 | void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) { | 1267 | void Hid::StopLrAssignmentMode(HLERequestContext& ctx) { |
| 1268 | IPC::RequestParser rp{ctx}; | 1268 | IPC::RequestParser rp{ctx}; |
| 1269 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1269 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1270 | 1270 | ||
| @@ -1276,7 +1276,7 @@ void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) { | |||
| 1276 | rb.Push(ResultSuccess); | 1276 | rb.Push(ResultSuccess); |
| 1277 | } | 1277 | } |
| 1278 | 1278 | ||
| 1279 | void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | 1279 | void Hid::SetNpadHandheldActivationMode(HLERequestContext& ctx) { |
| 1280 | IPC::RequestParser rp{ctx}; | 1280 | IPC::RequestParser rp{ctx}; |
| 1281 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1281 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1282 | const auto activation_mode{rp.PopEnum<Controller_NPad::NpadHandheldActivationMode>()}; | 1282 | const auto activation_mode{rp.PopEnum<Controller_NPad::NpadHandheldActivationMode>()}; |
| @@ -1291,7 +1291,7 @@ void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | |||
| 1291 | rb.Push(ResultSuccess); | 1291 | rb.Push(ResultSuccess); |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | 1294 | void Hid::GetNpadHandheldActivationMode(HLERequestContext& ctx) { |
| 1295 | IPC::RequestParser rp{ctx}; | 1295 | IPC::RequestParser rp{ctx}; |
| 1296 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1296 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1297 | 1297 | ||
| @@ -1303,7 +1303,7 @@ void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | |||
| 1303 | .GetNpadHandheldActivationMode()); | 1303 | .GetNpadHandheldActivationMode()); |
| 1304 | } | 1304 | } |
| 1305 | 1305 | ||
| 1306 | void Hid::SwapNpadAssignment(Kernel::HLERequestContext& ctx) { | 1306 | void Hid::SwapNpadAssignment(HLERequestContext& ctx) { |
| 1307 | IPC::RequestParser rp{ctx}; | 1307 | IPC::RequestParser rp{ctx}; |
| 1308 | const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()}; | 1308 | const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()}; |
| 1309 | const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()}; | 1309 | const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()}; |
| @@ -1319,7 +1319,7 @@ void Hid::SwapNpadAssignment(Kernel::HLERequestContext& ctx) { | |||
| 1319 | rb.Push(result); | 1319 | rb.Push(result); |
| 1320 | } | 1320 | } |
| 1321 | 1321 | ||
| 1322 | void Hid::IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext& ctx) { | 1322 | void Hid::IsUnintendedHomeButtonInputProtectionEnabled(HLERequestContext& ctx) { |
| 1323 | IPC::RequestParser rp{ctx}; | 1323 | IPC::RequestParser rp{ctx}; |
| 1324 | struct Parameters { | 1324 | struct Parameters { |
| 1325 | Core::HID::NpadIdType npad_id; | 1325 | Core::HID::NpadIdType npad_id; |
| @@ -1343,7 +1343,7 @@ void Hid::IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext | |||
| 1343 | rb.Push(is_enabled); | 1343 | rb.Push(is_enabled); |
| 1344 | } | 1344 | } |
| 1345 | 1345 | ||
| 1346 | void Hid::EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& ctx) { | 1346 | void Hid::EnableUnintendedHomeButtonInputProtection(HLERequestContext& ctx) { |
| 1347 | IPC::RequestParser rp{ctx}; | 1347 | IPC::RequestParser rp{ctx}; |
| 1348 | struct Parameters { | 1348 | struct Parameters { |
| 1349 | bool unintended_home_button_input_protection; | 1349 | bool unintended_home_button_input_protection; |
| @@ -1369,7 +1369,7 @@ void Hid::EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& c | |||
| 1369 | rb.Push(result); | 1369 | rb.Push(result); |
| 1370 | } | 1370 | } |
| 1371 | 1371 | ||
| 1372 | void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) { | 1372 | void Hid::SetNpadAnalogStickUseCenterClamp(HLERequestContext& ctx) { |
| 1373 | IPC::RequestParser rp{ctx}; | 1373 | IPC::RequestParser rp{ctx}; |
| 1374 | struct Parameters { | 1374 | struct Parameters { |
| 1375 | bool analog_stick_use_center_clamp; | 1375 | bool analog_stick_use_center_clamp; |
| @@ -1392,7 +1392,7 @@ void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) { | |||
| 1392 | rb.Push(ResultSuccess); | 1392 | rb.Push(ResultSuccess); |
| 1393 | } | 1393 | } |
| 1394 | 1394 | ||
| 1395 | void Hid::SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) { | 1395 | void Hid::SetNpadCaptureButtonAssignment(HLERequestContext& ctx) { |
| 1396 | IPC::RequestParser rp{ctx}; | 1396 | IPC::RequestParser rp{ctx}; |
| 1397 | struct Parameters { | 1397 | struct Parameters { |
| 1398 | Core::HID::NpadStyleSet npad_styleset; | 1398 | Core::HID::NpadStyleSet npad_styleset; |
| @@ -1412,7 +1412,7 @@ void Hid::SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) { | |||
| 1412 | rb.Push(ResultSuccess); | 1412 | rb.Push(ResultSuccess); |
| 1413 | } | 1413 | } |
| 1414 | 1414 | ||
| 1415 | void Hid::ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) { | 1415 | void Hid::ClearNpadCaptureButtonAssignment(HLERequestContext& ctx) { |
| 1416 | IPC::RequestParser rp{ctx}; | 1416 | IPC::RequestParser rp{ctx}; |
| 1417 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1417 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1418 | 1418 | ||
| @@ -1423,7 +1423,7 @@ void Hid::ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) { | |||
| 1423 | rb.Push(ResultSuccess); | 1423 | rb.Push(ResultSuccess); |
| 1424 | } | 1424 | } |
| 1425 | 1425 | ||
| 1426 | void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) { | 1426 | void Hid::GetVibrationDeviceInfo(HLERequestContext& ctx) { |
| 1427 | IPC::RequestParser rp{ctx}; | 1427 | IPC::RequestParser rp{ctx}; |
| 1428 | const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()}; | 1428 | const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()}; |
| 1429 | const auto& controller = | 1429 | const auto& controller = |
| @@ -1483,7 +1483,7 @@ void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) { | |||
| 1483 | rb.PushRaw(vibration_device_info); | 1483 | rb.PushRaw(vibration_device_info); |
| 1484 | } | 1484 | } |
| 1485 | 1485 | ||
| 1486 | void Hid::SendVibrationValue(Kernel::HLERequestContext& ctx) { | 1486 | void Hid::SendVibrationValue(HLERequestContext& ctx) { |
| 1487 | IPC::RequestParser rp{ctx}; | 1487 | IPC::RequestParser rp{ctx}; |
| 1488 | struct Parameters { | 1488 | struct Parameters { |
| 1489 | Core::HID::VibrationDeviceHandle vibration_device_handle; | 1489 | Core::HID::VibrationDeviceHandle vibration_device_handle; |
| @@ -1508,7 +1508,7 @@ void Hid::SendVibrationValue(Kernel::HLERequestContext& ctx) { | |||
| 1508 | rb.Push(ResultSuccess); | 1508 | rb.Push(ResultSuccess); |
| 1509 | } | 1509 | } |
| 1510 | 1510 | ||
| 1511 | void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) { | 1511 | void Hid::GetActualVibrationValue(HLERequestContext& ctx) { |
| 1512 | IPC::RequestParser rp{ctx}; | 1512 | IPC::RequestParser rp{ctx}; |
| 1513 | struct Parameters { | 1513 | struct Parameters { |
| 1514 | Core::HID::VibrationDeviceHandle vibration_device_handle; | 1514 | Core::HID::VibrationDeviceHandle vibration_device_handle; |
| @@ -1531,7 +1531,7 @@ void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) { | |||
| 1531 | .GetLastVibration(parameters.vibration_device_handle)); | 1531 | .GetLastVibration(parameters.vibration_device_handle)); |
| 1532 | } | 1532 | } |
| 1533 | 1533 | ||
| 1534 | void Hid::CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) { | 1534 | void Hid::CreateActiveVibrationDeviceList(HLERequestContext& ctx) { |
| 1535 | LOG_DEBUG(Service_HID, "called"); | 1535 | LOG_DEBUG(Service_HID, "called"); |
| 1536 | 1536 | ||
| 1537 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 1537 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -1539,7 +1539,7 @@ void Hid::CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) { | |||
| 1539 | rb.PushIpcInterface<IActiveVibrationDeviceList>(system, applet_resource); | 1539 | rb.PushIpcInterface<IActiveVibrationDeviceList>(system, applet_resource); |
| 1540 | } | 1540 | } |
| 1541 | 1541 | ||
| 1542 | void Hid::PermitVibration(Kernel::HLERequestContext& ctx) { | 1542 | void Hid::PermitVibration(HLERequestContext& ctx) { |
| 1543 | IPC::RequestParser rp{ctx}; | 1543 | IPC::RequestParser rp{ctx}; |
| 1544 | const auto can_vibrate{rp.Pop<bool>()}; | 1544 | const auto can_vibrate{rp.Pop<bool>()}; |
| 1545 | 1545 | ||
| @@ -1553,7 +1553,7 @@ void Hid::PermitVibration(Kernel::HLERequestContext& ctx) { | |||
| 1553 | rb.Push(ResultSuccess); | 1553 | rb.Push(ResultSuccess); |
| 1554 | } | 1554 | } |
| 1555 | 1555 | ||
| 1556 | void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) { | 1556 | void Hid::IsVibrationPermitted(HLERequestContext& ctx) { |
| 1557 | LOG_DEBUG(Service_HID, "called"); | 1557 | LOG_DEBUG(Service_HID, "called"); |
| 1558 | 1558 | ||
| 1559 | // nnSDK checks if a float is greater than zero. We return the bool we stored earlier | 1559 | // nnSDK checks if a float is greater than zero. We return the bool we stored earlier |
| @@ -1564,7 +1564,7 @@ void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) { | |||
| 1564 | rb.Push(is_enabled); | 1564 | rb.Push(is_enabled); |
| 1565 | } | 1565 | } |
| 1566 | 1566 | ||
| 1567 | void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) { | 1567 | void Hid::SendVibrationValues(HLERequestContext& ctx) { |
| 1568 | IPC::RequestParser rp{ctx}; | 1568 | IPC::RequestParser rp{ctx}; |
| 1569 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1569 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1570 | 1570 | ||
| @@ -1588,7 +1588,7 @@ void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) { | |||
| 1588 | rb.Push(ResultSuccess); | 1588 | rb.Push(ResultSuccess); |
| 1589 | } | 1589 | } |
| 1590 | 1590 | ||
| 1591 | void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) { | 1591 | void Hid::SendVibrationGcErmCommand(HLERequestContext& ctx) { |
| 1592 | IPC::RequestParser rp{ctx}; | 1592 | IPC::RequestParser rp{ctx}; |
| 1593 | struct Parameters { | 1593 | struct Parameters { |
| 1594 | Core::HID::VibrationDeviceHandle vibration_device_handle; | 1594 | Core::HID::VibrationDeviceHandle vibration_device_handle; |
| @@ -1649,7 +1649,7 @@ void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) { | |||
| 1649 | rb.Push(ResultSuccess); | 1649 | rb.Push(ResultSuccess); |
| 1650 | } | 1650 | } |
| 1651 | 1651 | ||
| 1652 | void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) { | 1652 | void Hid::GetActualVibrationGcErmCommand(HLERequestContext& ctx) { |
| 1653 | IPC::RequestParser rp{ctx}; | 1653 | IPC::RequestParser rp{ctx}; |
| 1654 | struct Parameters { | 1654 | struct Parameters { |
| 1655 | Core::HID::VibrationDeviceHandle vibration_device_handle; | 1655 | Core::HID::VibrationDeviceHandle vibration_device_handle; |
| @@ -1691,7 +1691,7 @@ void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) { | |||
| 1691 | rb.PushEnum(gc_erm_command); | 1691 | rb.PushEnum(gc_erm_command); |
| 1692 | } | 1692 | } |
| 1693 | 1693 | ||
| 1694 | void Hid::BeginPermitVibrationSession(Kernel::HLERequestContext& ctx) { | 1694 | void Hid::BeginPermitVibrationSession(HLERequestContext& ctx) { |
| 1695 | IPC::RequestParser rp{ctx}; | 1695 | IPC::RequestParser rp{ctx}; |
| 1696 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1696 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1697 | 1697 | ||
| @@ -1704,7 +1704,7 @@ void Hid::BeginPermitVibrationSession(Kernel::HLERequestContext& ctx) { | |||
| 1704 | rb.Push(ResultSuccess); | 1704 | rb.Push(ResultSuccess); |
| 1705 | } | 1705 | } |
| 1706 | 1706 | ||
| 1707 | void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) { | 1707 | void Hid::EndPermitVibrationSession(HLERequestContext& ctx) { |
| 1708 | applet_resource->GetController<Controller_NPad>(HidController::NPad) | 1708 | applet_resource->GetController<Controller_NPad>(HidController::NPad) |
| 1709 | .SetPermitVibrationSession(false); | 1709 | .SetPermitVibrationSession(false); |
| 1710 | 1710 | ||
| @@ -1714,7 +1714,7 @@ void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) { | |||
| 1714 | rb.Push(ResultSuccess); | 1714 | rb.Push(ResultSuccess); |
| 1715 | } | 1715 | } |
| 1716 | 1716 | ||
| 1717 | void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) { | 1717 | void Hid::IsVibrationDeviceMounted(HLERequestContext& ctx) { |
| 1718 | IPC::RequestParser rp{ctx}; | 1718 | IPC::RequestParser rp{ctx}; |
| 1719 | struct Parameters { | 1719 | struct Parameters { |
| 1720 | Core::HID::VibrationDeviceHandle vibration_device_handle; | 1720 | Core::HID::VibrationDeviceHandle vibration_device_handle; |
| @@ -1737,7 +1737,7 @@ void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) { | |||
| 1737 | .IsVibrationDeviceMounted(parameters.vibration_device_handle)); | 1737 | .IsVibrationDeviceMounted(parameters.vibration_device_handle)); |
| 1738 | } | 1738 | } |
| 1739 | 1739 | ||
| 1740 | void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1740 | void Hid::ActivateConsoleSixAxisSensor(HLERequestContext& ctx) { |
| 1741 | IPC::RequestParser rp{ctx}; | 1741 | IPC::RequestParser rp{ctx}; |
| 1742 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1742 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1743 | 1743 | ||
| @@ -1749,7 +1749,7 @@ void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1749 | rb.Push(ResultSuccess); | 1749 | rb.Push(ResultSuccess); |
| 1750 | } | 1750 | } |
| 1751 | 1751 | ||
| 1752 | void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1752 | void Hid::StartConsoleSixAxisSensor(HLERequestContext& ctx) { |
| 1753 | IPC::RequestParser rp{ctx}; | 1753 | IPC::RequestParser rp{ctx}; |
| 1754 | struct Parameters { | 1754 | struct Parameters { |
| 1755 | Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle; | 1755 | Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle; |
| @@ -1769,7 +1769,7 @@ void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1769 | rb.Push(ResultSuccess); | 1769 | rb.Push(ResultSuccess); |
| 1770 | } | 1770 | } |
| 1771 | 1771 | ||
| 1772 | void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1772 | void Hid::StopConsoleSixAxisSensor(HLERequestContext& ctx) { |
| 1773 | IPC::RequestParser rp{ctx}; | 1773 | IPC::RequestParser rp{ctx}; |
| 1774 | struct Parameters { | 1774 | struct Parameters { |
| 1775 | Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle; | 1775 | Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle; |
| @@ -1789,7 +1789,7 @@ void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1789 | rb.Push(ResultSuccess); | 1789 | rb.Push(ResultSuccess); |
| 1790 | } | 1790 | } |
| 1791 | 1791 | ||
| 1792 | void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1792 | void Hid::ActivateSevenSixAxisSensor(HLERequestContext& ctx) { |
| 1793 | IPC::RequestParser rp{ctx}; | 1793 | IPC::RequestParser rp{ctx}; |
| 1794 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1794 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1795 | 1795 | ||
| @@ -1801,7 +1801,7 @@ void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1801 | rb.Push(ResultSuccess); | 1801 | rb.Push(ResultSuccess); |
| 1802 | } | 1802 | } |
| 1803 | 1803 | ||
| 1804 | void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1804 | void Hid::StartSevenSixAxisSensor(HLERequestContext& ctx) { |
| 1805 | IPC::RequestParser rp{ctx}; | 1805 | IPC::RequestParser rp{ctx}; |
| 1806 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1806 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1807 | 1807 | ||
| @@ -1812,7 +1812,7 @@ void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1812 | rb.Push(ResultSuccess); | 1812 | rb.Push(ResultSuccess); |
| 1813 | } | 1813 | } |
| 1814 | 1814 | ||
| 1815 | void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1815 | void Hid::StopSevenSixAxisSensor(HLERequestContext& ctx) { |
| 1816 | IPC::RequestParser rp{ctx}; | 1816 | IPC::RequestParser rp{ctx}; |
| 1817 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1817 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1818 | 1818 | ||
| @@ -1823,7 +1823,7 @@ void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1823 | rb.Push(ResultSuccess); | 1823 | rb.Push(ResultSuccess); |
| 1824 | } | 1824 | } |
| 1825 | 1825 | ||
| 1826 | void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1826 | void Hid::InitializeSevenSixAxisSensor(HLERequestContext& ctx) { |
| 1827 | IPC::RequestParser rp{ctx}; | 1827 | IPC::RequestParser rp{ctx}; |
| 1828 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1828 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1829 | const auto t_mem_1_size{rp.Pop<u64>()}; | 1829 | const auto t_mem_1_size{rp.Pop<u64>()}; |
| @@ -1873,7 +1873,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1873 | rb.Push(ResultSuccess); | 1873 | rb.Push(ResultSuccess); |
| 1874 | } | 1874 | } |
| 1875 | 1875 | ||
| 1876 | void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | 1876 | void Hid::FinalizeSevenSixAxisSensor(HLERequestContext& ctx) { |
| 1877 | IPC::RequestParser rp{ctx}; | 1877 | IPC::RequestParser rp{ctx}; |
| 1878 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1878 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1879 | 1879 | ||
| @@ -1884,7 +1884,7 @@ void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | |||
| 1884 | rb.Push(ResultSuccess); | 1884 | rb.Push(ResultSuccess); |
| 1885 | } | 1885 | } |
| 1886 | 1886 | ||
| 1887 | void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) { | 1887 | void Hid::ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx) { |
| 1888 | IPC::RequestParser rp{ctx}; | 1888 | IPC::RequestParser rp{ctx}; |
| 1889 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 1889 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 1890 | 1890 | ||
| @@ -1897,7 +1897,7 @@ void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) { | |||
| 1897 | rb.Push(ResultSuccess); | 1897 | rb.Push(ResultSuccess); |
| 1898 | } | 1898 | } |
| 1899 | 1899 | ||
| 1900 | void Hid::IsUsbFullKeyControllerEnabled(Kernel::HLERequestContext& ctx) { | 1900 | void Hid::IsUsbFullKeyControllerEnabled(HLERequestContext& ctx) { |
| 1901 | IPC::RequestParser rp{ctx}; | 1901 | IPC::RequestParser rp{ctx}; |
| 1902 | 1902 | ||
| 1903 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 1903 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| @@ -1907,7 +1907,7 @@ void Hid::IsUsbFullKeyControllerEnabled(Kernel::HLERequestContext& ctx) { | |||
| 1907 | rb.Push(false); | 1907 | rb.Push(false); |
| 1908 | } | 1908 | } |
| 1909 | 1909 | ||
| 1910 | void Hid::GetPalmaConnectionHandle(Kernel::HLERequestContext& ctx) { | 1910 | void Hid::GetPalmaConnectionHandle(HLERequestContext& ctx) { |
| 1911 | IPC::RequestParser rp{ctx}; | 1911 | IPC::RequestParser rp{ctx}; |
| 1912 | struct Parameters { | 1912 | struct Parameters { |
| 1913 | Core::HID::NpadIdType npad_id; | 1913 | Core::HID::NpadIdType npad_id; |
| @@ -1930,7 +1930,7 @@ void Hid::GetPalmaConnectionHandle(Kernel::HLERequestContext& ctx) { | |||
| 1930 | rb.PushRaw(handle); | 1930 | rb.PushRaw(handle); |
| 1931 | } | 1931 | } |
| 1932 | 1932 | ||
| 1933 | void Hid::InitializePalma(Kernel::HLERequestContext& ctx) { | 1933 | void Hid::InitializePalma(HLERequestContext& ctx) { |
| 1934 | IPC::RequestParser rp{ctx}; | 1934 | IPC::RequestParser rp{ctx}; |
| 1935 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 1935 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 1936 | 1936 | ||
| @@ -1943,7 +1943,7 @@ void Hid::InitializePalma(Kernel::HLERequestContext& ctx) { | |||
| 1943 | rb.Push(result); | 1943 | rb.Push(result); |
| 1944 | } | 1944 | } |
| 1945 | 1945 | ||
| 1946 | void Hid::AcquirePalmaOperationCompleteEvent(Kernel::HLERequestContext& ctx) { | 1946 | void Hid::AcquirePalmaOperationCompleteEvent(HLERequestContext& ctx) { |
| 1947 | IPC::RequestParser rp{ctx}; | 1947 | IPC::RequestParser rp{ctx}; |
| 1948 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 1948 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 1949 | 1949 | ||
| @@ -1956,7 +1956,7 @@ void Hid::AcquirePalmaOperationCompleteEvent(Kernel::HLERequestContext& ctx) { | |||
| 1956 | rb.PushCopyObjects(controller.AcquirePalmaOperationCompleteEvent(connection_handle)); | 1956 | rb.PushCopyObjects(controller.AcquirePalmaOperationCompleteEvent(connection_handle)); |
| 1957 | } | 1957 | } |
| 1958 | 1958 | ||
| 1959 | void Hid::GetPalmaOperationInfo(Kernel::HLERequestContext& ctx) { | 1959 | void Hid::GetPalmaOperationInfo(HLERequestContext& ctx) { |
| 1960 | IPC::RequestParser rp{ctx}; | 1960 | IPC::RequestParser rp{ctx}; |
| 1961 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 1961 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 1962 | 1962 | ||
| @@ -1978,7 +1978,7 @@ void Hid::GetPalmaOperationInfo(Kernel::HLERequestContext& ctx) { | |||
| 1978 | rb.Push(static_cast<u64>(operation_type)); | 1978 | rb.Push(static_cast<u64>(operation_type)); |
| 1979 | } | 1979 | } |
| 1980 | 1980 | ||
| 1981 | void Hid::PlayPalmaActivity(Kernel::HLERequestContext& ctx) { | 1981 | void Hid::PlayPalmaActivity(HLERequestContext& ctx) { |
| 1982 | IPC::RequestParser rp{ctx}; | 1982 | IPC::RequestParser rp{ctx}; |
| 1983 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 1983 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 1984 | const auto palma_activity{rp.Pop<u64>()}; | 1984 | const auto palma_activity{rp.Pop<u64>()}; |
| @@ -1993,7 +1993,7 @@ void Hid::PlayPalmaActivity(Kernel::HLERequestContext& ctx) { | |||
| 1993 | rb.Push(result); | 1993 | rb.Push(result); |
| 1994 | } | 1994 | } |
| 1995 | 1995 | ||
| 1996 | void Hid::SetPalmaFrModeType(Kernel::HLERequestContext& ctx) { | 1996 | void Hid::SetPalmaFrModeType(HLERequestContext& ctx) { |
| 1997 | IPC::RequestParser rp{ctx}; | 1997 | IPC::RequestParser rp{ctx}; |
| 1998 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 1998 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 1999 | const auto fr_mode{rp.PopEnum<Controller_Palma::PalmaFrModeType>()}; | 1999 | const auto fr_mode{rp.PopEnum<Controller_Palma::PalmaFrModeType>()}; |
| @@ -2008,7 +2008,7 @@ void Hid::SetPalmaFrModeType(Kernel::HLERequestContext& ctx) { | |||
| 2008 | rb.Push(result); | 2008 | rb.Push(result); |
| 2009 | } | 2009 | } |
| 2010 | 2010 | ||
| 2011 | void Hid::ReadPalmaStep(Kernel::HLERequestContext& ctx) { | 2011 | void Hid::ReadPalmaStep(HLERequestContext& ctx) { |
| 2012 | IPC::RequestParser rp{ctx}; | 2012 | IPC::RequestParser rp{ctx}; |
| 2013 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2013 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2014 | 2014 | ||
| @@ -2021,7 +2021,7 @@ void Hid::ReadPalmaStep(Kernel::HLERequestContext& ctx) { | |||
| 2021 | rb.Push(result); | 2021 | rb.Push(result); |
| 2022 | } | 2022 | } |
| 2023 | 2023 | ||
| 2024 | void Hid::EnablePalmaStep(Kernel::HLERequestContext& ctx) { | 2024 | void Hid::EnablePalmaStep(HLERequestContext& ctx) { |
| 2025 | IPC::RequestParser rp{ctx}; | 2025 | IPC::RequestParser rp{ctx}; |
| 2026 | struct Parameters { | 2026 | struct Parameters { |
| 2027 | bool is_enabled; | 2027 | bool is_enabled; |
| @@ -2043,7 +2043,7 @@ void Hid::EnablePalmaStep(Kernel::HLERequestContext& ctx) { | |||
| 2043 | rb.Push(result); | 2043 | rb.Push(result); |
| 2044 | } | 2044 | } |
| 2045 | 2045 | ||
| 2046 | void Hid::ResetPalmaStep(Kernel::HLERequestContext& ctx) { | 2046 | void Hid::ResetPalmaStep(HLERequestContext& ctx) { |
| 2047 | IPC::RequestParser rp{ctx}; | 2047 | IPC::RequestParser rp{ctx}; |
| 2048 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2048 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2049 | 2049 | ||
| @@ -2056,21 +2056,21 @@ void Hid::ResetPalmaStep(Kernel::HLERequestContext& ctx) { | |||
| 2056 | rb.Push(result); | 2056 | rb.Push(result); |
| 2057 | } | 2057 | } |
| 2058 | 2058 | ||
| 2059 | void Hid::ReadPalmaApplicationSection(Kernel::HLERequestContext& ctx) { | 2059 | void Hid::ReadPalmaApplicationSection(HLERequestContext& ctx) { |
| 2060 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2060 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2061 | 2061 | ||
| 2062 | IPC::ResponseBuilder rb{ctx, 2}; | 2062 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2063 | rb.Push(ResultSuccess); | 2063 | rb.Push(ResultSuccess); |
| 2064 | } | 2064 | } |
| 2065 | 2065 | ||
| 2066 | void Hid::WritePalmaApplicationSection(Kernel::HLERequestContext& ctx) { | 2066 | void Hid::WritePalmaApplicationSection(HLERequestContext& ctx) { |
| 2067 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2067 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2068 | 2068 | ||
| 2069 | IPC::ResponseBuilder rb{ctx, 2}; | 2069 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2070 | rb.Push(ResultSuccess); | 2070 | rb.Push(ResultSuccess); |
| 2071 | } | 2071 | } |
| 2072 | 2072 | ||
| 2073 | void Hid::ReadPalmaUniqueCode(Kernel::HLERequestContext& ctx) { | 2073 | void Hid::ReadPalmaUniqueCode(HLERequestContext& ctx) { |
| 2074 | IPC::RequestParser rp{ctx}; | 2074 | IPC::RequestParser rp{ctx}; |
| 2075 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2075 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2076 | 2076 | ||
| @@ -2083,7 +2083,7 @@ void Hid::ReadPalmaUniqueCode(Kernel::HLERequestContext& ctx) { | |||
| 2083 | rb.Push(ResultSuccess); | 2083 | rb.Push(ResultSuccess); |
| 2084 | } | 2084 | } |
| 2085 | 2085 | ||
| 2086 | void Hid::SetPalmaUniqueCodeInvalid(Kernel::HLERequestContext& ctx) { | 2086 | void Hid::SetPalmaUniqueCodeInvalid(HLERequestContext& ctx) { |
| 2087 | IPC::RequestParser rp{ctx}; | 2087 | IPC::RequestParser rp{ctx}; |
| 2088 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2088 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2089 | 2089 | ||
| @@ -2096,14 +2096,14 @@ void Hid::SetPalmaUniqueCodeInvalid(Kernel::HLERequestContext& ctx) { | |||
| 2096 | rb.Push(ResultSuccess); | 2096 | rb.Push(ResultSuccess); |
| 2097 | } | 2097 | } |
| 2098 | 2098 | ||
| 2099 | void Hid::WritePalmaActivityEntry(Kernel::HLERequestContext& ctx) { | 2099 | void Hid::WritePalmaActivityEntry(HLERequestContext& ctx) { |
| 2100 | LOG_CRITICAL(Service_HID, "(STUBBED) called"); | 2100 | LOG_CRITICAL(Service_HID, "(STUBBED) called"); |
| 2101 | 2101 | ||
| 2102 | IPC::ResponseBuilder rb{ctx, 2}; | 2102 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2103 | rb.Push(ResultSuccess); | 2103 | rb.Push(ResultSuccess); |
| 2104 | } | 2104 | } |
| 2105 | 2105 | ||
| 2106 | void Hid::WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx) { | 2106 | void Hid::WritePalmaRgbLedPatternEntry(HLERequestContext& ctx) { |
| 2107 | IPC::RequestParser rp{ctx}; | 2107 | IPC::RequestParser rp{ctx}; |
| 2108 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2108 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2109 | const auto unknown{rp.Pop<u64>()}; | 2109 | const auto unknown{rp.Pop<u64>()}; |
| @@ -2120,7 +2120,7 @@ void Hid::WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx) { | |||
| 2120 | rb.Push(ResultSuccess); | 2120 | rb.Push(ResultSuccess); |
| 2121 | } | 2121 | } |
| 2122 | 2122 | ||
| 2123 | void Hid::WritePalmaWaveEntry(Kernel::HLERequestContext& ctx) { | 2123 | void Hid::WritePalmaWaveEntry(HLERequestContext& ctx) { |
| 2124 | IPC::RequestParser rp{ctx}; | 2124 | IPC::RequestParser rp{ctx}; |
| 2125 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2125 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2126 | const auto wave_set{rp.PopEnum<Controller_Palma::PalmaWaveSet>()}; | 2126 | const auto wave_set{rp.PopEnum<Controller_Palma::PalmaWaveSet>()}; |
| @@ -2155,7 +2155,7 @@ void Hid::WritePalmaWaveEntry(Kernel::HLERequestContext& ctx) { | |||
| 2155 | rb.Push(ResultSuccess); | 2155 | rb.Push(ResultSuccess); |
| 2156 | } | 2156 | } |
| 2157 | 2157 | ||
| 2158 | void Hid::SetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx) { | 2158 | void Hid::SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) { |
| 2159 | IPC::RequestParser rp{ctx}; | 2159 | IPC::RequestParser rp{ctx}; |
| 2160 | struct Parameters { | 2160 | struct Parameters { |
| 2161 | s32 database_id_version; | 2161 | s32 database_id_version; |
| @@ -2177,7 +2177,7 @@ void Hid::SetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx) | |||
| 2177 | rb.Push(ResultSuccess); | 2177 | rb.Push(ResultSuccess); |
| 2178 | } | 2178 | } |
| 2179 | 2179 | ||
| 2180 | void Hid::GetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx) { | 2180 | void Hid::GetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) { |
| 2181 | IPC::RequestParser rp{ctx}; | 2181 | IPC::RequestParser rp{ctx}; |
| 2182 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2182 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2183 | 2183 | ||
| @@ -2190,14 +2190,14 @@ void Hid::GetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx) | |||
| 2190 | rb.Push(ResultSuccess); | 2190 | rb.Push(ResultSuccess); |
| 2191 | } | 2191 | } |
| 2192 | 2192 | ||
| 2193 | void Hid::SuspendPalmaFeature(Kernel::HLERequestContext& ctx) { | 2193 | void Hid::SuspendPalmaFeature(HLERequestContext& ctx) { |
| 2194 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2194 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2195 | 2195 | ||
| 2196 | IPC::ResponseBuilder rb{ctx, 2}; | 2196 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2197 | rb.Push(ResultSuccess); | 2197 | rb.Push(ResultSuccess); |
| 2198 | } | 2198 | } |
| 2199 | 2199 | ||
| 2200 | void Hid::GetPalmaOperationResult(Kernel::HLERequestContext& ctx) { | 2200 | void Hid::GetPalmaOperationResult(HLERequestContext& ctx) { |
| 2201 | IPC::RequestParser rp{ctx}; | 2201 | IPC::RequestParser rp{ctx}; |
| 2202 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2202 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2203 | 2203 | ||
| @@ -2210,21 +2210,21 @@ void Hid::GetPalmaOperationResult(Kernel::HLERequestContext& ctx) { | |||
| 2210 | rb.Push(result); | 2210 | rb.Push(result); |
| 2211 | } | 2211 | } |
| 2212 | 2212 | ||
| 2213 | void Hid::ReadPalmaPlayLog(Kernel::HLERequestContext& ctx) { | 2213 | void Hid::ReadPalmaPlayLog(HLERequestContext& ctx) { |
| 2214 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2214 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2215 | 2215 | ||
| 2216 | IPC::ResponseBuilder rb{ctx, 2}; | 2216 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2217 | rb.Push(ResultSuccess); | 2217 | rb.Push(ResultSuccess); |
| 2218 | } | 2218 | } |
| 2219 | 2219 | ||
| 2220 | void Hid::ResetPalmaPlayLog(Kernel::HLERequestContext& ctx) { | 2220 | void Hid::ResetPalmaPlayLog(HLERequestContext& ctx) { |
| 2221 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2221 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2222 | 2222 | ||
| 2223 | IPC::ResponseBuilder rb{ctx, 2}; | 2223 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2224 | rb.Push(ResultSuccess); | 2224 | rb.Push(ResultSuccess); |
| 2225 | } | 2225 | } |
| 2226 | 2226 | ||
| 2227 | void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) { | 2227 | void Hid::SetIsPalmaAllConnectable(HLERequestContext& ctx) { |
| 2228 | IPC::RequestParser rp{ctx}; | 2228 | IPC::RequestParser rp{ctx}; |
| 2229 | struct Parameters { | 2229 | struct Parameters { |
| 2230 | bool is_palma_all_connectable; | 2230 | bool is_palma_all_connectable; |
| @@ -2246,14 +2246,14 @@ void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) { | |||
| 2246 | rb.Push(ResultSuccess); | 2246 | rb.Push(ResultSuccess); |
| 2247 | } | 2247 | } |
| 2248 | 2248 | ||
| 2249 | void Hid::SetIsPalmaPairedConnectable(Kernel::HLERequestContext& ctx) { | 2249 | void Hid::SetIsPalmaPairedConnectable(HLERequestContext& ctx) { |
| 2250 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2250 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2251 | 2251 | ||
| 2252 | IPC::ResponseBuilder rb{ctx, 2}; | 2252 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2253 | rb.Push(ResultSuccess); | 2253 | rb.Push(ResultSuccess); |
| 2254 | } | 2254 | } |
| 2255 | 2255 | ||
| 2256 | void Hid::PairPalma(Kernel::HLERequestContext& ctx) { | 2256 | void Hid::PairPalma(HLERequestContext& ctx) { |
| 2257 | IPC::RequestParser rp{ctx}; | 2257 | IPC::RequestParser rp{ctx}; |
| 2258 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; | 2258 | const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()}; |
| 2259 | 2259 | ||
| @@ -2266,7 +2266,7 @@ void Hid::PairPalma(Kernel::HLERequestContext& ctx) { | |||
| 2266 | rb.Push(ResultSuccess); | 2266 | rb.Push(ResultSuccess); |
| 2267 | } | 2267 | } |
| 2268 | 2268 | ||
| 2269 | void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) { | 2269 | void Hid::SetPalmaBoostMode(HLERequestContext& ctx) { |
| 2270 | IPC::RequestParser rp{ctx}; | 2270 | IPC::RequestParser rp{ctx}; |
| 2271 | const auto palma_boost_mode{rp.Pop<bool>()}; | 2271 | const auto palma_boost_mode{rp.Pop<bool>()}; |
| 2272 | 2272 | ||
| @@ -2279,35 +2279,35 @@ void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) { | |||
| 2279 | rb.Push(ResultSuccess); | 2279 | rb.Push(ResultSuccess); |
| 2280 | } | 2280 | } |
| 2281 | 2281 | ||
| 2282 | void Hid::CancelWritePalmaWaveEntry(Kernel::HLERequestContext& ctx) { | 2282 | void Hid::CancelWritePalmaWaveEntry(HLERequestContext& ctx) { |
| 2283 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2283 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2284 | 2284 | ||
| 2285 | IPC::ResponseBuilder rb{ctx, 2}; | 2285 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2286 | rb.Push(ResultSuccess); | 2286 | rb.Push(ResultSuccess); |
| 2287 | } | 2287 | } |
| 2288 | 2288 | ||
| 2289 | void Hid::EnablePalmaBoostMode(Kernel::HLERequestContext& ctx) { | 2289 | void Hid::EnablePalmaBoostMode(HLERequestContext& ctx) { |
| 2290 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2290 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2291 | 2291 | ||
| 2292 | IPC::ResponseBuilder rb{ctx, 2}; | 2292 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2293 | rb.Push(ResultSuccess); | 2293 | rb.Push(ResultSuccess); |
| 2294 | } | 2294 | } |
| 2295 | 2295 | ||
| 2296 | void Hid::GetPalmaBluetoothAddress(Kernel::HLERequestContext& ctx) { | 2296 | void Hid::GetPalmaBluetoothAddress(HLERequestContext& ctx) { |
| 2297 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2297 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2298 | 2298 | ||
| 2299 | IPC::ResponseBuilder rb{ctx, 2}; | 2299 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2300 | rb.Push(ResultSuccess); | 2300 | rb.Push(ResultSuccess); |
| 2301 | } | 2301 | } |
| 2302 | 2302 | ||
| 2303 | void Hid::SetDisallowedPalmaConnection(Kernel::HLERequestContext& ctx) { | 2303 | void Hid::SetDisallowedPalmaConnection(HLERequestContext& ctx) { |
| 2304 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2304 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 2305 | 2305 | ||
| 2306 | IPC::ResponseBuilder rb{ctx, 2}; | 2306 | IPC::ResponseBuilder rb{ctx, 2}; |
| 2307 | rb.Push(ResultSuccess); | 2307 | rb.Push(ResultSuccess); |
| 2308 | } | 2308 | } |
| 2309 | 2309 | ||
| 2310 | void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) { | 2310 | void Hid::SetNpadCommunicationMode(HLERequestContext& ctx) { |
| 2311 | IPC::RequestParser rp{ctx}; | 2311 | IPC::RequestParser rp{ctx}; |
| 2312 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 2312 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 2313 | const auto communication_mode{rp.PopEnum<Controller_NPad::NpadCommunicationMode>()}; | 2313 | const auto communication_mode{rp.PopEnum<Controller_NPad::NpadCommunicationMode>()}; |
| @@ -2322,7 +2322,7 @@ void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) { | |||
| 2322 | rb.Push(ResultSuccess); | 2322 | rb.Push(ResultSuccess); |
| 2323 | } | 2323 | } |
| 2324 | 2324 | ||
| 2325 | void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) { | 2325 | void Hid::GetNpadCommunicationMode(HLERequestContext& ctx) { |
| 2326 | IPC::RequestParser rp{ctx}; | 2326 | IPC::RequestParser rp{ctx}; |
| 2327 | 2327 | ||
| 2328 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 2328 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| @@ -2333,7 +2333,7 @@ void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) { | |||
| 2333 | .GetNpadCommunicationMode()); | 2333 | .GetNpadCommunicationMode()); |
| 2334 | } | 2334 | } |
| 2335 | 2335 | ||
| 2336 | void Hid::SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx) { | 2336 | void Hid::SetTouchScreenConfiguration(HLERequestContext& ctx) { |
| 2337 | IPC::RequestParser rp{ctx}; | 2337 | IPC::RequestParser rp{ctx}; |
| 2338 | const auto touchscreen_mode{rp.PopRaw<Controller_Touchscreen::TouchScreenConfigurationForNx>()}; | 2338 | const auto touchscreen_mode{rp.PopRaw<Controller_Touchscreen::TouchScreenConfigurationForNx>()}; |
| 2339 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 2339 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| @@ -2345,7 +2345,7 @@ void Hid::SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx) { | |||
| 2345 | rb.Push(ResultSuccess); | 2345 | rb.Push(ResultSuccess); |
| 2346 | } | 2346 | } |
| 2347 | 2347 | ||
| 2348 | void Hid::IsFirmwareUpdateNeededForNotification(Kernel::HLERequestContext& ctx) { | 2348 | void Hid::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) { |
| 2349 | IPC::RequestParser rp{ctx}; | 2349 | IPC::RequestParser rp{ctx}; |
| 2350 | struct Parameters { | 2350 | struct Parameters { |
| 2351 | s32 unknown; | 2351 | s32 unknown; |
| @@ -2719,7 +2719,7 @@ public: | |||
| 2719 | } | 2719 | } |
| 2720 | 2720 | ||
| 2721 | private: | 2721 | private: |
| 2722 | void ApplyNpadSystemCommonPolicy(Kernel::HLERequestContext& ctx) { | 2722 | void ApplyNpadSystemCommonPolicy(HLERequestContext& ctx) { |
| 2723 | // We already do this for homebrew so we can just stub it out | 2723 | // We already do this for homebrew so we can just stub it out |
| 2724 | LOG_WARNING(Service_HID, "called"); | 2724 | LOG_WARNING(Service_HID, "called"); |
| 2725 | 2725 | ||
| @@ -2727,7 +2727,7 @@ private: | |||
| 2727 | rb.Push(ResultSuccess); | 2727 | rb.Push(ResultSuccess); |
| 2728 | } | 2728 | } |
| 2729 | 2729 | ||
| 2730 | void GetUniquePadsFromNpad(Kernel::HLERequestContext& ctx) { | 2730 | void GetUniquePadsFromNpad(HLERequestContext& ctx) { |
| 2731 | IPC::RequestParser rp{ctx}; | 2731 | IPC::RequestParser rp{ctx}; |
| 2732 | const auto npad_id_type{rp.PopEnum<Core::HID::NpadIdType>()}; | 2732 | const auto npad_id_type{rp.PopEnum<Core::HID::NpadIdType>()}; |
| 2733 | 2733 | ||
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index 9563654b6..c69e5f3fb 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h | |||
| @@ -76,7 +76,7 @@ private: | |||
| 76 | std::make_unique<T>(system.HIDCore(), shared_memory, service_context); | 76 | std::make_unique<T>(system.HIDCore(), shared_memory, service_context); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx); | 79 | void GetSharedMemoryHandle(HLERequestContext& ctx); |
| 80 | void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); | 80 | void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| 81 | void UpdateNpad(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); | 81 | void UpdateNpad(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| 82 | void UpdateMouseKeyboard(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); | 82 | void UpdateMouseKeyboard(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| @@ -101,115 +101,115 @@ public: | |||
| 101 | std::shared_ptr<IAppletResource> GetAppletResource(); | 101 | std::shared_ptr<IAppletResource> GetAppletResource(); |
| 102 | 102 | ||
| 103 | private: | 103 | private: |
| 104 | void CreateAppletResource(Kernel::HLERequestContext& ctx); | 104 | void CreateAppletResource(HLERequestContext& ctx); |
| 105 | void ActivateDebugPad(Kernel::HLERequestContext& ctx); | 105 | void ActivateDebugPad(HLERequestContext& ctx); |
| 106 | void ActivateTouchScreen(Kernel::HLERequestContext& ctx); | 106 | void ActivateTouchScreen(HLERequestContext& ctx); |
| 107 | void ActivateMouse(Kernel::HLERequestContext& ctx); | 107 | void ActivateMouse(HLERequestContext& ctx); |
| 108 | void ActivateKeyboard(Kernel::HLERequestContext& ctx); | 108 | void ActivateKeyboard(HLERequestContext& ctx); |
| 109 | void SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx); | 109 | void SendKeyboardLockKeyEvent(HLERequestContext& ctx); |
| 110 | void ActivateXpad(Kernel::HLERequestContext& ctx); | 110 | void ActivateXpad(HLERequestContext& ctx); |
| 111 | void GetXpadIDs(Kernel::HLERequestContext& ctx); | 111 | void GetXpadIDs(HLERequestContext& ctx); |
| 112 | void ActivateSixAxisSensor(Kernel::HLERequestContext& ctx); | 112 | void ActivateSixAxisSensor(HLERequestContext& ctx); |
| 113 | void DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx); | 113 | void DeactivateSixAxisSensor(HLERequestContext& ctx); |
| 114 | void StartSixAxisSensor(Kernel::HLERequestContext& ctx); | 114 | void StartSixAxisSensor(HLERequestContext& ctx); |
| 115 | void StopSixAxisSensor(Kernel::HLERequestContext& ctx); | 115 | void StopSixAxisSensor(HLERequestContext& ctx); |
| 116 | void IsSixAxisSensorFusionEnabled(Kernel::HLERequestContext& ctx); | 116 | void IsSixAxisSensorFusionEnabled(HLERequestContext& ctx); |
| 117 | void EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx); | 117 | void EnableSixAxisSensorFusion(HLERequestContext& ctx); |
| 118 | void SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx); | 118 | void SetSixAxisSensorFusionParameters(HLERequestContext& ctx); |
| 119 | void GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx); | 119 | void GetSixAxisSensorFusionParameters(HLERequestContext& ctx); |
| 120 | void ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx); | 120 | void ResetSixAxisSensorFusionParameters(HLERequestContext& ctx); |
| 121 | void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx); | 121 | void SetGyroscopeZeroDriftMode(HLERequestContext& ctx); |
| 122 | void GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx); | 122 | void GetGyroscopeZeroDriftMode(HLERequestContext& ctx); |
| 123 | void ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx); | 123 | void ResetGyroscopeZeroDriftMode(HLERequestContext& ctx); |
| 124 | void IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx); | 124 | void IsSixAxisSensorAtRest(HLERequestContext& ctx); |
| 125 | void IsFirmwareUpdateAvailableForSixAxisSensor(Kernel::HLERequestContext& ctx); | 125 | void IsFirmwareUpdateAvailableForSixAxisSensor(HLERequestContext& ctx); |
| 126 | void EnableSixAxisSensorUnalteredPassthrough(Kernel::HLERequestContext& ctx); | 126 | void EnableSixAxisSensorUnalteredPassthrough(HLERequestContext& ctx); |
| 127 | void IsSixAxisSensorUnalteredPassthroughEnabled(Kernel::HLERequestContext& ctx); | 127 | void IsSixAxisSensorUnalteredPassthroughEnabled(HLERequestContext& ctx); |
| 128 | void LoadSixAxisSensorCalibrationParameter(Kernel::HLERequestContext& ctx); | 128 | void LoadSixAxisSensorCalibrationParameter(HLERequestContext& ctx); |
| 129 | void GetSixAxisSensorIcInformation(Kernel::HLERequestContext& ctx); | 129 | void GetSixAxisSensorIcInformation(HLERequestContext& ctx); |
| 130 | void ResetIsSixAxisSensorDeviceNewlyAssigned(Kernel::HLERequestContext& ctx); | 130 | void ResetIsSixAxisSensorDeviceNewlyAssigned(HLERequestContext& ctx); |
| 131 | void ActivateGesture(Kernel::HLERequestContext& ctx); | 131 | void ActivateGesture(HLERequestContext& ctx); |
| 132 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx); | 132 | void SetSupportedNpadStyleSet(HLERequestContext& ctx); |
| 133 | void GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx); | 133 | void GetSupportedNpadStyleSet(HLERequestContext& ctx); |
| 134 | void SetSupportedNpadIdType(Kernel::HLERequestContext& ctx); | 134 | void SetSupportedNpadIdType(HLERequestContext& ctx); |
| 135 | void ActivateNpad(Kernel::HLERequestContext& ctx); | 135 | void ActivateNpad(HLERequestContext& ctx); |
| 136 | void DeactivateNpad(Kernel::HLERequestContext& ctx); | 136 | void DeactivateNpad(HLERequestContext& ctx); |
| 137 | void AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx); | 137 | void AcquireNpadStyleSetUpdateEventHandle(HLERequestContext& ctx); |
| 138 | void DisconnectNpad(Kernel::HLERequestContext& ctx); | 138 | void DisconnectNpad(HLERequestContext& ctx); |
| 139 | void GetPlayerLedPattern(Kernel::HLERequestContext& ctx); | 139 | void GetPlayerLedPattern(HLERequestContext& ctx); |
| 140 | void ActivateNpadWithRevision(Kernel::HLERequestContext& ctx); | 140 | void ActivateNpadWithRevision(HLERequestContext& ctx); |
| 141 | void SetNpadJoyHoldType(Kernel::HLERequestContext& ctx); | 141 | void SetNpadJoyHoldType(HLERequestContext& ctx); |
| 142 | void GetNpadJoyHoldType(Kernel::HLERequestContext& ctx); | 142 | void GetNpadJoyHoldType(HLERequestContext& ctx); |
| 143 | void SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx); | 143 | void SetNpadJoyAssignmentModeSingleByDefault(HLERequestContext& ctx); |
| 144 | void SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx); | 144 | void SetNpadJoyAssignmentModeSingle(HLERequestContext& ctx); |
| 145 | void SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx); | 145 | void SetNpadJoyAssignmentModeDual(HLERequestContext& ctx); |
| 146 | void MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx); | 146 | void MergeSingleJoyAsDualJoy(HLERequestContext& ctx); |
| 147 | void StartLrAssignmentMode(Kernel::HLERequestContext& ctx); | 147 | void StartLrAssignmentMode(HLERequestContext& ctx); |
| 148 | void StopLrAssignmentMode(Kernel::HLERequestContext& ctx); | 148 | void StopLrAssignmentMode(HLERequestContext& ctx); |
| 149 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx); | 149 | void SetNpadHandheldActivationMode(HLERequestContext& ctx); |
| 150 | void GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx); | 150 | void GetNpadHandheldActivationMode(HLERequestContext& ctx); |
| 151 | void SwapNpadAssignment(Kernel::HLERequestContext& ctx); | 151 | void SwapNpadAssignment(HLERequestContext& ctx); |
| 152 | void IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext& ctx); | 152 | void IsUnintendedHomeButtonInputProtectionEnabled(HLERequestContext& ctx); |
| 153 | void EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& ctx); | 153 | void EnableUnintendedHomeButtonInputProtection(HLERequestContext& ctx); |
| 154 | void SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx); | 154 | void SetNpadAnalogStickUseCenterClamp(HLERequestContext& ctx); |
| 155 | void SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx); | 155 | void SetNpadCaptureButtonAssignment(HLERequestContext& ctx); |
| 156 | void ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx); | 156 | void ClearNpadCaptureButtonAssignment(HLERequestContext& ctx); |
| 157 | void GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx); | 157 | void GetVibrationDeviceInfo(HLERequestContext& ctx); |
| 158 | void SendVibrationValue(Kernel::HLERequestContext& ctx); | 158 | void SendVibrationValue(HLERequestContext& ctx); |
| 159 | void GetActualVibrationValue(Kernel::HLERequestContext& ctx); | 159 | void GetActualVibrationValue(HLERequestContext& ctx); |
| 160 | void CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx); | 160 | void CreateActiveVibrationDeviceList(HLERequestContext& ctx); |
| 161 | void PermitVibration(Kernel::HLERequestContext& ctx); | 161 | void PermitVibration(HLERequestContext& ctx); |
| 162 | void IsVibrationPermitted(Kernel::HLERequestContext& ctx); | 162 | void IsVibrationPermitted(HLERequestContext& ctx); |
| 163 | void SendVibrationValues(Kernel::HLERequestContext& ctx); | 163 | void SendVibrationValues(HLERequestContext& ctx); |
| 164 | void SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx); | 164 | void SendVibrationGcErmCommand(HLERequestContext& ctx); |
| 165 | void GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx); | 165 | void GetActualVibrationGcErmCommand(HLERequestContext& ctx); |
| 166 | void BeginPermitVibrationSession(Kernel::HLERequestContext& ctx); | 166 | void BeginPermitVibrationSession(HLERequestContext& ctx); |
| 167 | void EndPermitVibrationSession(Kernel::HLERequestContext& ctx); | 167 | void EndPermitVibrationSession(HLERequestContext& ctx); |
| 168 | void IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx); | 168 | void IsVibrationDeviceMounted(HLERequestContext& ctx); |
| 169 | void ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx); | 169 | void ActivateConsoleSixAxisSensor(HLERequestContext& ctx); |
| 170 | void StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx); | 170 | void StartConsoleSixAxisSensor(HLERequestContext& ctx); |
| 171 | void StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx); | 171 | void StopConsoleSixAxisSensor(HLERequestContext& ctx); |
| 172 | void ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx); | 172 | void ActivateSevenSixAxisSensor(HLERequestContext& ctx); |
| 173 | void StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx); | 173 | void StartSevenSixAxisSensor(HLERequestContext& ctx); |
| 174 | void StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx); | 174 | void StopSevenSixAxisSensor(HLERequestContext& ctx); |
| 175 | void InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx); | 175 | void InitializeSevenSixAxisSensor(HLERequestContext& ctx); |
| 176 | void FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx); | 176 | void FinalizeSevenSixAxisSensor(HLERequestContext& ctx); |
| 177 | void ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx); | 177 | void ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx); |
| 178 | void IsUsbFullKeyControllerEnabled(Kernel::HLERequestContext& ctx); | 178 | void IsUsbFullKeyControllerEnabled(HLERequestContext& ctx); |
| 179 | void GetPalmaConnectionHandle(Kernel::HLERequestContext& ctx); | 179 | void GetPalmaConnectionHandle(HLERequestContext& ctx); |
| 180 | void InitializePalma(Kernel::HLERequestContext& ctx); | 180 | void InitializePalma(HLERequestContext& ctx); |
| 181 | void AcquirePalmaOperationCompleteEvent(Kernel::HLERequestContext& ctx); | 181 | void AcquirePalmaOperationCompleteEvent(HLERequestContext& ctx); |
| 182 | void GetPalmaOperationInfo(Kernel::HLERequestContext& ctx); | 182 | void GetPalmaOperationInfo(HLERequestContext& ctx); |
| 183 | void PlayPalmaActivity(Kernel::HLERequestContext& ctx); | 183 | void PlayPalmaActivity(HLERequestContext& ctx); |
| 184 | void SetPalmaFrModeType(Kernel::HLERequestContext& ctx); | 184 | void SetPalmaFrModeType(HLERequestContext& ctx); |
| 185 | void ReadPalmaStep(Kernel::HLERequestContext& ctx); | 185 | void ReadPalmaStep(HLERequestContext& ctx); |
| 186 | void EnablePalmaStep(Kernel::HLERequestContext& ctx); | 186 | void EnablePalmaStep(HLERequestContext& ctx); |
| 187 | void ResetPalmaStep(Kernel::HLERequestContext& ctx); | 187 | void ResetPalmaStep(HLERequestContext& ctx); |
| 188 | void ReadPalmaApplicationSection(Kernel::HLERequestContext& ctx); | 188 | void ReadPalmaApplicationSection(HLERequestContext& ctx); |
| 189 | void WritePalmaApplicationSection(Kernel::HLERequestContext& ctx); | 189 | void WritePalmaApplicationSection(HLERequestContext& ctx); |
| 190 | void ReadPalmaUniqueCode(Kernel::HLERequestContext& ctx); | 190 | void ReadPalmaUniqueCode(HLERequestContext& ctx); |
| 191 | void SetPalmaUniqueCodeInvalid(Kernel::HLERequestContext& ctx); | 191 | void SetPalmaUniqueCodeInvalid(HLERequestContext& ctx); |
| 192 | void WritePalmaActivityEntry(Kernel::HLERequestContext& ctx); | 192 | void WritePalmaActivityEntry(HLERequestContext& ctx); |
| 193 | void WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx); | 193 | void WritePalmaRgbLedPatternEntry(HLERequestContext& ctx); |
| 194 | void WritePalmaWaveEntry(Kernel::HLERequestContext& ctx); | 194 | void WritePalmaWaveEntry(HLERequestContext& ctx); |
| 195 | void SetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx); | 195 | void SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx); |
| 196 | void GetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx); | 196 | void GetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx); |
| 197 | void SuspendPalmaFeature(Kernel::HLERequestContext& ctx); | 197 | void SuspendPalmaFeature(HLERequestContext& ctx); |
| 198 | void GetPalmaOperationResult(Kernel::HLERequestContext& ctx); | 198 | void GetPalmaOperationResult(HLERequestContext& ctx); |
| 199 | void ReadPalmaPlayLog(Kernel::HLERequestContext& ctx); | 199 | void ReadPalmaPlayLog(HLERequestContext& ctx); |
| 200 | void ResetPalmaPlayLog(Kernel::HLERequestContext& ctx); | 200 | void ResetPalmaPlayLog(HLERequestContext& ctx); |
| 201 | void SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx); | 201 | void SetIsPalmaAllConnectable(HLERequestContext& ctx); |
| 202 | void SetIsPalmaPairedConnectable(Kernel::HLERequestContext& ctx); | 202 | void SetIsPalmaPairedConnectable(HLERequestContext& ctx); |
| 203 | void PairPalma(Kernel::HLERequestContext& ctx); | 203 | void PairPalma(HLERequestContext& ctx); |
| 204 | void SetPalmaBoostMode(Kernel::HLERequestContext& ctx); | 204 | void SetPalmaBoostMode(HLERequestContext& ctx); |
| 205 | void CancelWritePalmaWaveEntry(Kernel::HLERequestContext& ctx); | 205 | void CancelWritePalmaWaveEntry(HLERequestContext& ctx); |
| 206 | void EnablePalmaBoostMode(Kernel::HLERequestContext& ctx); | 206 | void EnablePalmaBoostMode(HLERequestContext& ctx); |
| 207 | void GetPalmaBluetoothAddress(Kernel::HLERequestContext& ctx); | 207 | void GetPalmaBluetoothAddress(HLERequestContext& ctx); |
| 208 | void SetDisallowedPalmaConnection(Kernel::HLERequestContext& ctx); | 208 | void SetDisallowedPalmaConnection(HLERequestContext& ctx); |
| 209 | void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx); | 209 | void SetNpadCommunicationMode(HLERequestContext& ctx); |
| 210 | void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx); | 210 | void GetNpadCommunicationMode(HLERequestContext& ctx); |
| 211 | void SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx); | 211 | void SetTouchScreenConfiguration(HLERequestContext& ctx); |
| 212 | void IsFirmwareUpdateNeededForNotification(Kernel::HLERequestContext& ctx); | 212 | void IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx); |
| 213 | 213 | ||
| 214 | std::shared_ptr<IAppletResource> applet_resource; | 214 | std::shared_ptr<IAppletResource> applet_resource; |
| 215 | 215 | ||
diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp index 07199d5d5..5604a6fda 100644 --- a/src/core/hle/service/hid/hidbus.cpp +++ b/src/core/hle/service/hid/hidbus.cpp | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 8 | #include "core/core_timing_util.h" | 8 | #include "core/core_timing_util.h" |
| 9 | #include "core/hid/hid_types.h" | 9 | #include "core/hid/hid_types.h" |
| 10 | #include "core/hle/ipc_helpers.h" | ||
| 11 | #include "core/hle/kernel/k_event.h" | 10 | #include "core/hle/kernel/k_event.h" |
| 12 | #include "core/hle/kernel/k_readable_event.h" | 11 | #include "core/hle/kernel/k_readable_event.h" |
| 13 | #include "core/hle/kernel/k_shared_memory.h" | 12 | #include "core/hle/kernel/k_shared_memory.h" |
| @@ -16,6 +15,7 @@ | |||
| 16 | #include "core/hle/service/hid/hidbus/ringcon.h" | 15 | #include "core/hle/service/hid/hidbus/ringcon.h" |
| 17 | #include "core/hle/service/hid/hidbus/starlink.h" | 16 | #include "core/hle/service/hid/hidbus/starlink.h" |
| 18 | #include "core/hle/service/hid/hidbus/stubbed.h" | 17 | #include "core/hle/service/hid/hidbus/stubbed.h" |
| 18 | #include "core/hle/service/ipc_helpers.h" | ||
| 19 | #include "core/hle/service/service.h" | 19 | #include "core/hle/service/service.h" |
| 20 | #include "core/memory.h" | 20 | #include "core/memory.h" |
| 21 | 21 | ||
| @@ -99,7 +99,7 @@ std::optional<std::size_t> HidBus::GetDeviceIndexFromHandle(BusHandle handle) co | |||
| 99 | return std::nullopt; | 99 | return std::nullopt; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | void HidBus::GetBusHandle(Kernel::HLERequestContext& ctx) { | 102 | void HidBus::GetBusHandle(HLERequestContext& ctx) { |
| 103 | IPC::RequestParser rp{ctx}; | 103 | IPC::RequestParser rp{ctx}; |
| 104 | struct Parameters { | 104 | struct Parameters { |
| 105 | Core::HID::NpadIdType npad_id; | 105 | Core::HID::NpadIdType npad_id; |
| @@ -165,7 +165,7 @@ void HidBus::GetBusHandle(Kernel::HLERequestContext& ctx) { | |||
| 165 | rb.PushRaw(out_data); | 165 | rb.PushRaw(out_data); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void HidBus::IsExternalDeviceConnected(Kernel::HLERequestContext& ctx) { | 168 | void HidBus::IsExternalDeviceConnected(HLERequestContext& ctx) { |
| 169 | IPC::RequestParser rp{ctx}; | 169 | IPC::RequestParser rp{ctx}; |
| 170 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 170 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 171 | 171 | ||
| @@ -193,7 +193,7 @@ void HidBus::IsExternalDeviceConnected(Kernel::HLERequestContext& ctx) { | |||
| 193 | return; | 193 | return; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | void HidBus::Initialize(Kernel::HLERequestContext& ctx) { | 196 | void HidBus::Initialize(HLERequestContext& ctx) { |
| 197 | IPC::RequestParser rp{ctx}; | 197 | IPC::RequestParser rp{ctx}; |
| 198 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 198 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 199 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 199 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| @@ -245,7 +245,7 @@ void HidBus::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 245 | return; | 245 | return; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | void HidBus::Finalize(Kernel::HLERequestContext& ctx) { | 248 | void HidBus::Finalize(HLERequestContext& ctx) { |
| 249 | IPC::RequestParser rp{ctx}; | 249 | IPC::RequestParser rp{ctx}; |
| 250 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 250 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 251 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 251 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| @@ -284,7 +284,7 @@ void HidBus::Finalize(Kernel::HLERequestContext& ctx) { | |||
| 284 | return; | 284 | return; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | void HidBus::EnableExternalDevice(Kernel::HLERequestContext& ctx) { | 287 | void HidBus::EnableExternalDevice(HLERequestContext& ctx) { |
| 288 | IPC::RequestParser rp{ctx}; | 288 | IPC::RequestParser rp{ctx}; |
| 289 | struct Parameters { | 289 | struct Parameters { |
| 290 | bool enable; | 290 | bool enable; |
| @@ -322,7 +322,7 @@ void HidBus::EnableExternalDevice(Kernel::HLERequestContext& ctx) { | |||
| 322 | return; | 322 | return; |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | void HidBus::GetExternalDeviceId(Kernel::HLERequestContext& ctx) { | 325 | void HidBus::GetExternalDeviceId(HLERequestContext& ctx) { |
| 326 | IPC::RequestParser rp{ctx}; | 326 | IPC::RequestParser rp{ctx}; |
| 327 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 327 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 328 | 328 | ||
| @@ -349,7 +349,7 @@ void HidBus::GetExternalDeviceId(Kernel::HLERequestContext& ctx) { | |||
| 349 | return; | 349 | return; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | void HidBus::SendCommandAsync(Kernel::HLERequestContext& ctx) { | 352 | void HidBus::SendCommandAsync(HLERequestContext& ctx) { |
| 353 | IPC::RequestParser rp{ctx}; | 353 | IPC::RequestParser rp{ctx}; |
| 354 | const auto data = ctx.ReadBuffer(); | 354 | const auto data = ctx.ReadBuffer(); |
| 355 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 355 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| @@ -377,7 +377,7 @@ void HidBus::SendCommandAsync(Kernel::HLERequestContext& ctx) { | |||
| 377 | return; | 377 | return; |
| 378 | }; | 378 | }; |
| 379 | 379 | ||
| 380 | void HidBus::GetSendCommandAsynceResult(Kernel::HLERequestContext& ctx) { | 380 | void HidBus::GetSendCommandAsynceResult(HLERequestContext& ctx) { |
| 381 | IPC::RequestParser rp{ctx}; | 381 | IPC::RequestParser rp{ctx}; |
| 382 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 382 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 383 | 383 | ||
| @@ -406,7 +406,7 @@ void HidBus::GetSendCommandAsynceResult(Kernel::HLERequestContext& ctx) { | |||
| 406 | return; | 406 | return; |
| 407 | }; | 407 | }; |
| 408 | 408 | ||
| 409 | void HidBus::SetEventForSendCommandAsycResult(Kernel::HLERequestContext& ctx) { | 409 | void HidBus::SetEventForSendCommandAsycResult(HLERequestContext& ctx) { |
| 410 | IPC::RequestParser rp{ctx}; | 410 | IPC::RequestParser rp{ctx}; |
| 411 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 411 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 412 | 412 | ||
| @@ -432,7 +432,7 @@ void HidBus::SetEventForSendCommandAsycResult(Kernel::HLERequestContext& ctx) { | |||
| 432 | return; | 432 | return; |
| 433 | }; | 433 | }; |
| 434 | 434 | ||
| 435 | void HidBus::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { | 435 | void HidBus::GetSharedMemoryHandle(HLERequestContext& ctx) { |
| 436 | LOG_DEBUG(Service_HID, "called"); | 436 | LOG_DEBUG(Service_HID, "called"); |
| 437 | 437 | ||
| 438 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 438 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -440,7 +440,7 @@ void HidBus::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { | |||
| 440 | rb.PushCopyObjects(&system.Kernel().GetHidBusSharedMem()); | 440 | rb.PushCopyObjects(&system.Kernel().GetHidBusSharedMem()); |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | void HidBus::EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) { | 443 | void HidBus::EnableJoyPollingReceiveMode(HLERequestContext& ctx) { |
| 444 | IPC::RequestParser rp{ctx}; | 444 | IPC::RequestParser rp{ctx}; |
| 445 | const auto t_mem_size{rp.Pop<u32>()}; | 445 | const auto t_mem_size{rp.Pop<u32>()}; |
| 446 | const auto t_mem_handle{ctx.GetCopyHandle(0)}; | 446 | const auto t_mem_handle{ctx.GetCopyHandle(0)}; |
| @@ -485,7 +485,7 @@ void HidBus::EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) { | |||
| 485 | return; | 485 | return; |
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | void HidBus::DisableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) { | 488 | void HidBus::DisableJoyPollingReceiveMode(HLERequestContext& ctx) { |
| 489 | IPC::RequestParser rp{ctx}; | 489 | IPC::RequestParser rp{ctx}; |
| 490 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; | 490 | const auto bus_handle_{rp.PopRaw<BusHandle>()}; |
| 491 | 491 | ||
| @@ -512,7 +512,7 @@ void HidBus::DisableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) { | |||
| 512 | return; | 512 | return; |
| 513 | } | 513 | } |
| 514 | 514 | ||
| 515 | void HidBus::SetStatusManagerType(Kernel::HLERequestContext& ctx) { | 515 | void HidBus::SetStatusManagerType(HLERequestContext& ctx) { |
| 516 | IPC::RequestParser rp{ctx}; | 516 | IPC::RequestParser rp{ctx}; |
| 517 | const auto manager_type{rp.PopEnum<StatusManagerType>()}; | 517 | const auto manager_type{rp.PopEnum<StatusManagerType>()}; |
| 518 | 518 | ||
diff --git a/src/core/hle/service/hid/hidbus.h b/src/core/hle/service/hid/hidbus.h index 85ed96e2e..c29b5e882 100644 --- a/src/core/hle/service/hid/hidbus.h +++ b/src/core/hle/service/hid/hidbus.h | |||
| @@ -94,19 +94,19 @@ private: | |||
| 94 | std::unique_ptr<HidbusBase> device{nullptr}; | 94 | std::unique_ptr<HidbusBase> device{nullptr}; |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | void GetBusHandle(Kernel::HLERequestContext& ctx); | 97 | void GetBusHandle(HLERequestContext& ctx); |
| 98 | void IsExternalDeviceConnected(Kernel::HLERequestContext& ctx); | 98 | void IsExternalDeviceConnected(HLERequestContext& ctx); |
| 99 | void Initialize(Kernel::HLERequestContext& ctx); | 99 | void Initialize(HLERequestContext& ctx); |
| 100 | void Finalize(Kernel::HLERequestContext& ctx); | 100 | void Finalize(HLERequestContext& ctx); |
| 101 | void EnableExternalDevice(Kernel::HLERequestContext& ctx); | 101 | void EnableExternalDevice(HLERequestContext& ctx); |
| 102 | void GetExternalDeviceId(Kernel::HLERequestContext& ctx); | 102 | void GetExternalDeviceId(HLERequestContext& ctx); |
| 103 | void SendCommandAsync(Kernel::HLERequestContext& ctx); | 103 | void SendCommandAsync(HLERequestContext& ctx); |
| 104 | void GetSendCommandAsynceResult(Kernel::HLERequestContext& ctx); | 104 | void GetSendCommandAsynceResult(HLERequestContext& ctx); |
| 105 | void SetEventForSendCommandAsycResult(Kernel::HLERequestContext& ctx); | 105 | void SetEventForSendCommandAsycResult(HLERequestContext& ctx); |
| 106 | void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx); | 106 | void GetSharedMemoryHandle(HLERequestContext& ctx); |
| 107 | void EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx); | 107 | void EnableJoyPollingReceiveMode(HLERequestContext& ctx); |
| 108 | void DisableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx); | 108 | void DisableJoyPollingReceiveMode(HLERequestContext& ctx); |
| 109 | void SetStatusManagerType(Kernel::HLERequestContext& ctx); | 109 | void SetStatusManagerType(HLERequestContext& ctx); |
| 110 | 110 | ||
| 111 | void UpdateHidbus(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); | 111 | void UpdateHidbus(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| 112 | std::optional<std::size_t> GetDeviceIndexFromHandle(BusHandle handle) const; | 112 | std::optional<std::size_t> GetDeviceIndexFromHandle(BusHandle handle) const; |
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp index a40f61fde..221c33b86 100644 --- a/src/core/hle/service/hid/irs.cpp +++ b/src/core/hle/service/hid/irs.cpp | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include "core/core_timing.h" | 8 | #include "core/core_timing.h" |
| 9 | #include "core/hid/emulated_controller.h" | 9 | #include "core/hid/emulated_controller.h" |
| 10 | #include "core/hid/hid_core.h" | 10 | #include "core/hid/hid_core.h" |
| 11 | #include "core/hle/ipc_helpers.h" | ||
| 12 | #include "core/hle/kernel/k_shared_memory.h" | 11 | #include "core/hle/kernel/k_shared_memory.h" |
| 13 | #include "core/hle/kernel/k_transfer_memory.h" | 12 | #include "core/hle/kernel/k_transfer_memory.h" |
| 14 | #include "core/hle/kernel/kernel.h" | 13 | #include "core/hle/kernel/kernel.h" |
| @@ -20,6 +19,7 @@ | |||
| 20 | #include "core/hle/service/hid/irsensor/moment_processor.h" | 19 | #include "core/hle/service/hid/irsensor/moment_processor.h" |
| 21 | #include "core/hle/service/hid/irsensor/pointing_processor.h" | 20 | #include "core/hle/service/hid/irsensor/pointing_processor.h" |
| 22 | #include "core/hle/service/hid/irsensor/tera_plugin_processor.h" | 21 | #include "core/hle/service/hid/irsensor/tera_plugin_processor.h" |
| 22 | #include "core/hle/service/ipc_helpers.h" | ||
| 23 | #include "core/memory.h" | 23 | #include "core/memory.h" |
| 24 | 24 | ||
| 25 | namespace Service::IRS { | 25 | namespace Service::IRS { |
| @@ -56,7 +56,7 @@ IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} { | |||
| 56 | } | 56 | } |
| 57 | IRS::~IRS() = default; | 57 | IRS::~IRS() = default; |
| 58 | 58 | ||
| 59 | void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) { | 59 | void IRS::ActivateIrsensor(HLERequestContext& ctx) { |
| 60 | IPC::RequestParser rp{ctx}; | 60 | IPC::RequestParser rp{ctx}; |
| 61 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 61 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 62 | 62 | ||
| @@ -67,7 +67,7 @@ void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) { | |||
| 67 | rb.Push(ResultSuccess); | 67 | rb.Push(ResultSuccess); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) { | 70 | void IRS::DeactivateIrsensor(HLERequestContext& ctx) { |
| 71 | IPC::RequestParser rp{ctx}; | 71 | IPC::RequestParser rp{ctx}; |
| 72 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 72 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 73 | 73 | ||
| @@ -78,7 +78,7 @@ void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) { | |||
| 78 | rb.Push(ResultSuccess); | 78 | rb.Push(ResultSuccess); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void IRS::GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx) { | 81 | void IRS::GetIrsensorSharedMemoryHandle(HLERequestContext& ctx) { |
| 82 | IPC::RequestParser rp{ctx}; | 82 | IPC::RequestParser rp{ctx}; |
| 83 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 83 | const auto applet_resource_user_id{rp.Pop<u64>()}; |
| 84 | 84 | ||
| @@ -89,7 +89,7 @@ void IRS::GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx) { | |||
| 89 | rb.PushCopyObjects(&system.Kernel().GetIrsSharedMem()); | 89 | rb.PushCopyObjects(&system.Kernel().GetIrsSharedMem()); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void IRS::StopImageProcessor(Kernel::HLERequestContext& ctx) { | 92 | void IRS::StopImageProcessor(HLERequestContext& ctx) { |
| 93 | IPC::RequestParser rp{ctx}; | 93 | IPC::RequestParser rp{ctx}; |
| 94 | struct Parameters { | 94 | struct Parameters { |
| 95 | Core::IrSensor::IrCameraHandle camera_handle; | 95 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -117,7 +117,7 @@ void IRS::StopImageProcessor(Kernel::HLERequestContext& ctx) { | |||
| 117 | rb.Push(result); | 117 | rb.Push(result); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) { | 120 | void IRS::RunMomentProcessor(HLERequestContext& ctx) { |
| 121 | IPC::RequestParser rp{ctx}; | 121 | IPC::RequestParser rp{ctx}; |
| 122 | struct Parameters { | 122 | struct Parameters { |
| 123 | Core::IrSensor::IrCameraHandle camera_handle; | 123 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -149,7 +149,7 @@ void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) { | |||
| 149 | rb.Push(result); | 149 | rb.Push(result); |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) { | 152 | void IRS::RunClusteringProcessor(HLERequestContext& ctx) { |
| 153 | IPC::RequestParser rp{ctx}; | 153 | IPC::RequestParser rp{ctx}; |
| 154 | struct Parameters { | 154 | struct Parameters { |
| 155 | Core::IrSensor::IrCameraHandle camera_handle; | 155 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -182,7 +182,7 @@ void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) { | |||
| 182 | rb.Push(result); | 182 | rb.Push(result); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) { | 185 | void IRS::RunImageTransferProcessor(HLERequestContext& ctx) { |
| 186 | IPC::RequestParser rp{ctx}; | 186 | IPC::RequestParser rp{ctx}; |
| 187 | struct Parameters { | 187 | struct Parameters { |
| 188 | Core::IrSensor::IrCameraHandle camera_handle; | 188 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -231,7 +231,7 @@ void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) { | |||
| 231 | rb.Push(result); | 231 | rb.Push(result); |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) { | 234 | void IRS::GetImageTransferProcessorState(HLERequestContext& ctx) { |
| 235 | IPC::RequestParser rp{ctx}; | 235 | IPC::RequestParser rp{ctx}; |
| 236 | struct Parameters { | 236 | struct Parameters { |
| 237 | Core::IrSensor::IrCameraHandle camera_handle; | 237 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -272,7 +272,7 @@ void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) { | |||
| 272 | rb.PushRaw(state); | 272 | rb.PushRaw(state); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) { | 275 | void IRS::RunTeraPluginProcessor(HLERequestContext& ctx) { |
| 276 | IPC::RequestParser rp{ctx}; | 276 | IPC::RequestParser rp{ctx}; |
| 277 | struct Parameters { | 277 | struct Parameters { |
| 278 | Core::IrSensor::IrCameraHandle camera_handle; | 278 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -308,7 +308,7 @@ void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) { | |||
| 308 | rb.Push(result); | 308 | rb.Push(result); |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) { | 311 | void IRS::GetNpadIrCameraHandle(HLERequestContext& ctx) { |
| 312 | IPC::RequestParser rp{ctx}; | 312 | IPC::RequestParser rp{ctx}; |
| 313 | const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()}; | 313 | const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()}; |
| 314 | 314 | ||
| @@ -332,7 +332,7 @@ void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) { | |||
| 332 | rb.PushRaw(camera_handle); | 332 | rb.PushRaw(camera_handle); |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | void IRS::RunPointingProcessor(Kernel::HLERequestContext& ctx) { | 335 | void IRS::RunPointingProcessor(HLERequestContext& ctx) { |
| 336 | IPC::RequestParser rp{ctx}; | 336 | IPC::RequestParser rp{ctx}; |
| 337 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; | 337 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; |
| 338 | const auto processor_config{rp.PopRaw<Core::IrSensor::PackedPointingProcessorConfig>()}; | 338 | const auto processor_config{rp.PopRaw<Core::IrSensor::PackedPointingProcessorConfig>()}; |
| @@ -359,7 +359,7 @@ void IRS::RunPointingProcessor(Kernel::HLERequestContext& ctx) { | |||
| 359 | rb.Push(result); | 359 | rb.Push(result); |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | void IRS::SuspendImageProcessor(Kernel::HLERequestContext& ctx) { | 362 | void IRS::SuspendImageProcessor(HLERequestContext& ctx) { |
| 363 | IPC::RequestParser rp{ctx}; | 363 | IPC::RequestParser rp{ctx}; |
| 364 | struct Parameters { | 364 | struct Parameters { |
| 365 | Core::IrSensor::IrCameraHandle camera_handle; | 365 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -385,7 +385,7 @@ void IRS::SuspendImageProcessor(Kernel::HLERequestContext& ctx) { | |||
| 385 | rb.Push(result); | 385 | rb.Push(result); |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | void IRS::CheckFirmwareVersion(Kernel::HLERequestContext& ctx) { | 388 | void IRS::CheckFirmwareVersion(HLERequestContext& ctx) { |
| 389 | IPC::RequestParser rp{ctx}; | 389 | IPC::RequestParser rp{ctx}; |
| 390 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; | 390 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; |
| 391 | const auto mcu_version{rp.PopRaw<Core::IrSensor::PackedMcuVersion>()}; | 391 | const auto mcu_version{rp.PopRaw<Core::IrSensor::PackedMcuVersion>()}; |
| @@ -407,7 +407,7 @@ void IRS::CheckFirmwareVersion(Kernel::HLERequestContext& ctx) { | |||
| 407 | rb.Push(result); | 407 | rb.Push(result); |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | void IRS::SetFunctionLevel(Kernel::HLERequestContext& ctx) { | 410 | void IRS::SetFunctionLevel(HLERequestContext& ctx) { |
| 411 | IPC::RequestParser rp{ctx}; | 411 | IPC::RequestParser rp{ctx}; |
| 412 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; | 412 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; |
| 413 | const auto function_level{rp.PopRaw<Core::IrSensor::PackedFunctionLevel>()}; | 413 | const auto function_level{rp.PopRaw<Core::IrSensor::PackedFunctionLevel>()}; |
| @@ -429,7 +429,7 @@ void IRS::SetFunctionLevel(Kernel::HLERequestContext& ctx) { | |||
| 429 | rb.Push(result); | 429 | rb.Push(result); |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) { | 432 | void IRS::RunImageTransferExProcessor(HLERequestContext& ctx) { |
| 433 | IPC::RequestParser rp{ctx}; | 433 | IPC::RequestParser rp{ctx}; |
| 434 | struct Parameters { | 434 | struct Parameters { |
| 435 | Core::IrSensor::IrCameraHandle camera_handle; | 435 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -469,7 +469,7 @@ void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) { | |||
| 469 | rb.Push(result); | 469 | rb.Push(result); |
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) { | 472 | void IRS::RunIrLedProcessor(HLERequestContext& ctx) { |
| 473 | IPC::RequestParser rp{ctx}; | 473 | IPC::RequestParser rp{ctx}; |
| 474 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; | 474 | const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()}; |
| 475 | const auto processor_config{rp.PopRaw<Core::IrSensor::PackedIrLedProcessorConfig>()}; | 475 | const auto processor_config{rp.PopRaw<Core::IrSensor::PackedIrLedProcessorConfig>()}; |
| @@ -497,7 +497,7 @@ void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) { | |||
| 497 | rb.Push(result); | 497 | rb.Push(result); |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) { | 500 | void IRS::StopImageProcessorAsync(HLERequestContext& ctx) { |
| 501 | IPC::RequestParser rp{ctx}; | 501 | IPC::RequestParser rp{ctx}; |
| 502 | struct Parameters { | 502 | struct Parameters { |
| 503 | Core::IrSensor::IrCameraHandle camera_handle; | 503 | Core::IrSensor::IrCameraHandle camera_handle; |
| @@ -525,7 +525,7 @@ void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) { | |||
| 525 | rb.Push(result); | 525 | rb.Push(result); |
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | void IRS::ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx) { | 528 | void IRS::ActivateIrsensorWithFunctionLevel(HLERequestContext& ctx) { |
| 529 | IPC::RequestParser rp{ctx}; | 529 | IPC::RequestParser rp{ctx}; |
| 530 | struct Parameters { | 530 | struct Parameters { |
| 531 | Core::IrSensor::PackedFunctionLevel function_level; | 531 | Core::IrSensor::PackedFunctionLevel function_level; |
diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h index b76ad7854..a8fa19025 100644 --- a/src/core/hle/service/hid/irs.h +++ b/src/core/hle/service/hid/irs.h | |||
| @@ -38,24 +38,24 @@ private: | |||
| 38 | }; | 38 | }; |
| 39 | static_assert(sizeof(StatusManager) == 0x8000, "StatusManager is an invalid size"); | 39 | static_assert(sizeof(StatusManager) == 0x8000, "StatusManager is an invalid size"); |
| 40 | 40 | ||
| 41 | void ActivateIrsensor(Kernel::HLERequestContext& ctx); | 41 | void ActivateIrsensor(HLERequestContext& ctx); |
| 42 | void DeactivateIrsensor(Kernel::HLERequestContext& ctx); | 42 | void DeactivateIrsensor(HLERequestContext& ctx); |
| 43 | void GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx); | 43 | void GetIrsensorSharedMemoryHandle(HLERequestContext& ctx); |
| 44 | void StopImageProcessor(Kernel::HLERequestContext& ctx); | 44 | void StopImageProcessor(HLERequestContext& ctx); |
| 45 | void RunMomentProcessor(Kernel::HLERequestContext& ctx); | 45 | void RunMomentProcessor(HLERequestContext& ctx); |
| 46 | void RunClusteringProcessor(Kernel::HLERequestContext& ctx); | 46 | void RunClusteringProcessor(HLERequestContext& ctx); |
| 47 | void RunImageTransferProcessor(Kernel::HLERequestContext& ctx); | 47 | void RunImageTransferProcessor(HLERequestContext& ctx); |
| 48 | void GetImageTransferProcessorState(Kernel::HLERequestContext& ctx); | 48 | void GetImageTransferProcessorState(HLERequestContext& ctx); |
| 49 | void RunTeraPluginProcessor(Kernel::HLERequestContext& ctx); | 49 | void RunTeraPluginProcessor(HLERequestContext& ctx); |
| 50 | void GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx); | 50 | void GetNpadIrCameraHandle(HLERequestContext& ctx); |
| 51 | void RunPointingProcessor(Kernel::HLERequestContext& ctx); | 51 | void RunPointingProcessor(HLERequestContext& ctx); |
| 52 | void SuspendImageProcessor(Kernel::HLERequestContext& ctx); | 52 | void SuspendImageProcessor(HLERequestContext& ctx); |
| 53 | void CheckFirmwareVersion(Kernel::HLERequestContext& ctx); | 53 | void CheckFirmwareVersion(HLERequestContext& ctx); |
| 54 | void SetFunctionLevel(Kernel::HLERequestContext& ctx); | 54 | void SetFunctionLevel(HLERequestContext& ctx); |
| 55 | void RunImageTransferExProcessor(Kernel::HLERequestContext& ctx); | 55 | void RunImageTransferExProcessor(HLERequestContext& ctx); |
| 56 | void RunIrLedProcessor(Kernel::HLERequestContext& ctx); | 56 | void RunIrLedProcessor(HLERequestContext& ctx); |
| 57 | void StopImageProcessorAsync(Kernel::HLERequestContext& ctx); | 57 | void StopImageProcessorAsync(HLERequestContext& ctx); |
| 58 | void ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx); | 58 | void ActivateIrsensorWithFunctionLevel(HLERequestContext& ctx); |
| 59 | 59 | ||
| 60 | Result IsIrCameraHandleValid(const Core::IrSensor::IrCameraHandle& camera_handle) const; | 60 | Result IsIrCameraHandleValid(const Core::IrSensor::IrCameraHandle& camera_handle) const; |
| 61 | Core::IrSensor::DeviceFormat& GetIrCameraSharedMemoryDeviceEntry( | 61 | Core::IrSensor::DeviceFormat& GetIrCameraSharedMemoryDeviceEntry( |
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/service/hle_ipc.cpp index 876fbbe53..c221ffe11 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/service/hle_ipc.cpp | |||
| @@ -12,8 +12,6 @@ | |||
| 12 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/scratch_buffer.h" | 14 | #include "common/scratch_buffer.h" |
| 15 | #include "core/hle/ipc_helpers.h" | ||
| 16 | #include "core/hle/kernel/hle_ipc.h" | ||
| 17 | #include "core/hle/kernel/k_auto_object.h" | 15 | #include "core/hle/kernel/k_auto_object.h" |
| 18 | #include "core/hle/kernel/k_handle_table.h" | 16 | #include "core/hle/kernel/k_handle_table.h" |
| 19 | #include "core/hle/kernel/k_process.h" | 17 | #include "core/hle/kernel/k_process.h" |
| @@ -21,17 +19,19 @@ | |||
| 21 | #include "core/hle/kernel/k_server_session.h" | 19 | #include "core/hle/kernel/k_server_session.h" |
| 22 | #include "core/hle/kernel/k_thread.h" | 20 | #include "core/hle/kernel/k_thread.h" |
| 23 | #include "core/hle/kernel/kernel.h" | 21 | #include "core/hle/kernel/kernel.h" |
| 22 | #include "core/hle/service/hle_ipc.h" | ||
| 23 | #include "core/hle/service/ipc_helpers.h" | ||
| 24 | #include "core/memory.h" | 24 | #include "core/memory.h" |
| 25 | 25 | ||
| 26 | namespace Kernel { | 26 | namespace Service { |
| 27 | 27 | ||
| 28 | SessionRequestHandler::SessionRequestHandler(KernelCore& kernel_, const char* service_name_) | 28 | SessionRequestHandler::SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_) |
| 29 | : kernel{kernel_} {} | 29 | : kernel{kernel_} {} |
| 30 | 30 | ||
| 31 | SessionRequestHandler::~SessionRequestHandler() = default; | 31 | SessionRequestHandler::~SessionRequestHandler() = default; |
| 32 | 32 | ||
| 33 | SessionRequestManager::SessionRequestManager(KernelCore& kernel_, | 33 | SessionRequestManager::SessionRequestManager(Kernel::KernelCore& kernel_, |
| 34 | Service::ServerManager& server_manager_) | 34 | ServerManager& server_manager_) |
| 35 | : kernel{kernel_}, server_manager{server_manager_} {} | 35 | : kernel{kernel_}, server_manager{server_manager_} {} |
| 36 | 36 | ||
| 37 | SessionRequestManager::~SessionRequestManager() = default; | 37 | SessionRequestManager::~SessionRequestManager() = default; |
| @@ -51,7 +51,7 @@ bool SessionRequestManager::HasSessionRequestHandler(const HLERequestContext& co | |||
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | Result SessionRequestManager::CompleteSyncRequest(KServerSession* server_session, | 54 | Result SessionRequestManager::CompleteSyncRequest(Kernel::KServerSession* server_session, |
| 55 | HLERequestContext& context) { | 55 | HLERequestContext& context) { |
| 56 | Result result = ResultSuccess; | 56 | Result result = ResultSuccess; |
| 57 | 57 | ||
| @@ -79,7 +79,7 @@ Result SessionRequestManager::CompleteSyncRequest(KServerSession* server_session | |||
| 79 | return result; | 79 | return result; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | Result SessionRequestManager::HandleDomainSyncRequest(KServerSession* server_session, | 82 | Result SessionRequestManager::HandleDomainSyncRequest(Kernel::KServerSession* server_session, |
| 83 | HLERequestContext& context) { | 83 | HLERequestContext& context) { |
| 84 | if (!context.HasDomainMessageHeader()) { | 84 | if (!context.HasDomainMessageHeader()) { |
| 85 | return ResultSuccess; | 85 | return ResultSuccess; |
| @@ -124,16 +124,17 @@ Result SessionRequestManager::HandleDomainSyncRequest(KServerSession* server_ses | |||
| 124 | return ResultSuccess; | 124 | return ResultSuccess; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | HLERequestContext::HLERequestContext(KernelCore& kernel_, Core::Memory::Memory& memory_, | 127 | HLERequestContext::HLERequestContext(Kernel::KernelCore& kernel_, Core::Memory::Memory& memory_, |
| 128 | KServerSession* server_session_, KThread* thread_) | 128 | Kernel::KServerSession* server_session_, |
| 129 | Kernel::KThread* thread_) | ||
| 129 | : server_session(server_session_), thread(thread_), kernel{kernel_}, memory{memory_} { | 130 | : server_session(server_session_), thread(thread_), kernel{kernel_}, memory{memory_} { |
| 130 | cmd_buf[0] = 0; | 131 | cmd_buf[0] = 0; |
| 131 | } | 132 | } |
| 132 | 133 | ||
| 133 | HLERequestContext::~HLERequestContext() = default; | 134 | HLERequestContext::~HLERequestContext() = default; |
| 134 | 135 | ||
| 135 | void HLERequestContext::ParseCommandBuffer(const KHandleTable& handle_table, u32_le* src_cmdbuf, | 136 | void HLERequestContext::ParseCommandBuffer(const Kernel::KHandleTable& handle_table, |
| 136 | bool incoming) { | 137 | u32_le* src_cmdbuf, bool incoming) { |
| 137 | IPC::RequestParser rp(src_cmdbuf); | 138 | IPC::RequestParser rp(src_cmdbuf); |
| 138 | command_header = rp.PopRaw<IPC::CommandHeader>(); | 139 | command_header = rp.PopRaw<IPC::CommandHeader>(); |
| 139 | 140 | ||
| @@ -253,8 +254,8 @@ void HLERequestContext::ParseCommandBuffer(const KHandleTable& handle_table, u32 | |||
| 253 | rp.Skip(1, false); // The command is actually an u64, but we don't use the high part. | 254 | rp.Skip(1, false); // The command is actually an u64, but we don't use the high part. |
| 254 | } | 255 | } |
| 255 | 256 | ||
| 256 | Result HLERequestContext::PopulateFromIncomingCommandBuffer(const KHandleTable& handle_table, | 257 | Result HLERequestContext::PopulateFromIncomingCommandBuffer( |
| 257 | u32_le* src_cmdbuf) { | 258 | const Kernel::KHandleTable& handle_table, u32_le* src_cmdbuf) { |
| 258 | ParseCommandBuffer(handle_table, src_cmdbuf, true); | 259 | ParseCommandBuffer(handle_table, src_cmdbuf, true); |
| 259 | 260 | ||
| 260 | if (command_header->IsCloseCommand()) { | 261 | if (command_header->IsCloseCommand()) { |
| @@ -267,7 +268,7 @@ Result HLERequestContext::PopulateFromIncomingCommandBuffer(const KHandleTable& | |||
| 267 | return ResultSuccess; | 268 | return ResultSuccess; |
| 268 | } | 269 | } |
| 269 | 270 | ||
| 270 | Result HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_thread) { | 271 | Result HLERequestContext::WriteToOutgoingCommandBuffer(Kernel::KThread& requesting_thread) { |
| 271 | auto current_offset = handles_offset; | 272 | auto current_offset = handles_offset; |
| 272 | auto& owner_process = *requesting_thread.GetOwnerProcess(); | 273 | auto& owner_process = *requesting_thread.GetOwnerProcess(); |
| 273 | auto& handle_table = owner_process.GetHandleTable(); | 274 | auto& handle_table = owner_process.GetHandleTable(); |
| @@ -528,4 +529,4 @@ std::string HLERequestContext::Description() const { | |||
| 528 | return s.str(); | 529 | return s.str(); |
| 529 | } | 530 | } |
| 530 | 531 | ||
| 531 | } // namespace Kernel | 532 | } // namespace Service |
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/service/hle_ipc.h index b4364f984..4bd24c899 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/service/hle_ipc.h | |||
| @@ -35,20 +35,18 @@ class ServerManager; | |||
| 35 | } // namespace Service | 35 | } // namespace Service |
| 36 | 36 | ||
| 37 | namespace Kernel { | 37 | namespace Kernel { |
| 38 | |||
| 39 | class Domain; | ||
| 40 | class HLERequestContext; | ||
| 41 | class KAutoObject; | 38 | class KAutoObject; |
| 42 | class KernelCore; | 39 | class KernelCore; |
| 43 | class KEvent; | ||
| 44 | class KHandleTable; | 40 | class KHandleTable; |
| 45 | class KServerPort; | ||
| 46 | class KProcess; | ||
| 47 | class KServerSession; | 41 | class KServerSession; |
| 48 | class KThread; | 42 | class KThread; |
| 49 | class KReadableEvent; | 43 | } // namespace Kernel |
| 50 | class KSession; | 44 | |
| 51 | class SessionRequestManager; | 45 | namespace Service { |
| 46 | |||
| 47 | using Handle = Kernel::Handle; | ||
| 48 | |||
| 49 | class HLERequestContext; | ||
| 52 | 50 | ||
| 53 | /** | 51 | /** |
| 54 | * Interface implemented by HLE Session handlers. | 52 | * Interface implemented by HLE Session handlers. |
| @@ -57,7 +55,7 @@ class SessionRequestManager; | |||
| 57 | */ | 55 | */ |
| 58 | class SessionRequestHandler : public std::enable_shared_from_this<SessionRequestHandler> { | 56 | class SessionRequestHandler : public std::enable_shared_from_this<SessionRequestHandler> { |
| 59 | public: | 57 | public: |
| 60 | SessionRequestHandler(KernelCore& kernel_, const char* service_name_); | 58 | SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_); |
| 61 | virtual ~SessionRequestHandler(); | 59 | virtual ~SessionRequestHandler(); |
| 62 | 60 | ||
| 63 | /** | 61 | /** |
| @@ -69,10 +67,10 @@ public: | |||
| 69 | * @returns Result the result code of the translate operation. | 67 | * @returns Result the result code of the translate operation. |
| 70 | */ | 68 | */ |
| 71 | virtual Result HandleSyncRequest(Kernel::KServerSession& session, | 69 | virtual Result HandleSyncRequest(Kernel::KServerSession& session, |
| 72 | Kernel::HLERequestContext& context) = 0; | 70 | HLERequestContext& context) = 0; |
| 73 | 71 | ||
| 74 | protected: | 72 | protected: |
| 75 | KernelCore& kernel; | 73 | Kernel::KernelCore& kernel; |
| 76 | }; | 74 | }; |
| 77 | 75 | ||
| 78 | using SessionRequestHandlerWeakPtr = std::weak_ptr<SessionRequestHandler>; | 76 | using SessionRequestHandlerWeakPtr = std::weak_ptr<SessionRequestHandler>; |
| @@ -85,7 +83,8 @@ using SessionRequestHandlerPtr = std::shared_ptr<SessionRequestHandler>; | |||
| 85 | */ | 83 | */ |
| 86 | class SessionRequestManager final { | 84 | class SessionRequestManager final { |
| 87 | public: | 85 | public: |
| 88 | explicit SessionRequestManager(KernelCore& kernel, Service::ServerManager& server_manager); | 86 | explicit SessionRequestManager(Kernel::KernelCore& kernel, |
| 87 | Service::ServerManager& server_manager); | ||
| 89 | ~SessionRequestManager(); | 88 | ~SessionRequestManager(); |
| 90 | 89 | ||
| 91 | bool IsDomain() const { | 90 | bool IsDomain() const { |
| @@ -140,8 +139,9 @@ public: | |||
| 140 | 139 | ||
| 141 | bool HasSessionRequestHandler(const HLERequestContext& context) const; | 140 | bool HasSessionRequestHandler(const HLERequestContext& context) const; |
| 142 | 141 | ||
| 143 | Result HandleDomainSyncRequest(KServerSession* server_session, HLERequestContext& context); | 142 | Result HandleDomainSyncRequest(Kernel::KServerSession* server_session, |
| 144 | Result CompleteSyncRequest(KServerSession* server_session, HLERequestContext& context); | 143 | HLERequestContext& context); |
| 144 | Result CompleteSyncRequest(Kernel::KServerSession* server_session, HLERequestContext& context); | ||
| 145 | 145 | ||
| 146 | Service::ServerManager& GetServerManager() { | 146 | Service::ServerManager& GetServerManager() { |
| 147 | return server_manager; | 147 | return server_manager; |
| @@ -166,33 +166,18 @@ private: | |||
| 166 | std::vector<SessionRequestHandlerPtr> domain_handlers; | 166 | std::vector<SessionRequestHandlerPtr> domain_handlers; |
| 167 | 167 | ||
| 168 | private: | 168 | private: |
| 169 | KernelCore& kernel; | 169 | Kernel::KernelCore& kernel; |
| 170 | Service::ServerManager& server_manager; | 170 | Service::ServerManager& server_manager; |
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | /** | 173 | /** |
| 174 | * Class containing information about an in-flight IPC request being handled by an HLE service | 174 | * Class containing information about an in-flight IPC request being handled by an HLE service |
| 175 | * implementation. Services should avoid using old global APIs (e.g. Kernel::GetCommandBuffer()) and | 175 | * implementation. |
| 176 | * when possible use the APIs in this class to service the request. | ||
| 177 | * | ||
| 178 | * HLE handle protocol | ||
| 179 | * =================== | ||
| 180 | * | ||
| 181 | * To avoid needing HLE services to keep a separate handle table, or having to directly modify the | ||
| 182 | * requester's table, a tweaked protocol is used to receive and send handles in requests. The kernel | ||
| 183 | * will decode the incoming handles into object pointers and insert a id in the buffer where the | ||
| 184 | * handle would normally be. The service then calls GetIncomingHandle() with that id to get the | ||
| 185 | * pointer to the object. Similarly, instead of inserting a handle into the command buffer, the | ||
| 186 | * service calls AddOutgoingHandle() and stores the returned id where the handle would normally go. | ||
| 187 | * | ||
| 188 | * The end result is similar to just giving services their own real handle tables, but since these | ||
| 189 | * ids are local to a specific context, it avoids requiring services to manage handles for objects | ||
| 190 | * across multiple calls and ensuring that unneeded handles are cleaned up. | ||
| 191 | */ | 176 | */ |
| 192 | class HLERequestContext { | 177 | class HLERequestContext { |
| 193 | public: | 178 | public: |
| 194 | explicit HLERequestContext(KernelCore& kernel, Core::Memory::Memory& memory, | 179 | explicit HLERequestContext(Kernel::KernelCore& kernel, Core::Memory::Memory& memory, |
| 195 | KServerSession* session, KThread* thread); | 180 | Kernel::KServerSession* session, Kernel::KThread* thread); |
| 196 | ~HLERequestContext(); | 181 | ~HLERequestContext(); |
| 197 | 182 | ||
| 198 | /// Returns a pointer to the IPC command buffer for this request. | 183 | /// Returns a pointer to the IPC command buffer for this request. |
| @@ -209,10 +194,11 @@ public: | |||
| 209 | } | 194 | } |
| 210 | 195 | ||
| 211 | /// Populates this context with data from the requesting process/thread. | 196 | /// Populates this context with data from the requesting process/thread. |
| 212 | Result PopulateFromIncomingCommandBuffer(const KHandleTable& handle_table, u32_le* src_cmdbuf); | 197 | Result PopulateFromIncomingCommandBuffer(const Kernel::KHandleTable& handle_table, |
| 198 | u32_le* src_cmdbuf); | ||
| 213 | 199 | ||
| 214 | /// Writes data from this context back to the requesting process/thread. | 200 | /// Writes data from this context back to the requesting process/thread. |
| 215 | Result WriteToOutgoingCommandBuffer(KThread& requesting_thread); | 201 | Result WriteToOutgoingCommandBuffer(Kernel::KThread& requesting_thread); |
| 216 | 202 | ||
| 217 | [[nodiscard]] u32_le GetHipcCommand() const { | 203 | [[nodiscard]] u32_le GetHipcCommand() const { |
| 218 | return command; | 204 | return command; |
| @@ -339,11 +325,11 @@ public: | |||
| 339 | return incoming_move_handles.at(index); | 325 | return incoming_move_handles.at(index); |
| 340 | } | 326 | } |
| 341 | 327 | ||
| 342 | void AddMoveObject(KAutoObject* object) { | 328 | void AddMoveObject(Kernel::KAutoObject* object) { |
| 343 | outgoing_move_objects.emplace_back(object); | 329 | outgoing_move_objects.emplace_back(object); |
| 344 | } | 330 | } |
| 345 | 331 | ||
| 346 | void AddCopyObject(KAutoObject* object) { | 332 | void AddCopyObject(Kernel::KAutoObject* object) { |
| 347 | outgoing_copy_objects.emplace_back(object); | 333 | outgoing_copy_objects.emplace_back(object); |
| 348 | } | 334 | } |
| 349 | 335 | ||
| @@ -362,7 +348,7 @@ public: | |||
| 362 | 348 | ||
| 363 | [[nodiscard]] std::string Description() const; | 349 | [[nodiscard]] std::string Description() const; |
| 364 | 350 | ||
| 365 | [[nodiscard]] KThread& GetThread() { | 351 | [[nodiscard]] Kernel::KThread& GetThread() { |
| 366 | return *thread; | 352 | return *thread; |
| 367 | } | 353 | } |
| 368 | 354 | ||
| @@ -381,17 +367,18 @@ public: | |||
| 381 | private: | 367 | private: |
| 382 | friend class IPC::ResponseBuilder; | 368 | friend class IPC::ResponseBuilder; |
| 383 | 369 | ||
| 384 | void ParseCommandBuffer(const KHandleTable& handle_table, u32_le* src_cmdbuf, bool incoming); | 370 | void ParseCommandBuffer(const Kernel::KHandleTable& handle_table, u32_le* src_cmdbuf, |
| 371 | bool incoming); | ||
| 385 | 372 | ||
| 386 | std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; | 373 | std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; |
| 387 | Kernel::KServerSession* server_session{}; | 374 | Kernel::KServerSession* server_session{}; |
| 388 | KThread* thread; | 375 | Kernel::KThread* thread; |
| 389 | 376 | ||
| 390 | std::vector<Handle> incoming_move_handles; | 377 | std::vector<Handle> incoming_move_handles; |
| 391 | std::vector<Handle> incoming_copy_handles; | 378 | std::vector<Handle> incoming_copy_handles; |
| 392 | 379 | ||
| 393 | std::vector<KAutoObject*> outgoing_move_objects; | 380 | std::vector<Kernel::KAutoObject*> outgoing_move_objects; |
| 394 | std::vector<KAutoObject*> outgoing_copy_objects; | 381 | std::vector<Kernel::KAutoObject*> outgoing_copy_objects; |
| 395 | std::vector<SessionRequestHandlerPtr> outgoing_domain_objects; | 382 | std::vector<SessionRequestHandlerPtr> outgoing_domain_objects; |
| 396 | 383 | ||
| 397 | std::optional<IPC::CommandHeader> command_header; | 384 | std::optional<IPC::CommandHeader> command_header; |
| @@ -414,8 +401,8 @@ private: | |||
| 414 | std::weak_ptr<SessionRequestManager> manager{}; | 401 | std::weak_ptr<SessionRequestManager> manager{}; |
| 415 | bool is_deferred{false}; | 402 | bool is_deferred{false}; |
| 416 | 403 | ||
| 417 | KernelCore& kernel; | 404 | Kernel::KernelCore& kernel; |
| 418 | Core::Memory::Memory& memory; | 405 | Core::Memory::Memory& memory; |
| 419 | }; | 406 | }; |
| 420 | 407 | ||
| 421 | } // namespace Kernel | 408 | } // namespace Service |
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/service/ipc_helpers.h index f8ab55d83..3e67123c7 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/service/ipc_helpers.h | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | #include "common/assert.h" | 10 | #include "common/assert.h" |
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "core/hle/ipc.h" | 12 | #include "core/hle/ipc.h" |
| 13 | #include "core/hle/kernel/hle_ipc.h" | ||
| 14 | #include "core/hle/kernel/k_process.h" | 13 | #include "core/hle/kernel/k_process.h" |
| 15 | #include "core/hle/kernel/k_resource_limit.h" | 14 | #include "core/hle/kernel/k_resource_limit.h" |
| 16 | #include "core/hle/kernel/k_session.h" | 15 | #include "core/hle/kernel/k_session.h" |
| 17 | #include "core/hle/result.h" | 16 | #include "core/hle/result.h" |
| 17 | #include "core/hle/service/hle_ipc.h" | ||
| 18 | #include "core/hle/service/server_manager.h" | 18 | #include "core/hle/service/server_manager.h" |
| 19 | 19 | ||
| 20 | namespace IPC { | 20 | namespace IPC { |
| @@ -23,14 +23,14 @@ constexpr Result ERR_REMOTE_PROCESS_DEAD{ErrorModule::HIPC, 301}; | |||
| 23 | 23 | ||
| 24 | class RequestHelperBase { | 24 | class RequestHelperBase { |
| 25 | protected: | 25 | protected: |
| 26 | Kernel::HLERequestContext* context = nullptr; | 26 | Service::HLERequestContext* context = nullptr; |
| 27 | u32* cmdbuf; | 27 | u32* cmdbuf; |
| 28 | u32 index = 0; | 28 | u32 index = 0; |
| 29 | 29 | ||
| 30 | public: | 30 | public: |
| 31 | explicit RequestHelperBase(u32* command_buffer) : cmdbuf(command_buffer) {} | 31 | explicit RequestHelperBase(u32* command_buffer) : cmdbuf(command_buffer) {} |
| 32 | 32 | ||
| 33 | explicit RequestHelperBase(Kernel::HLERequestContext& ctx) | 33 | explicit RequestHelperBase(Service::HLERequestContext& ctx) |
| 34 | : context(&ctx), cmdbuf(ctx.CommandBuffer()) {} | 34 | : context(&ctx), cmdbuf(ctx.CommandBuffer()) {} |
| 35 | 35 | ||
| 36 | void Skip(u32 size_in_words, bool set_to_null) { | 36 | void Skip(u32 size_in_words, bool set_to_null) { |
| @@ -68,7 +68,7 @@ public: | |||
| 68 | AlwaysMoveHandles = 1, | 68 | AlwaysMoveHandles = 1, |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | explicit ResponseBuilder(Kernel::HLERequestContext& ctx, u32 normal_params_size_, | 71 | explicit ResponseBuilder(Service::HLERequestContext& ctx, u32 normal_params_size_, |
| 72 | u32 num_handles_to_copy_ = 0, u32 num_objects_to_move_ = 0, | 72 | u32 num_handles_to_copy_ = 0, u32 num_objects_to_move_ = 0, |
| 73 | Flags flags = Flags::None) | 73 | Flags flags = Flags::None) |
| 74 | : RequestHelperBase(ctx), normal_params_size(normal_params_size_), | 74 | : RequestHelperBase(ctx), normal_params_size(normal_params_size_), |
| @@ -157,7 +157,7 @@ public: | |||
| 157 | auto* session = Kernel::KSession::Create(kernel); | 157 | auto* session = Kernel::KSession::Create(kernel); |
| 158 | session->Initialize(nullptr, iface->GetServiceName()); | 158 | session->Initialize(nullptr, iface->GetServiceName()); |
| 159 | 159 | ||
| 160 | auto next_manager = std::make_shared<Kernel::SessionRequestManager>( | 160 | auto next_manager = std::make_shared<Service::SessionRequestManager>( |
| 161 | kernel, manager->GetServerManager()); | 161 | kernel, manager->GetServerManager()); |
| 162 | next_manager->SetSessionHandler(iface); | 162 | next_manager->SetSessionHandler(iface); |
| 163 | manager->GetServerManager().RegisterSession(&session->GetServerSession(), next_manager); | 163 | manager->GetServerManager().RegisterSession(&session->GetServerSession(), next_manager); |
| @@ -347,7 +347,7 @@ class RequestParser : public RequestHelperBase { | |||
| 347 | public: | 347 | public: |
| 348 | explicit RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {} | 348 | explicit RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {} |
| 349 | 349 | ||
| 350 | explicit RequestParser(Kernel::HLERequestContext& ctx) : RequestHelperBase(ctx) { | 350 | explicit RequestParser(Service::HLERequestContext& ctx) : RequestHelperBase(ctx) { |
| 351 | // TIPC does not have data payload offset | 351 | // TIPC does not have data payload offset |
| 352 | if (!ctx.IsTipc()) { | 352 | if (!ctx.IsTipc()) { |
| 353 | ASSERT_MSG(ctx.GetDataPayloadOffset(), "context is incomplete"); | 353 | ASSERT_MSG(ctx.GetDataPayloadOffset(), "context is incomplete"); |
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp index 005c212dc..46bcfd695 100644 --- a/src/core/hle/service/jit/jit.cpp +++ b/src/core/hle/service/jit/jit.cpp | |||
| @@ -3,10 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | #include "core/arm/symbols.h" | 4 | #include "core/arm/symbols.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/kernel/k_code_memory.h" | 6 | #include "core/hle/kernel/k_code_memory.h" |
| 8 | #include "core/hle/kernel/k_transfer_memory.h" | 7 | #include "core/hle/kernel/k_transfer_memory.h" |
| 9 | #include "core/hle/result.h" | 8 | #include "core/hle/result.h" |
| 9 | #include "core/hle/service/ipc_helpers.h" | ||
| 10 | #include "core/hle/service/jit/jit.h" | 10 | #include "core/hle/service/jit/jit.h" |
| 11 | #include "core/hle/service/jit/jit_context.h" | 11 | #include "core/hle/service/jit/jit_context.h" |
| 12 | #include "core/hle/service/server_manager.h" | 12 | #include "core/hle/service/server_manager.h" |
| @@ -44,7 +44,7 @@ public: | |||
| 44 | configuration.sys_rx_memory = user_rx; | 44 | configuration.sys_rx_memory = user_rx; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void GenerateCode(Kernel::HLERequestContext& ctx) { | 47 | void GenerateCode(HLERequestContext& ctx) { |
| 48 | LOG_DEBUG(Service_JIT, "called"); | 48 | LOG_DEBUG(Service_JIT, "called"); |
| 49 | 49 | ||
| 50 | struct InputParameters { | 50 | struct InputParameters { |
| @@ -126,7 +126,7 @@ public: | |||
| 126 | } | 126 | } |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | void Control(Kernel::HLERequestContext& ctx) { | 129 | void Control(HLERequestContext& ctx) { |
| 130 | LOG_DEBUG(Service_JIT, "called"); | 130 | LOG_DEBUG(Service_JIT, "called"); |
| 131 | 131 | ||
| 132 | IPC::RequestParser rp{ctx}; | 132 | IPC::RequestParser rp{ctx}; |
| @@ -171,7 +171,7 @@ public: | |||
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | void LoadPlugin(Kernel::HLERequestContext& ctx) { | 174 | void LoadPlugin(HLERequestContext& ctx) { |
| 175 | LOG_DEBUG(Service_JIT, "called"); | 175 | LOG_DEBUG(Service_JIT, "called"); |
| 176 | 176 | ||
| 177 | IPC::RequestParser rp{ctx}; | 177 | IPC::RequestParser rp{ctx}; |
| @@ -277,7 +277,7 @@ public: | |||
| 277 | rb.Push(ResultSuccess); | 277 | rb.Push(ResultSuccess); |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | void GetCodeAddress(Kernel::HLERequestContext& ctx) { | 280 | void GetCodeAddress(HLERequestContext& ctx) { |
| 281 | LOG_DEBUG(Service_JIT, "called"); | 281 | LOG_DEBUG(Service_JIT, "called"); |
| 282 | 282 | ||
| 283 | IPC::ResponseBuilder rb{ctx, 6}; | 283 | IPC::ResponseBuilder rb{ctx, 6}; |
| @@ -333,7 +333,7 @@ public: | |||
| 333 | RegisterHandlers(functions); | 333 | RegisterHandlers(functions); |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | void CreateJitEnvironment(Kernel::HLERequestContext& ctx) { | 336 | void CreateJitEnvironment(HLERequestContext& ctx) { |
| 337 | LOG_DEBUG(Service_JIT, "called"); | 337 | LOG_DEBUG(Service_JIT, "called"); |
| 338 | 338 | ||
| 339 | struct Parameters { | 339 | struct Parameters { |
diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp index 3f3c68d80..98a79365d 100644 --- a/src/core/hle/service/lbl/lbl.cpp +++ b/src/core/hle/service/lbl/lbl.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "core/hle/ipc_helpers.h" | 8 | #include "core/hle/service/ipc_helpers.h" |
| 9 | #include "core/hle/service/lbl/lbl.h" | 9 | #include "core/hle/service/lbl/lbl.h" |
| 10 | #include "core/hle/service/server_manager.h" | 10 | #include "core/hle/service/server_manager.h" |
| 11 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| @@ -60,7 +60,7 @@ private: | |||
| 60 | On = 1, | 60 | On = 1, |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | void SetCurrentBrightnessSetting(Kernel::HLERequestContext& ctx) { | 63 | void SetCurrentBrightnessSetting(HLERequestContext& ctx) { |
| 64 | IPC::RequestParser rp{ctx}; | 64 | IPC::RequestParser rp{ctx}; |
| 65 | auto brightness = rp.Pop<float>(); | 65 | auto brightness = rp.Pop<float>(); |
| 66 | 66 | ||
| @@ -78,7 +78,7 @@ private: | |||
| 78 | rb.Push(ResultSuccess); | 78 | rb.Push(ResultSuccess); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void GetCurrentBrightnessSetting(Kernel::HLERequestContext& ctx) { | 81 | void GetCurrentBrightnessSetting(HLERequestContext& ctx) { |
| 82 | auto brightness = current_brightness; | 82 | auto brightness = current_brightness; |
| 83 | if (!std::isfinite(brightness)) { | 83 | if (!std::isfinite(brightness)) { |
| 84 | LOG_ERROR(Service_LBL, "Brightness is infinite!"); | 84 | LOG_ERROR(Service_LBL, "Brightness is infinite!"); |
| @@ -92,7 +92,7 @@ private: | |||
| 92 | rb.Push(brightness); | 92 | rb.Push(brightness); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void SwitchBacklightOn(Kernel::HLERequestContext& ctx) { | 95 | void SwitchBacklightOn(HLERequestContext& ctx) { |
| 96 | IPC::RequestParser rp{ctx}; | 96 | IPC::RequestParser rp{ctx}; |
| 97 | const auto fade_time = rp.Pop<u64_le>(); | 97 | const auto fade_time = rp.Pop<u64_le>(); |
| 98 | LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time); | 98 | LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time); |
| @@ -103,7 +103,7 @@ private: | |||
| 103 | rb.Push(ResultSuccess); | 103 | rb.Push(ResultSuccess); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | void SwitchBacklightOff(Kernel::HLERequestContext& ctx) { | 106 | void SwitchBacklightOff(HLERequestContext& ctx) { |
| 107 | IPC::RequestParser rp{ctx}; | 107 | IPC::RequestParser rp{ctx}; |
| 108 | const auto fade_time = rp.Pop<u64_le>(); | 108 | const auto fade_time = rp.Pop<u64_le>(); |
| 109 | LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time); | 109 | LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time); |
| @@ -114,7 +114,7 @@ private: | |||
| 114 | rb.Push(ResultSuccess); | 114 | rb.Push(ResultSuccess); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | void GetBacklightSwitchStatus(Kernel::HLERequestContext& ctx) { | 117 | void GetBacklightSwitchStatus(HLERequestContext& ctx) { |
| 118 | LOG_DEBUG(Service_LBL, "called"); | 118 | LOG_DEBUG(Service_LBL, "called"); |
| 119 | 119 | ||
| 120 | IPC::ResponseBuilder rb{ctx, 3}; | 120 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -123,7 +123,7 @@ private: | |||
| 123 | : BacklightSwitchStatus::Off); | 123 | : BacklightSwitchStatus::Off); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | void EnableDimming(Kernel::HLERequestContext& ctx) { | 126 | void EnableDimming(HLERequestContext& ctx) { |
| 127 | LOG_DEBUG(Service_LBL, "called"); | 127 | LOG_DEBUG(Service_LBL, "called"); |
| 128 | 128 | ||
| 129 | dimming = true; | 129 | dimming = true; |
| @@ -132,7 +132,7 @@ private: | |||
| 132 | rb.Push(ResultSuccess); | 132 | rb.Push(ResultSuccess); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | void DisableDimming(Kernel::HLERequestContext& ctx) { | 135 | void DisableDimming(HLERequestContext& ctx) { |
| 136 | LOG_DEBUG(Service_LBL, "called"); | 136 | LOG_DEBUG(Service_LBL, "called"); |
| 137 | 137 | ||
| 138 | dimming = false; | 138 | dimming = false; |
| @@ -141,7 +141,7 @@ private: | |||
| 141 | rb.Push(ResultSuccess); | 141 | rb.Push(ResultSuccess); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | void IsDimmingEnabled(Kernel::HLERequestContext& ctx) { | 144 | void IsDimmingEnabled(HLERequestContext& ctx) { |
| 145 | LOG_DEBUG(Service_LBL, "called"); | 145 | LOG_DEBUG(Service_LBL, "called"); |
| 146 | 146 | ||
| 147 | IPC::ResponseBuilder rb{ctx, 3}; | 147 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -149,7 +149,7 @@ private: | |||
| 149 | rb.Push(dimming); | 149 | rb.Push(dimming); |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | void EnableAutoBrightnessControl(Kernel::HLERequestContext& ctx) { | 152 | void EnableAutoBrightnessControl(HLERequestContext& ctx) { |
| 153 | LOG_DEBUG(Service_LBL, "called"); | 153 | LOG_DEBUG(Service_LBL, "called"); |
| 154 | auto_brightness = true; | 154 | auto_brightness = true; |
| 155 | update_instantly = true; | 155 | update_instantly = true; |
| @@ -158,7 +158,7 @@ private: | |||
| 158 | rb.Push(ResultSuccess); | 158 | rb.Push(ResultSuccess); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | void DisableAutoBrightnessControl(Kernel::HLERequestContext& ctx) { | 161 | void DisableAutoBrightnessControl(HLERequestContext& ctx) { |
| 162 | LOG_DEBUG(Service_LBL, "called"); | 162 | LOG_DEBUG(Service_LBL, "called"); |
| 163 | auto_brightness = false; | 163 | auto_brightness = false; |
| 164 | 164 | ||
| @@ -166,7 +166,7 @@ private: | |||
| 166 | rb.Push(ResultSuccess); | 166 | rb.Push(ResultSuccess); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | void IsAutoBrightnessControlEnabled(Kernel::HLERequestContext& ctx) { | 169 | void IsAutoBrightnessControlEnabled(HLERequestContext& ctx) { |
| 170 | LOG_DEBUG(Service_LBL, "called"); | 170 | LOG_DEBUG(Service_LBL, "called"); |
| 171 | 171 | ||
| 172 | IPC::ResponseBuilder rb{ctx, 3}; | 172 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -174,7 +174,7 @@ private: | |||
| 174 | rb.Push(auto_brightness); | 174 | rb.Push(auto_brightness); |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | void SetAmbientLightSensorValue(Kernel::HLERequestContext& ctx) { | 177 | void SetAmbientLightSensorValue(HLERequestContext& ctx) { |
| 178 | IPC::RequestParser rp{ctx}; | 178 | IPC::RequestParser rp{ctx}; |
| 179 | const auto light_value = rp.Pop<float>(); | 179 | const auto light_value = rp.Pop<float>(); |
| 180 | 180 | ||
| @@ -186,7 +186,7 @@ private: | |||
| 186 | rb.Push(ResultSuccess); | 186 | rb.Push(ResultSuccess); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void GetAmbientLightSensorValue(Kernel::HLERequestContext& ctx) { | 189 | void GetAmbientLightSensorValue(HLERequestContext& ctx) { |
| 190 | LOG_DEBUG(Service_LBL, "called"); | 190 | LOG_DEBUG(Service_LBL, "called"); |
| 191 | 191 | ||
| 192 | IPC::ResponseBuilder rb{ctx, 3}; | 192 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -194,7 +194,7 @@ private: | |||
| 194 | rb.Push(ambient_light_value); | 194 | rb.Push(ambient_light_value); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | void SetBrightnessReflectionDelayLevel(Kernel::HLERequestContext& ctx) { | 197 | void SetBrightnessReflectionDelayLevel(HLERequestContext& ctx) { |
| 198 | // This is Intentional, this function does absolutely nothing | 198 | // This is Intentional, this function does absolutely nothing |
| 199 | LOG_DEBUG(Service_LBL, "called"); | 199 | LOG_DEBUG(Service_LBL, "called"); |
| 200 | 200 | ||
| @@ -202,7 +202,7 @@ private: | |||
| 202 | rb.Push(ResultSuccess); | 202 | rb.Push(ResultSuccess); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | void GetBrightnessReflectionDelayLevel(Kernel::HLERequestContext& ctx) { | 205 | void GetBrightnessReflectionDelayLevel(HLERequestContext& ctx) { |
| 206 | // This is intentional, the function is hard coded to return 0.0f on hardware | 206 | // This is intentional, the function is hard coded to return 0.0f on hardware |
| 207 | LOG_DEBUG(Service_LBL, "called"); | 207 | LOG_DEBUG(Service_LBL, "called"); |
| 208 | 208 | ||
| @@ -211,7 +211,7 @@ private: | |||
| 211 | rb.Push(0.0f); | 211 | rb.Push(0.0f); |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | void SetCurrentBrightnessMapping(Kernel::HLERequestContext& ctx) { | 214 | void SetCurrentBrightnessMapping(HLERequestContext& ctx) { |
| 215 | // This is Intentional, this function does absolutely nothing | 215 | // This is Intentional, this function does absolutely nothing |
| 216 | LOG_DEBUG(Service_LBL, "called"); | 216 | LOG_DEBUG(Service_LBL, "called"); |
| 217 | 217 | ||
| @@ -219,7 +219,7 @@ private: | |||
| 219 | rb.Push(ResultSuccess); | 219 | rb.Push(ResultSuccess); |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | void GetCurrentBrightnessMapping(Kernel::HLERequestContext& ctx) { | 222 | void GetCurrentBrightnessMapping(HLERequestContext& ctx) { |
| 223 | // This is Intentional, this function does absolutely nothing | 223 | // This is Intentional, this function does absolutely nothing |
| 224 | LOG_DEBUG(Service_LBL, "called"); | 224 | LOG_DEBUG(Service_LBL, "called"); |
| 225 | 225 | ||
| @@ -228,7 +228,7 @@ private: | |||
| 228 | // This function is suppose to return something but it seems like it doesn't | 228 | // This function is suppose to return something but it seems like it doesn't |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void SetCurrentAmbientLightSensorMapping(Kernel::HLERequestContext& ctx) { | 231 | void SetCurrentAmbientLightSensorMapping(HLERequestContext& ctx) { |
| 232 | // This is Intentional, this function does absolutely nothing | 232 | // This is Intentional, this function does absolutely nothing |
| 233 | LOG_DEBUG(Service_LBL, "called"); | 233 | LOG_DEBUG(Service_LBL, "called"); |
| 234 | 234 | ||
| @@ -236,7 +236,7 @@ private: | |||
| 236 | rb.Push(ResultSuccess); | 236 | rb.Push(ResultSuccess); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | void GetCurrentAmbientLightSensorMapping(Kernel::HLERequestContext& ctx) { | 239 | void GetCurrentAmbientLightSensorMapping(HLERequestContext& ctx) { |
| 240 | // This is Intentional, this function does absolutely nothing | 240 | // This is Intentional, this function does absolutely nothing |
| 241 | LOG_DEBUG(Service_LBL, "called"); | 241 | LOG_DEBUG(Service_LBL, "called"); |
| 242 | 242 | ||
| @@ -245,7 +245,7 @@ private: | |||
| 245 | // This function is suppose to return something but it seems like it doesn't | 245 | // This function is suppose to return something but it seems like it doesn't |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | void IsAmbientLightSensorAvailable(Kernel::HLERequestContext& ctx) { | 248 | void IsAmbientLightSensorAvailable(HLERequestContext& ctx) { |
| 249 | LOG_WARNING(Service_LBL, "(STUBBED) called"); | 249 | LOG_WARNING(Service_LBL, "(STUBBED) called"); |
| 250 | IPC::ResponseBuilder rb{ctx, 3}; | 250 | IPC::ResponseBuilder rb{ctx, 3}; |
| 251 | rb.Push(ResultSuccess); | 251 | rb.Push(ResultSuccess); |
| @@ -253,7 +253,7 @@ private: | |||
| 253 | rb.Push(true); | 253 | rb.Push(true); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | void SetCurrentBrightnessSettingForVrMode(Kernel::HLERequestContext& ctx) { | 256 | void SetCurrentBrightnessSettingForVrMode(HLERequestContext& ctx) { |
| 257 | IPC::RequestParser rp{ctx}; | 257 | IPC::RequestParser rp{ctx}; |
| 258 | auto brightness = rp.Pop<float>(); | 258 | auto brightness = rp.Pop<float>(); |
| 259 | 259 | ||
| @@ -270,7 +270,7 @@ private: | |||
| 270 | rb.Push(ResultSuccess); | 270 | rb.Push(ResultSuccess); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | void GetCurrentBrightnessSettingForVrMode(Kernel::HLERequestContext& ctx) { | 273 | void GetCurrentBrightnessSettingForVrMode(HLERequestContext& ctx) { |
| 274 | auto brightness = current_vr_brightness; | 274 | auto brightness = current_vr_brightness; |
| 275 | if (!std::isfinite(brightness)) { | 275 | if (!std::isfinite(brightness)) { |
| 276 | LOG_ERROR(Service_LBL, "Brightness is infinite!"); | 276 | LOG_ERROR(Service_LBL, "Brightness is infinite!"); |
| @@ -284,7 +284,7 @@ private: | |||
| 284 | rb.Push(brightness); | 284 | rb.Push(brightness); |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | void EnableVrMode(Kernel::HLERequestContext& ctx) { | 287 | void EnableVrMode(HLERequestContext& ctx) { |
| 288 | LOG_DEBUG(Service_LBL, "called"); | 288 | LOG_DEBUG(Service_LBL, "called"); |
| 289 | 289 | ||
| 290 | IPC::ResponseBuilder rb{ctx, 2}; | 290 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -293,7 +293,7 @@ private: | |||
| 293 | vr_mode_enabled = true; | 293 | vr_mode_enabled = true; |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | void DisableVrMode(Kernel::HLERequestContext& ctx) { | 296 | void DisableVrMode(HLERequestContext& ctx) { |
| 297 | LOG_DEBUG(Service_LBL, "called"); | 297 | LOG_DEBUG(Service_LBL, "called"); |
| 298 | 298 | ||
| 299 | IPC::ResponseBuilder rb{ctx, 2}; | 299 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -302,7 +302,7 @@ private: | |||
| 302 | vr_mode_enabled = false; | 302 | vr_mode_enabled = false; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | void IsVrModeEnabled(Kernel::HLERequestContext& ctx) { | 305 | void IsVrModeEnabled(HLERequestContext& ctx) { |
| 306 | LOG_DEBUG(Service_LBL, "called"); | 306 | LOG_DEBUG(Service_LBL, "called"); |
| 307 | 307 | ||
| 308 | IPC::ResponseBuilder rb{ctx, 3}; | 308 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp index 4c2abe7d3..9d149a7cd 100644 --- a/src/core/hle/service/ldn/ldn.cpp +++ b/src/core/hle/service/ldn/ldn.cpp | |||
| @@ -50,7 +50,7 @@ public: | |||
| 50 | RegisterHandlers(functions); | 50 | RegisterHandlers(functions); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void CreateMonitorService(Kernel::HLERequestContext& ctx) { | 53 | void CreateMonitorService(HLERequestContext& ctx) { |
| 54 | LOG_DEBUG(Service_LDN, "called"); | 54 | LOG_DEBUG(Service_LDN, "called"); |
| 55 | 55 | ||
| 56 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 56 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -169,7 +169,7 @@ public: | |||
| 169 | state_change_event->Signal(); | 169 | state_change_event->Signal(); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | void GetState(Kernel::HLERequestContext& ctx) { | 172 | void GetState(HLERequestContext& ctx) { |
| 173 | State state = State::Error; | 173 | State state = State::Error; |
| 174 | 174 | ||
| 175 | if (is_initialized) { | 175 | if (is_initialized) { |
| @@ -181,7 +181,7 @@ public: | |||
| 181 | rb.PushEnum(state); | 181 | rb.PushEnum(state); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void GetNetworkInfo(Kernel::HLERequestContext& ctx) { | 184 | void GetNetworkInfo(HLERequestContext& ctx) { |
| 185 | const auto write_buffer_size = ctx.GetWriteBufferSize(); | 185 | const auto write_buffer_size = ctx.GetWriteBufferSize(); |
| 186 | 186 | ||
| 187 | if (write_buffer_size != sizeof(NetworkInfo)) { | 187 | if (write_buffer_size != sizeof(NetworkInfo)) { |
| @@ -205,7 +205,7 @@ public: | |||
| 205 | rb.Push(ResultSuccess); | 205 | rb.Push(ResultSuccess); |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | void GetIpv4Address(Kernel::HLERequestContext& ctx) { | 208 | void GetIpv4Address(HLERequestContext& ctx) { |
| 209 | const auto network_interface = Network::GetSelectedNetworkInterface(); | 209 | const auto network_interface = Network::GetSelectedNetworkInterface(); |
| 210 | 210 | ||
| 211 | if (!network_interface) { | 211 | if (!network_interface) { |
| @@ -234,13 +234,13 @@ public: | |||
| 234 | rb.PushRaw(subnet_mask); | 234 | rb.PushRaw(subnet_mask); |
| 235 | } | 235 | } |
| 236 | 236 | ||
| 237 | void GetDisconnectReason(Kernel::HLERequestContext& ctx) { | 237 | void GetDisconnectReason(HLERequestContext& ctx) { |
| 238 | IPC::ResponseBuilder rb{ctx, 3}; | 238 | IPC::ResponseBuilder rb{ctx, 3}; |
| 239 | rb.Push(ResultSuccess); | 239 | rb.Push(ResultSuccess); |
| 240 | rb.PushEnum(lan_discovery.GetDisconnectReason()); | 240 | rb.PushEnum(lan_discovery.GetDisconnectReason()); |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | void GetSecurityParameter(Kernel::HLERequestContext& ctx) { | 243 | void GetSecurityParameter(HLERequestContext& ctx) { |
| 244 | SecurityParameter security_parameter{}; | 244 | SecurityParameter security_parameter{}; |
| 245 | NetworkInfo info{}; | 245 | NetworkInfo info{}; |
| 246 | const Result rc = lan_discovery.GetNetworkInfo(info); | 246 | const Result rc = lan_discovery.GetNetworkInfo(info); |
| @@ -261,7 +261,7 @@ public: | |||
| 261 | rb.PushRaw<SecurityParameter>(security_parameter); | 261 | rb.PushRaw<SecurityParameter>(security_parameter); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void GetNetworkConfig(Kernel::HLERequestContext& ctx) { | 264 | void GetNetworkConfig(HLERequestContext& ctx) { |
| 265 | NetworkConfig config{}; | 265 | NetworkConfig config{}; |
| 266 | NetworkInfo info{}; | 266 | NetworkInfo info{}; |
| 267 | const Result rc = lan_discovery.GetNetworkInfo(info); | 267 | const Result rc = lan_discovery.GetNetworkInfo(info); |
| @@ -283,7 +283,7 @@ public: | |||
| 283 | rb.PushRaw<NetworkConfig>(config); | 283 | rb.PushRaw<NetworkConfig>(config); |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | void AttachStateChangeEvent(Kernel::HLERequestContext& ctx) { | 286 | void AttachStateChangeEvent(HLERequestContext& ctx) { |
| 287 | LOG_INFO(Service_LDN, "called"); | 287 | LOG_INFO(Service_LDN, "called"); |
| 288 | 288 | ||
| 289 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 289 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -291,7 +291,7 @@ public: | |||
| 291 | rb.PushCopyObjects(state_change_event->GetReadableEvent()); | 291 | rb.PushCopyObjects(state_change_event->GetReadableEvent()); |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | void GetNetworkInfoLatestUpdate(Kernel::HLERequestContext& ctx) { | 294 | void GetNetworkInfoLatestUpdate(HLERequestContext& ctx) { |
| 295 | const std::size_t network_buffer_size = ctx.GetWriteBufferSize(0); | 295 | const std::size_t network_buffer_size = ctx.GetWriteBufferSize(0); |
| 296 | const std::size_t node_buffer_count = ctx.GetWriteBufferNumElements<NodeLatestUpdate>(1); | 296 | const std::size_t node_buffer_count = ctx.GetWriteBufferNumElements<NodeLatestUpdate>(1); |
| 297 | 297 | ||
| @@ -321,15 +321,15 @@ public: | |||
| 321 | rb.Push(ResultSuccess); | 321 | rb.Push(ResultSuccess); |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | void Scan(Kernel::HLERequestContext& ctx) { | 324 | void Scan(HLERequestContext& ctx) { |
| 325 | ScanImpl(ctx); | 325 | ScanImpl(ctx); |
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | void ScanPrivate(Kernel::HLERequestContext& ctx) { | 328 | void ScanPrivate(HLERequestContext& ctx) { |
| 329 | ScanImpl(ctx, true); | 329 | ScanImpl(ctx, true); |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | void ScanImpl(Kernel::HLERequestContext& ctx, bool is_private = false) { | 332 | void ScanImpl(HLERequestContext& ctx, bool is_private = false) { |
| 333 | IPC::RequestParser rp{ctx}; | 333 | IPC::RequestParser rp{ctx}; |
| 334 | const auto channel{rp.PopEnum<WifiChannel>()}; | 334 | const auto channel{rp.PopEnum<WifiChannel>()}; |
| 335 | const auto scan_filter{rp.PopRaw<ScanFilter>()}; | 335 | const auto scan_filter{rp.PopRaw<ScanFilter>()}; |
| @@ -358,40 +358,40 @@ public: | |||
| 358 | rb.Push<u32>(count); | 358 | rb.Push<u32>(count); |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | void SetWirelessControllerRestriction(Kernel::HLERequestContext& ctx) { | 361 | void SetWirelessControllerRestriction(HLERequestContext& ctx) { |
| 362 | LOG_WARNING(Service_LDN, "(STUBBED) called"); | 362 | LOG_WARNING(Service_LDN, "(STUBBED) called"); |
| 363 | 363 | ||
| 364 | IPC::ResponseBuilder rb{ctx, 2}; | 364 | IPC::ResponseBuilder rb{ctx, 2}; |
| 365 | rb.Push(ResultSuccess); | 365 | rb.Push(ResultSuccess); |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | void OpenAccessPoint(Kernel::HLERequestContext& ctx) { | 368 | void OpenAccessPoint(HLERequestContext& ctx) { |
| 369 | LOG_INFO(Service_LDN, "called"); | 369 | LOG_INFO(Service_LDN, "called"); |
| 370 | 370 | ||
| 371 | IPC::ResponseBuilder rb{ctx, 2}; | 371 | IPC::ResponseBuilder rb{ctx, 2}; |
| 372 | rb.Push(lan_discovery.OpenAccessPoint()); | 372 | rb.Push(lan_discovery.OpenAccessPoint()); |
| 373 | } | 373 | } |
| 374 | 374 | ||
| 375 | void CloseAccessPoint(Kernel::HLERequestContext& ctx) { | 375 | void CloseAccessPoint(HLERequestContext& ctx) { |
| 376 | LOG_INFO(Service_LDN, "called"); | 376 | LOG_INFO(Service_LDN, "called"); |
| 377 | 377 | ||
| 378 | IPC::ResponseBuilder rb{ctx, 2}; | 378 | IPC::ResponseBuilder rb{ctx, 2}; |
| 379 | rb.Push(lan_discovery.CloseAccessPoint()); | 379 | rb.Push(lan_discovery.CloseAccessPoint()); |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | void CreateNetwork(Kernel::HLERequestContext& ctx) { | 382 | void CreateNetwork(HLERequestContext& ctx) { |
| 383 | LOG_INFO(Service_LDN, "called"); | 383 | LOG_INFO(Service_LDN, "called"); |
| 384 | 384 | ||
| 385 | CreateNetworkImpl(ctx); | 385 | CreateNetworkImpl(ctx); |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | void CreateNetworkPrivate(Kernel::HLERequestContext& ctx) { | 388 | void CreateNetworkPrivate(HLERequestContext& ctx) { |
| 389 | LOG_INFO(Service_LDN, "called"); | 389 | LOG_INFO(Service_LDN, "called"); |
| 390 | 390 | ||
| 391 | CreateNetworkImpl(ctx, true); | 391 | CreateNetworkImpl(ctx, true); |
| 392 | } | 392 | } |
| 393 | 393 | ||
| 394 | void CreateNetworkImpl(Kernel::HLERequestContext& ctx, bool is_private = false) { | 394 | void CreateNetworkImpl(HLERequestContext& ctx, bool is_private = false) { |
| 395 | IPC::RequestParser rp{ctx}; | 395 | IPC::RequestParser rp{ctx}; |
| 396 | 396 | ||
| 397 | const auto security_config{rp.PopRaw<SecurityConfig>()}; | 397 | const auto security_config{rp.PopRaw<SecurityConfig>()}; |
| @@ -405,49 +405,49 @@ public: | |||
| 405 | rb.Push(lan_discovery.CreateNetwork(security_config, user_config, network_Config)); | 405 | rb.Push(lan_discovery.CreateNetwork(security_config, user_config, network_Config)); |
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | void DestroyNetwork(Kernel::HLERequestContext& ctx) { | 408 | void DestroyNetwork(HLERequestContext& ctx) { |
| 409 | LOG_INFO(Service_LDN, "called"); | 409 | LOG_INFO(Service_LDN, "called"); |
| 410 | 410 | ||
| 411 | IPC::ResponseBuilder rb{ctx, 2}; | 411 | IPC::ResponseBuilder rb{ctx, 2}; |
| 412 | rb.Push(lan_discovery.DestroyNetwork()); | 412 | rb.Push(lan_discovery.DestroyNetwork()); |
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | void SetAdvertiseData(Kernel::HLERequestContext& ctx) { | 415 | void SetAdvertiseData(HLERequestContext& ctx) { |
| 416 | const auto read_buffer = ctx.ReadBuffer(); | 416 | const auto read_buffer = ctx.ReadBuffer(); |
| 417 | 417 | ||
| 418 | IPC::ResponseBuilder rb{ctx, 2}; | 418 | IPC::ResponseBuilder rb{ctx, 2}; |
| 419 | rb.Push(lan_discovery.SetAdvertiseData(read_buffer)); | 419 | rb.Push(lan_discovery.SetAdvertiseData(read_buffer)); |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | void SetStationAcceptPolicy(Kernel::HLERequestContext& ctx) { | 422 | void SetStationAcceptPolicy(HLERequestContext& ctx) { |
| 423 | LOG_WARNING(Service_LDN, "(STUBBED) called"); | 423 | LOG_WARNING(Service_LDN, "(STUBBED) called"); |
| 424 | 424 | ||
| 425 | IPC::ResponseBuilder rb{ctx, 2}; | 425 | IPC::ResponseBuilder rb{ctx, 2}; |
| 426 | rb.Push(ResultSuccess); | 426 | rb.Push(ResultSuccess); |
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | void AddAcceptFilterEntry(Kernel::HLERequestContext& ctx) { | 429 | void AddAcceptFilterEntry(HLERequestContext& ctx) { |
| 430 | LOG_WARNING(Service_LDN, "(STUBBED) called"); | 430 | LOG_WARNING(Service_LDN, "(STUBBED) called"); |
| 431 | 431 | ||
| 432 | IPC::ResponseBuilder rb{ctx, 2}; | 432 | IPC::ResponseBuilder rb{ctx, 2}; |
| 433 | rb.Push(ResultSuccess); | 433 | rb.Push(ResultSuccess); |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | void OpenStation(Kernel::HLERequestContext& ctx) { | 436 | void OpenStation(HLERequestContext& ctx) { |
| 437 | LOG_INFO(Service_LDN, "called"); | 437 | LOG_INFO(Service_LDN, "called"); |
| 438 | 438 | ||
| 439 | IPC::ResponseBuilder rb{ctx, 2}; | 439 | IPC::ResponseBuilder rb{ctx, 2}; |
| 440 | rb.Push(lan_discovery.OpenStation()); | 440 | rb.Push(lan_discovery.OpenStation()); |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | void CloseStation(Kernel::HLERequestContext& ctx) { | 443 | void CloseStation(HLERequestContext& ctx) { |
| 444 | LOG_INFO(Service_LDN, "called"); | 444 | LOG_INFO(Service_LDN, "called"); |
| 445 | 445 | ||
| 446 | IPC::ResponseBuilder rb{ctx, 2}; | 446 | IPC::ResponseBuilder rb{ctx, 2}; |
| 447 | rb.Push(lan_discovery.CloseStation()); | 447 | rb.Push(lan_discovery.CloseStation()); |
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | void Connect(Kernel::HLERequestContext& ctx) { | 450 | void Connect(HLERequestContext& ctx) { |
| 451 | IPC::RequestParser rp{ctx}; | 451 | IPC::RequestParser rp{ctx}; |
| 452 | struct Parameters { | 452 | struct Parameters { |
| 453 | SecurityConfig security_config; | 453 | SecurityConfig security_config; |
| @@ -481,14 +481,14 @@ public: | |||
| 481 | static_cast<u16>(parameters.local_communication_version))); | 481 | static_cast<u16>(parameters.local_communication_version))); |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | void Disconnect(Kernel::HLERequestContext& ctx) { | 484 | void Disconnect(HLERequestContext& ctx) { |
| 485 | LOG_INFO(Service_LDN, "called"); | 485 | LOG_INFO(Service_LDN, "called"); |
| 486 | 486 | ||
| 487 | IPC::ResponseBuilder rb{ctx, 2}; | 487 | IPC::ResponseBuilder rb{ctx, 2}; |
| 488 | rb.Push(lan_discovery.Disconnect()); | 488 | rb.Push(lan_discovery.Disconnect()); |
| 489 | } | 489 | } |
| 490 | 490 | ||
| 491 | void Initialize(Kernel::HLERequestContext& ctx) { | 491 | void Initialize(HLERequestContext& ctx) { |
| 492 | const auto rc = InitializeImpl(ctx); | 492 | const auto rc = InitializeImpl(ctx); |
| 493 | if (rc.IsError()) { | 493 | if (rc.IsError()) { |
| 494 | LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw); | 494 | LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw); |
| @@ -498,7 +498,7 @@ public: | |||
| 498 | rb.Push(rc); | 498 | rb.Push(rc); |
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | void Finalize(Kernel::HLERequestContext& ctx) { | 501 | void Finalize(HLERequestContext& ctx) { |
| 502 | if (auto room_member = room_network.GetRoomMember().lock()) { | 502 | if (auto room_member = room_network.GetRoomMember().lock()) { |
| 503 | room_member->Unbind(ldn_packet_received); | 503 | room_member->Unbind(ldn_packet_received); |
| 504 | } | 504 | } |
| @@ -509,7 +509,7 @@ public: | |||
| 509 | rb.Push(lan_discovery.Finalize()); | 509 | rb.Push(lan_discovery.Finalize()); |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | void Initialize2(Kernel::HLERequestContext& ctx) { | 512 | void Initialize2(HLERequestContext& ctx) { |
| 513 | const auto rc = InitializeImpl(ctx); | 513 | const auto rc = InitializeImpl(ctx); |
| 514 | if (rc.IsError()) { | 514 | if (rc.IsError()) { |
| 515 | LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw); | 515 | LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw); |
| @@ -519,7 +519,7 @@ public: | |||
| 519 | rb.Push(rc); | 519 | rb.Push(rc); |
| 520 | } | 520 | } |
| 521 | 521 | ||
| 522 | Result InitializeImpl(Kernel::HLERequestContext& ctx) { | 522 | Result InitializeImpl(HLERequestContext& ctx) { |
| 523 | const auto network_interface = Network::GetSelectedNetworkInterface(); | 523 | const auto network_interface = Network::GetSelectedNetworkInterface(); |
| 524 | if (!network_interface) { | 524 | if (!network_interface) { |
| 525 | LOG_ERROR(Service_LDN, "No network interface is set"); | 525 | LOG_ERROR(Service_LDN, "No network interface is set"); |
| @@ -562,7 +562,7 @@ public: | |||
| 562 | RegisterHandlers(functions); | 562 | RegisterHandlers(functions); |
| 563 | } | 563 | } |
| 564 | 564 | ||
| 565 | void CreateSystemLocalCommunicationService(Kernel::HLERequestContext& ctx) { | 565 | void CreateSystemLocalCommunicationService(HLERequestContext& ctx) { |
| 566 | LOG_DEBUG(Service_LDN, "called"); | 566 | LOG_DEBUG(Service_LDN, "called"); |
| 567 | 567 | ||
| 568 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 568 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -583,7 +583,7 @@ public: | |||
| 583 | RegisterHandlers(functions); | 583 | RegisterHandlers(functions); |
| 584 | } | 584 | } |
| 585 | 585 | ||
| 586 | void CreateUserLocalCommunicationService(Kernel::HLERequestContext& ctx) { | 586 | void CreateUserLocalCommunicationService(HLERequestContext& ctx) { |
| 587 | LOG_DEBUG(Service_LDN, "called"); | 587 | LOG_DEBUG(Service_LDN, "called"); |
| 588 | 588 | ||
| 589 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 589 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -647,7 +647,7 @@ public: | |||
| 647 | RegisterHandlers(functions); | 647 | RegisterHandlers(functions); |
| 648 | } | 648 | } |
| 649 | 649 | ||
| 650 | void Initialize(Kernel::HLERequestContext& ctx) { | 650 | void Initialize(HLERequestContext& ctx) { |
| 651 | LOG_WARNING(Service_LDN, "(STUBBED) called"); | 651 | LOG_WARNING(Service_LDN, "(STUBBED) called"); |
| 652 | 652 | ||
| 653 | IPC::ResponseBuilder rb{ctx, 2}; | 653 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -668,7 +668,7 @@ public: | |||
| 668 | RegisterHandlers(functions); | 668 | RegisterHandlers(functions); |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | void CreateNetworkervice(Kernel::HLERequestContext& ctx) { | 671 | void CreateNetworkervice(HLERequestContext& ctx) { |
| 672 | IPC::RequestParser rp{ctx}; | 672 | IPC::RequestParser rp{ctx}; |
| 673 | const u64 reserved_input = rp.Pop<u64>(); | 673 | const u64 reserved_input = rp.Pop<u64>(); |
| 674 | const u32 input = rp.Pop<u32>(); | 674 | const u32 input = rp.Pop<u32>(); |
| @@ -681,7 +681,7 @@ public: | |||
| 681 | rb.PushIpcInterface<INetworkService>(system); | 681 | rb.PushIpcInterface<INetworkService>(system); |
| 682 | } | 682 | } |
| 683 | 683 | ||
| 684 | void CreateMonitorService(Kernel::HLERequestContext& ctx) { | 684 | void CreateMonitorService(HLERequestContext& ctx) { |
| 685 | IPC::RequestParser rp{ctx}; | 685 | IPC::RequestParser rp{ctx}; |
| 686 | const u64 reserved_input = rp.Pop<u64>(); | 686 | const u64 reserved_input = rp.Pop<u64>(); |
| 687 | 687 | ||
| @@ -706,7 +706,7 @@ public: | |||
| 706 | RegisterHandlers(functions); | 706 | RegisterHandlers(functions); |
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | void CreateNetworkervice(Kernel::HLERequestContext& ctx) { | 709 | void CreateNetworkervice(HLERequestContext& ctx) { |
| 710 | IPC::RequestParser rp{ctx}; | 710 | IPC::RequestParser rp{ctx}; |
| 711 | const u64 reserved_input = rp.Pop<u64>(); | 711 | const u64 reserved_input = rp.Pop<u64>(); |
| 712 | const u32 input = rp.Pop<u32>(); | 712 | const u32 input = rp.Pop<u32>(); |
| @@ -719,7 +719,7 @@ public: | |||
| 719 | rb.PushIpcInterface<INetworkService>(system); | 719 | rb.PushIpcInterface<INetworkService>(system); |
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | void CreateMonitorService(Kernel::HLERequestContext& ctx) { | 722 | void CreateMonitorService(HLERequestContext& ctx) { |
| 723 | IPC::RequestParser rp{ctx}; | 723 | IPC::RequestParser rp{ctx}; |
| 724 | const u64 reserved_input = rp.Pop<u64>(); | 724 | const u64 reserved_input = rp.Pop<u64>(); |
| 725 | 725 | ||
diff --git a/src/core/hle/service/ldn/ldn.h b/src/core/hle/service/ldn/ldn.h index fa869fa89..f4a319168 100644 --- a/src/core/hle/service/ldn/ldn.h +++ b/src/core/hle/service/ldn/ldn.h | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | #pragma once | 4 | #pragma once |
| 5 | 5 | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/kernel/k_event.h" | 6 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/result.h" | 7 | #include "core/hle/result.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/kernel_helpers.h" | 9 | #include "core/hle/service/kernel_helpers.h" |
| 10 | #include "core/hle/service/sm/sm.h" | 10 | #include "core/hle/service/sm/sm.h" |
| 11 | 11 | ||
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index c82e189f4..6de96ed5b 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -9,10 +9,10 @@ | |||
| 9 | #include "common/hex_util.h" | 9 | #include "common/hex_util.h" |
| 10 | #include "common/scope_exit.h" | 10 | #include "common/scope_exit.h" |
| 11 | #include "core/core.h" | 11 | #include "core/core.h" |
| 12 | #include "core/hle/ipc_helpers.h" | ||
| 13 | #include "core/hle/kernel/k_page_table.h" | 12 | #include "core/hle/kernel/k_page_table.h" |
| 14 | #include "core/hle/kernel/svc_results.h" | 13 | #include "core/hle/kernel/svc_results.h" |
| 15 | #include "core/hle/kernel/svc_types.h" | 14 | #include "core/hle/kernel/svc_types.h" |
| 15 | #include "core/hle/service/ipc_helpers.h" | ||
| 16 | #include "core/hle/service/ldr/ldr.h" | 16 | #include "core/hle/service/ldr/ldr.h" |
| 17 | #include "core/hle/service/server_manager.h" | 17 | #include "core/hle/service/server_manager.h" |
| 18 | #include "core/hle/service/service.h" | 18 | #include "core/hle/service/service.h" |
| @@ -175,7 +175,7 @@ public: | |||
| 175 | RegisterHandlers(functions); | 175 | RegisterHandlers(functions); |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | void RegisterModuleInfo(Kernel::HLERequestContext& ctx) { | 178 | void RegisterModuleInfo(HLERequestContext& ctx) { |
| 179 | struct Parameters { | 179 | struct Parameters { |
| 180 | u64_le process_id; | 180 | u64_le process_id; |
| 181 | u64_le nrr_address; | 181 | u64_le nrr_address; |
| @@ -272,7 +272,7 @@ public: | |||
| 272 | rb.Push(ResultSuccess); | 272 | rb.Push(ResultSuccess); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | void UnregisterModuleInfo(Kernel::HLERequestContext& ctx) { | 275 | void UnregisterModuleInfo(HLERequestContext& ctx) { |
| 276 | IPC::RequestParser rp{ctx}; | 276 | IPC::RequestParser rp{ctx}; |
| 277 | const auto pid = rp.Pop<u64>(); | 277 | const auto pid = rp.Pop<u64>(); |
| 278 | const auto nrr_address = rp.Pop<VAddr>(); | 278 | const auto nrr_address = rp.Pop<VAddr>(); |
| @@ -446,7 +446,7 @@ public: | |||
| 446 | data_start, bss_end_addr - data_start, Kernel::Svc::MemoryPermission::ReadWrite); | 446 | data_start, bss_end_addr - data_start, Kernel::Svc::MemoryPermission::ReadWrite); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | void LoadModule(Kernel::HLERequestContext& ctx) { | 449 | void LoadModule(HLERequestContext& ctx) { |
| 450 | struct Parameters { | 450 | struct Parameters { |
| 451 | u64_le process_id; | 451 | u64_le process_id; |
| 452 | u64_le image_address; | 452 | u64_le image_address; |
| @@ -592,7 +592,7 @@ public: | |||
| 592 | return ResultSuccess; | 592 | return ResultSuccess; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | void UnloadModule(Kernel::HLERequestContext& ctx) { | 595 | void UnloadModule(HLERequestContext& ctx) { |
| 596 | if (!initialized) { | 596 | if (!initialized) { |
| 597 | LOG_ERROR(Service_LDR, "LDR:RO not initialized before use!"); | 597 | LOG_ERROR(Service_LDR, "LDR:RO not initialized before use!"); |
| 598 | IPC::ResponseBuilder rb{ctx, 2}; | 598 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -638,7 +638,7 @@ public: | |||
| 638 | rb.Push(result); | 638 | rb.Push(result); |
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | void Initialize(Kernel::HLERequestContext& ctx) { | 641 | void Initialize(HLERequestContext& ctx) { |
| 642 | LOG_WARNING(Service_LDR, "(STUBBED) called"); | 642 | LOG_WARNING(Service_LDR, "(STUBBED) called"); |
| 643 | 643 | ||
| 644 | initialized = true; | 644 | initialized = true; |
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 7efd8e0ab..20df00233 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <boost/container_hash/hash.hpp> | 8 | #include <boost/container_hash/hash.hpp> |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "core/core.h" | 10 | #include "core/core.h" |
| 11 | #include "core/hle/ipc_helpers.h" | 11 | #include "core/hle/service/ipc_helpers.h" |
| 12 | #include "core/hle/service/lm/lm.h" | 12 | #include "core/hle/service/lm/lm.h" |
| 13 | #include "core/hle/service/server_manager.h" | 13 | #include "core/hle/service/server_manager.h" |
| 14 | #include "core/hle/service/service.h" | 14 | #include "core/hle/service/service.h" |
| @@ -93,7 +93,7 @@ public: | |||
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | private: | 95 | private: |
| 96 | void Log(Kernel::HLERequestContext& ctx) { | 96 | void Log(HLERequestContext& ctx) { |
| 97 | std::size_t offset{}; | 97 | std::size_t offset{}; |
| 98 | const auto data = ctx.ReadBuffer(); | 98 | const auto data = ctx.ReadBuffer(); |
| 99 | 99 | ||
| @@ -148,7 +148,7 @@ private: | |||
| 148 | } | 148 | } |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | void SetDestination(Kernel::HLERequestContext& ctx) { | 151 | void SetDestination(HLERequestContext& ctx) { |
| 152 | IPC::RequestParser rp{ctx}; | 152 | IPC::RequestParser rp{ctx}; |
| 153 | const auto log_destination = rp.PopEnum<LogDestination>(); | 153 | const auto log_destination = rp.PopEnum<LogDestination>(); |
| 154 | 154 | ||
| @@ -343,7 +343,7 @@ public: | |||
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | private: | 345 | private: |
| 346 | void OpenLogger(Kernel::HLERequestContext& ctx) { | 346 | void OpenLogger(HLERequestContext& ctx) { |
| 347 | LOG_DEBUG(Service_LM, "called"); | 347 | LOG_DEBUG(Service_LM, "called"); |
| 348 | 348 | ||
| 349 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 349 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index 50dc0ac64..5c7adf97d 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/service/ipc_helpers.h" |
| 8 | #include "core/hle/service/mii/mii.h" | 8 | #include "core/hle/service/mii/mii.h" |
| 9 | #include "core/hle/service/mii/mii_manager.h" | 9 | #include "core/hle/service/mii/mii_manager.h" |
| 10 | #include "core/hle/service/server_manager.h" | 10 | #include "core/hle/service/server_manager.h" |
| @@ -65,7 +65,7 @@ private: | |||
| 65 | return out; | 65 | return out; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | void IsUpdated(Kernel::HLERequestContext& ctx) { | 68 | void IsUpdated(HLERequestContext& ctx) { |
| 69 | IPC::RequestParser rp{ctx}; | 69 | IPC::RequestParser rp{ctx}; |
| 70 | const auto source_flag{rp.PopRaw<SourceFlag>()}; | 70 | const auto source_flag{rp.PopRaw<SourceFlag>()}; |
| 71 | 71 | ||
| @@ -76,7 +76,7 @@ private: | |||
| 76 | rb.Push(manager.CheckAndResetUpdateCounter(source_flag, current_update_counter)); | 76 | rb.Push(manager.CheckAndResetUpdateCounter(source_flag, current_update_counter)); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | void IsFullDatabase(Kernel::HLERequestContext& ctx) { | 79 | void IsFullDatabase(HLERequestContext& ctx) { |
| 80 | LOG_DEBUG(Service_Mii, "called"); | 80 | LOG_DEBUG(Service_Mii, "called"); |
| 81 | 81 | ||
| 82 | IPC::ResponseBuilder rb{ctx, 3}; | 82 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -84,7 +84,7 @@ private: | |||
| 84 | rb.Push(manager.IsFullDatabase()); | 84 | rb.Push(manager.IsFullDatabase()); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void GetCount(Kernel::HLERequestContext& ctx) { | 87 | void GetCount(HLERequestContext& ctx) { |
| 88 | IPC::RequestParser rp{ctx}; | 88 | IPC::RequestParser rp{ctx}; |
| 89 | const auto source_flag{rp.PopRaw<SourceFlag>()}; | 89 | const auto source_flag{rp.PopRaw<SourceFlag>()}; |
| 90 | 90 | ||
| @@ -95,7 +95,7 @@ private: | |||
| 95 | rb.Push<u32>(manager.GetCount(source_flag)); | 95 | rb.Push<u32>(manager.GetCount(source_flag)); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void Get(Kernel::HLERequestContext& ctx) { | 98 | void Get(HLERequestContext& ctx) { |
| 99 | IPC::RequestParser rp{ctx}; | 99 | IPC::RequestParser rp{ctx}; |
| 100 | const auto source_flag{rp.PopRaw<SourceFlag>()}; | 100 | const auto source_flag{rp.PopRaw<SourceFlag>()}; |
| 101 | 101 | ||
| @@ -117,7 +117,7 @@ private: | |||
| 117 | rb.Push<u32>(static_cast<u32>(result->size())); | 117 | rb.Push<u32>(static_cast<u32>(result->size())); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void Get1(Kernel::HLERequestContext& ctx) { | 120 | void Get1(HLERequestContext& ctx) { |
| 121 | IPC::RequestParser rp{ctx}; | 121 | IPC::RequestParser rp{ctx}; |
| 122 | const auto source_flag{rp.PopRaw<SourceFlag>()}; | 122 | const auto source_flag{rp.PopRaw<SourceFlag>()}; |
| 123 | 123 | ||
| @@ -142,7 +142,7 @@ private: | |||
| 142 | rb.Push<u32>(static_cast<u32>(result->size())); | 142 | rb.Push<u32>(static_cast<u32>(result->size())); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | void UpdateLatest(Kernel::HLERequestContext& ctx) { | 145 | void UpdateLatest(HLERequestContext& ctx) { |
| 146 | IPC::RequestParser rp{ctx}; | 146 | IPC::RequestParser rp{ctx}; |
| 147 | const auto info{rp.PopRaw<CharInfo>()}; | 147 | const auto info{rp.PopRaw<CharInfo>()}; |
| 148 | const auto source_flag{rp.PopRaw<SourceFlag>()}; | 148 | const auto source_flag{rp.PopRaw<SourceFlag>()}; |
| @@ -161,7 +161,7 @@ private: | |||
| 161 | rb.PushRaw<CharInfo>(*result); | 161 | rb.PushRaw<CharInfo>(*result); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | void BuildRandom(Kernel::HLERequestContext& ctx) { | 164 | void BuildRandom(HLERequestContext& ctx) { |
| 165 | IPC::RequestParser rp{ctx}; | 165 | IPC::RequestParser rp{ctx}; |
| 166 | 166 | ||
| 167 | const auto age{rp.PopRaw<Age>()}; | 167 | const auto age{rp.PopRaw<Age>()}; |
| @@ -196,7 +196,7 @@ private: | |||
| 196 | rb.PushRaw<CharInfo>(manager.BuildRandom(age, gender, race)); | 196 | rb.PushRaw<CharInfo>(manager.BuildRandom(age, gender, race)); |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | void BuildDefault(Kernel::HLERequestContext& ctx) { | 199 | void BuildDefault(HLERequestContext& ctx) { |
| 200 | IPC::RequestParser rp{ctx}; | 200 | IPC::RequestParser rp{ctx}; |
| 201 | const auto index{rp.Pop<u32>()}; | 201 | const auto index{rp.Pop<u32>()}; |
| 202 | 202 | ||
| @@ -215,7 +215,7 @@ private: | |||
| 215 | rb.PushRaw<CharInfo>(manager.BuildDefault(index)); | 215 | rb.PushRaw<CharInfo>(manager.BuildDefault(index)); |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | void GetIndex(Kernel::HLERequestContext& ctx) { | 218 | void GetIndex(HLERequestContext& ctx) { |
| 219 | IPC::RequestParser rp{ctx}; | 219 | IPC::RequestParser rp{ctx}; |
| 220 | const auto info{rp.PopRaw<CharInfo>()}; | 220 | const auto info{rp.PopRaw<CharInfo>()}; |
| 221 | 221 | ||
| @@ -227,7 +227,7 @@ private: | |||
| 227 | rb.Push(index); | 227 | rb.Push(index); |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | void SetInterfaceVersion(Kernel::HLERequestContext& ctx) { | 230 | void SetInterfaceVersion(HLERequestContext& ctx) { |
| 231 | IPC::RequestParser rp{ctx}; | 231 | IPC::RequestParser rp{ctx}; |
| 232 | current_interface_version = rp.PopRaw<u32>(); | 232 | current_interface_version = rp.PopRaw<u32>(); |
| 233 | 233 | ||
| @@ -239,7 +239,7 @@ private: | |||
| 239 | rb.Push(ResultSuccess); | 239 | rb.Push(ResultSuccess); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | void Convert(Kernel::HLERequestContext& ctx) { | 242 | void Convert(HLERequestContext& ctx) { |
| 243 | IPC::RequestParser rp{ctx}; | 243 | IPC::RequestParser rp{ctx}; |
| 244 | 244 | ||
| 245 | const auto mii_v3{rp.PopRaw<Ver3StoreData>()}; | 245 | const auto mii_v3{rp.PopRaw<Ver3StoreData>()}; |
| @@ -275,7 +275,7 @@ public: | |||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | private: | 277 | private: |
| 278 | void GetDatabaseService(Kernel::HLERequestContext& ctx) { | 278 | void GetDatabaseService(HLERequestContext& ctx) { |
| 279 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 279 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 280 | rb.Push(ResultSuccess); | 280 | rb.Push(ResultSuccess); |
| 281 | rb.PushIpcInterface<IDatabaseService>(system); | 281 | rb.PushIpcInterface<IDatabaseService>(system); |
diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp index bee72fa1b..6f43b1968 100644 --- a/src/core/hle/service/mm/mm_u.cpp +++ b/src/core/hle/service/mm/mm_u.cpp | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | 5 | #include "core/hle/service/ipc_helpers.h" |
| 6 | #include "core/hle/service/mm/mm_u.h" | 6 | #include "core/hle/service/mm/mm_u.h" |
| 7 | #include "core/hle/service/server_manager.h" | 7 | #include "core/hle/service/server_manager.h" |
| 8 | #include "core/hle/service/sm/sm.h" | 8 | #include "core/hle/service/sm/sm.h" |
| @@ -29,21 +29,21 @@ public: | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | private: | 31 | private: |
| 32 | void InitializeOld(Kernel::HLERequestContext& ctx) { | 32 | void InitializeOld(HLERequestContext& ctx) { |
| 33 | LOG_WARNING(Service_MM, "(STUBBED) called"); | 33 | LOG_WARNING(Service_MM, "(STUBBED) called"); |
| 34 | 34 | ||
| 35 | IPC::ResponseBuilder rb{ctx, 2}; | 35 | IPC::ResponseBuilder rb{ctx, 2}; |
| 36 | rb.Push(ResultSuccess); | 36 | rb.Push(ResultSuccess); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | void FinalizeOld(Kernel::HLERequestContext& ctx) { | 39 | void FinalizeOld(HLERequestContext& ctx) { |
| 40 | LOG_WARNING(Service_MM, "(STUBBED) called"); | 40 | LOG_WARNING(Service_MM, "(STUBBED) called"); |
| 41 | 41 | ||
| 42 | IPC::ResponseBuilder rb{ctx, 2}; | 42 | IPC::ResponseBuilder rb{ctx, 2}; |
| 43 | rb.Push(ResultSuccess); | 43 | rb.Push(ResultSuccess); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void SetAndWaitOld(Kernel::HLERequestContext& ctx) { | 46 | void SetAndWaitOld(HLERequestContext& ctx) { |
| 47 | IPC::RequestParser rp{ctx}; | 47 | IPC::RequestParser rp{ctx}; |
| 48 | min = rp.Pop<u32>(); | 48 | min = rp.Pop<u32>(); |
| 49 | max = rp.Pop<u32>(); | 49 | max = rp.Pop<u32>(); |
| @@ -54,7 +54,7 @@ private: | |||
| 54 | rb.Push(ResultSuccess); | 54 | rb.Push(ResultSuccess); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | void GetOld(Kernel::HLERequestContext& ctx) { | 57 | void GetOld(HLERequestContext& ctx) { |
| 58 | LOG_DEBUG(Service_MM, "(STUBBED) called"); | 58 | LOG_DEBUG(Service_MM, "(STUBBED) called"); |
| 59 | 59 | ||
| 60 | IPC::ResponseBuilder rb{ctx, 3}; | 60 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -62,7 +62,7 @@ private: | |||
| 62 | rb.Push(current); | 62 | rb.Push(current); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | void Initialize(Kernel::HLERequestContext& ctx) { | 65 | void Initialize(HLERequestContext& ctx) { |
| 66 | LOG_WARNING(Service_MM, "(STUBBED) called"); | 66 | LOG_WARNING(Service_MM, "(STUBBED) called"); |
| 67 | 67 | ||
| 68 | IPC::ResponseBuilder rb{ctx, 3}; | 68 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -70,14 +70,14 @@ private: | |||
| 70 | rb.Push<u32>(id); // Any non zero value | 70 | rb.Push<u32>(id); // Any non zero value |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | void Finalize(Kernel::HLERequestContext& ctx) { | 73 | void Finalize(HLERequestContext& ctx) { |
| 74 | LOG_WARNING(Service_MM, "(STUBBED) called"); | 74 | LOG_WARNING(Service_MM, "(STUBBED) called"); |
| 75 | 75 | ||
| 76 | IPC::ResponseBuilder rb{ctx, 2}; | 76 | IPC::ResponseBuilder rb{ctx, 2}; |
| 77 | rb.Push(ResultSuccess); | 77 | rb.Push(ResultSuccess); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void SetAndWait(Kernel::HLERequestContext& ctx) { | 80 | void SetAndWait(HLERequestContext& ctx) { |
| 81 | IPC::RequestParser rp{ctx}; | 81 | IPC::RequestParser rp{ctx}; |
| 82 | u32 input_id = rp.Pop<u32>(); | 82 | u32 input_id = rp.Pop<u32>(); |
| 83 | min = rp.Pop<u32>(); | 83 | min = rp.Pop<u32>(); |
| @@ -90,7 +90,7 @@ private: | |||
| 90 | rb.Push(ResultSuccess); | 90 | rb.Push(ResultSuccess); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | void Get(Kernel::HLERequestContext& ctx) { | 93 | void Get(HLERequestContext& ctx) { |
| 94 | LOG_DEBUG(Service_MM, "(STUBBED) called"); | 94 | LOG_DEBUG(Service_MM, "(STUBBED) called"); |
| 95 | 95 | ||
| 96 | IPC::ResponseBuilder rb{ctx, 3}; | 96 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/mnpp/mnpp_app.cpp b/src/core/hle/service/mnpp/mnpp_app.cpp index 4ce4672b7..b11a92056 100644 --- a/src/core/hle/service/mnpp/mnpp_app.cpp +++ b/src/core/hle/service/mnpp/mnpp_app.cpp | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | 5 | #include "core/hle/service/ipc_helpers.h" |
| 6 | #include "core/hle/service/mnpp/mnpp_app.h" | 6 | #include "core/hle/service/mnpp/mnpp_app.h" |
| 7 | #include "core/hle/service/server_manager.h" | 7 | #include "core/hle/service/server_manager.h" |
| 8 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| @@ -23,14 +23,14 @@ public: | |||
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | private: | 25 | private: |
| 26 | void Unknown0(Kernel::HLERequestContext& ctx) { | 26 | void Unknown0(HLERequestContext& ctx) { |
| 27 | LOG_WARNING(Service_MNPP, "(STUBBED) called"); | 27 | LOG_WARNING(Service_MNPP, "(STUBBED) called"); |
| 28 | 28 | ||
| 29 | IPC::ResponseBuilder rb{ctx, 2}; | 29 | IPC::ResponseBuilder rb{ctx, 2}; |
| 30 | rb.Push(ResultSuccess); | 30 | rb.Push(ResultSuccess); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | void Unknown1(Kernel::HLERequestContext& ctx) { | 33 | void Unknown1(HLERequestContext& ctx) { |
| 34 | LOG_WARNING(Service_MNPP, "(STUBBED) called"); | 34 | LOG_WARNING(Service_MNPP, "(STUBBED) called"); |
| 35 | 35 | ||
| 36 | IPC::ResponseBuilder rb{ctx, 2}; | 36 | IPC::ResponseBuilder rb{ctx, 2}; |
diff --git a/src/core/hle/service/ncm/ncm.cpp b/src/core/hle/service/ncm/ncm.cpp index 5ab24dc34..650666d6b 100644 --- a/src/core/hle/service/ncm/ncm.cpp +++ b/src/core/hle/service/ncm/ncm.cpp | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/file_sys/romfs_factory.h" | 6 | #include "core/file_sys/romfs_factory.h" |
| 7 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/service/ipc_helpers.h" |
| 8 | #include "core/hle/service/ncm/ncm.h" | 8 | #include "core/hle/service/ncm/ncm.h" |
| 9 | #include "core/hle/service/server_manager.h" | 9 | #include "core/hle/service/server_manager.h" |
| 10 | #include "core/hle/service/service.h" | 10 | #include "core/hle/service/service.h" |
diff --git a/src/core/hle/service/nfc/mifare_user.cpp b/src/core/hle/service/nfc/mifare_user.cpp index 51523a3ae..e0bbd46e1 100644 --- a/src/core/hle/service/nfc/mifare_user.cpp +++ b/src/core/hle/service/nfc/mifare_user.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hid/hid_types.h" | 6 | #include "core/hid/hid_types.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/kernel/k_event.h" | 7 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/nfc/mifare_user.h" | 9 | #include "core/hle/service/nfc/mifare_user.h" |
| 10 | #include "core/hle/service/nfc/nfc_device.h" | 10 | #include "core/hle/service/nfc/nfc_device.h" |
| 11 | #include "core/hle/service/nfc/nfc_result.h" | 11 | #include "core/hle/service/nfc/nfc_result.h" |
| @@ -45,7 +45,7 @@ MFIUser ::~MFIUser() { | |||
| 45 | availability_change_event->Close(); | 45 | availability_change_event->Close(); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | void MFIUser::Initialize(Kernel::HLERequestContext& ctx) { | 48 | void MFIUser::Initialize(HLERequestContext& ctx) { |
| 49 | LOG_INFO(Service_NFC, "called"); | 49 | LOG_INFO(Service_NFC, "called"); |
| 50 | 50 | ||
| 51 | state = State::Initialized; | 51 | state = State::Initialized; |
| @@ -58,7 +58,7 @@ void MFIUser::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 58 | rb.Push(ResultSuccess); | 58 | rb.Push(ResultSuccess); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | void MFIUser::Finalize(Kernel::HLERequestContext& ctx) { | 61 | void MFIUser::Finalize(HLERequestContext& ctx) { |
| 62 | LOG_INFO(Service_NFC, "called"); | 62 | LOG_INFO(Service_NFC, "called"); |
| 63 | 63 | ||
| 64 | state = State::NonInitialized; | 64 | state = State::NonInitialized; |
| @@ -71,7 +71,7 @@ void MFIUser::Finalize(Kernel::HLERequestContext& ctx) { | |||
| 71 | rb.Push(ResultSuccess); | 71 | rb.Push(ResultSuccess); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | void MFIUser::ListDevices(Kernel::HLERequestContext& ctx) { | 74 | void MFIUser::ListDevices(HLERequestContext& ctx) { |
| 75 | LOG_DEBUG(Service_NFC, "called"); | 75 | LOG_DEBUG(Service_NFC, "called"); |
| 76 | 76 | ||
| 77 | if (state == State::NonInitialized) { | 77 | if (state == State::NonInitialized) { |
| @@ -117,7 +117,7 @@ void MFIUser::ListDevices(Kernel::HLERequestContext& ctx) { | |||
| 117 | rb.Push(static_cast<s32>(nfp_devices.size())); | 117 | rb.Push(static_cast<s32>(nfp_devices.size())); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void MFIUser::StartDetection(Kernel::HLERequestContext& ctx) { | 120 | void MFIUser::StartDetection(HLERequestContext& ctx) { |
| 121 | IPC::RequestParser rp{ctx}; | 121 | IPC::RequestParser rp{ctx}; |
| 122 | const auto device_handle{rp.Pop<u64>()}; | 122 | const auto device_handle{rp.Pop<u64>()}; |
| 123 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); | 123 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -141,7 +141,7 @@ void MFIUser::StartDetection(Kernel::HLERequestContext& ctx) { | |||
| 141 | rb.Push(result); | 141 | rb.Push(result); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | void MFIUser::StopDetection(Kernel::HLERequestContext& ctx) { | 144 | void MFIUser::StopDetection(HLERequestContext& ctx) { |
| 145 | IPC::RequestParser rp{ctx}; | 145 | IPC::RequestParser rp{ctx}; |
| 146 | const auto device_handle{rp.Pop<u64>()}; | 146 | const auto device_handle{rp.Pop<u64>()}; |
| 147 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); | 147 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -165,7 +165,7 @@ void MFIUser::StopDetection(Kernel::HLERequestContext& ctx) { | |||
| 165 | rb.Push(result); | 165 | rb.Push(result); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void MFIUser::Read(Kernel::HLERequestContext& ctx) { | 168 | void MFIUser::Read(HLERequestContext& ctx) { |
| 169 | IPC::RequestParser rp{ctx}; | 169 | IPC::RequestParser rp{ctx}; |
| 170 | const auto device_handle{rp.Pop<u64>()}; | 170 | const auto device_handle{rp.Pop<u64>()}; |
| 171 | const auto buffer{ctx.ReadBuffer()}; | 171 | const auto buffer{ctx.ReadBuffer()}; |
| @@ -206,7 +206,7 @@ void MFIUser::Read(Kernel::HLERequestContext& ctx) { | |||
| 206 | rb.Push(result); | 206 | rb.Push(result); |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | void MFIUser::Write(Kernel::HLERequestContext& ctx) { | 209 | void MFIUser::Write(HLERequestContext& ctx) { |
| 210 | IPC::RequestParser rp{ctx}; | 210 | IPC::RequestParser rp{ctx}; |
| 211 | const auto device_handle{rp.Pop<u64>()}; | 211 | const auto device_handle{rp.Pop<u64>()}; |
| 212 | const auto buffer{ctx.ReadBuffer()}; | 212 | const auto buffer{ctx.ReadBuffer()}; |
| @@ -250,7 +250,7 @@ void MFIUser::Write(Kernel::HLERequestContext& ctx) { | |||
| 250 | rb.Push(result); | 250 | rb.Push(result); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | void MFIUser::GetTagInfo(Kernel::HLERequestContext& ctx) { | 253 | void MFIUser::GetTagInfo(HLERequestContext& ctx) { |
| 254 | IPC::RequestParser rp{ctx}; | 254 | IPC::RequestParser rp{ctx}; |
| 255 | const auto device_handle{rp.Pop<u64>()}; | 255 | const auto device_handle{rp.Pop<u64>()}; |
| 256 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); | 256 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -276,7 +276,7 @@ void MFIUser::GetTagInfo(Kernel::HLERequestContext& ctx) { | |||
| 276 | rb.Push(result); | 276 | rb.Push(result); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | void MFIUser::GetActivateEventHandle(Kernel::HLERequestContext& ctx) { | 279 | void MFIUser::GetActivateEventHandle(HLERequestContext& ctx) { |
| 280 | IPC::RequestParser rp{ctx}; | 280 | IPC::RequestParser rp{ctx}; |
| 281 | const auto device_handle{rp.Pop<u64>()}; | 281 | const auto device_handle{rp.Pop<u64>()}; |
| 282 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 282 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -300,7 +300,7 @@ void MFIUser::GetActivateEventHandle(Kernel::HLERequestContext& ctx) { | |||
| 300 | rb.PushCopyObjects(device.value()->GetActivateEvent()); | 300 | rb.PushCopyObjects(device.value()->GetActivateEvent()); |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | void MFIUser::GetDeactivateEventHandle(Kernel::HLERequestContext& ctx) { | 303 | void MFIUser::GetDeactivateEventHandle(HLERequestContext& ctx) { |
| 304 | IPC::RequestParser rp{ctx}; | 304 | IPC::RequestParser rp{ctx}; |
| 305 | const auto device_handle{rp.Pop<u64>()}; | 305 | const auto device_handle{rp.Pop<u64>()}; |
| 306 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 306 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -324,7 +324,7 @@ void MFIUser::GetDeactivateEventHandle(Kernel::HLERequestContext& ctx) { | |||
| 324 | rb.PushCopyObjects(device.value()->GetDeactivateEvent()); | 324 | rb.PushCopyObjects(device.value()->GetDeactivateEvent()); |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | void MFIUser::GetState(Kernel::HLERequestContext& ctx) { | 327 | void MFIUser::GetState(HLERequestContext& ctx) { |
| 328 | LOG_DEBUG(Service_NFC, "called"); | 328 | LOG_DEBUG(Service_NFC, "called"); |
| 329 | 329 | ||
| 330 | IPC::ResponseBuilder rb{ctx, 3}; | 330 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -332,7 +332,7 @@ void MFIUser::GetState(Kernel::HLERequestContext& ctx) { | |||
| 332 | rb.PushEnum(state); | 332 | rb.PushEnum(state); |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | void MFIUser::GetDeviceState(Kernel::HLERequestContext& ctx) { | 335 | void MFIUser::GetDeviceState(HLERequestContext& ctx) { |
| 336 | IPC::RequestParser rp{ctx}; | 336 | IPC::RequestParser rp{ctx}; |
| 337 | const auto device_handle{rp.Pop<u64>()}; | 337 | const auto device_handle{rp.Pop<u64>()}; |
| 338 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 338 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -350,7 +350,7 @@ void MFIUser::GetDeviceState(Kernel::HLERequestContext& ctx) { | |||
| 350 | rb.PushEnum(device.value()->GetCurrentState()); | 350 | rb.PushEnum(device.value()->GetCurrentState()); |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | void MFIUser::GetNpadId(Kernel::HLERequestContext& ctx) { | 353 | void MFIUser::GetNpadId(HLERequestContext& ctx) { |
| 354 | IPC::RequestParser rp{ctx}; | 354 | IPC::RequestParser rp{ctx}; |
| 355 | const auto device_handle{rp.Pop<u64>()}; | 355 | const auto device_handle{rp.Pop<u64>()}; |
| 356 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 356 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -374,7 +374,7 @@ void MFIUser::GetNpadId(Kernel::HLERequestContext& ctx) { | |||
| 374 | rb.PushEnum(device.value()->GetNpadId()); | 374 | rb.PushEnum(device.value()->GetNpadId()); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | void MFIUser::GetAvailabilityChangeEventHandle(Kernel::HLERequestContext& ctx) { | 377 | void MFIUser::GetAvailabilityChangeEventHandle(HLERequestContext& ctx) { |
| 378 | LOG_INFO(Service_NFC, "called"); | 378 | LOG_INFO(Service_NFC, "called"); |
| 379 | 379 | ||
| 380 | if (state == State::NonInitialized) { | 380 | if (state == State::NonInitialized) { |
diff --git a/src/core/hle/service/nfc/mifare_user.h b/src/core/hle/service/nfc/mifare_user.h index 0e0638cb6..9701f1d7f 100644 --- a/src/core/hle/service/nfc/mifare_user.h +++ b/src/core/hle/service/nfc/mifare_user.h | |||
| @@ -24,20 +24,20 @@ private: | |||
| 24 | Initialized, | 24 | Initialized, |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | void Initialize(Kernel::HLERequestContext& ctx); | 27 | void Initialize(HLERequestContext& ctx); |
| 28 | void Finalize(Kernel::HLERequestContext& ctx); | 28 | void Finalize(HLERequestContext& ctx); |
| 29 | void ListDevices(Kernel::HLERequestContext& ctx); | 29 | void ListDevices(HLERequestContext& ctx); |
| 30 | void StartDetection(Kernel::HLERequestContext& ctx); | 30 | void StartDetection(HLERequestContext& ctx); |
| 31 | void StopDetection(Kernel::HLERequestContext& ctx); | 31 | void StopDetection(HLERequestContext& ctx); |
| 32 | void Read(Kernel::HLERequestContext& ctx); | 32 | void Read(HLERequestContext& ctx); |
| 33 | void Write(Kernel::HLERequestContext& ctx); | 33 | void Write(HLERequestContext& ctx); |
| 34 | void GetTagInfo(Kernel::HLERequestContext& ctx); | 34 | void GetTagInfo(HLERequestContext& ctx); |
| 35 | void GetActivateEventHandle(Kernel::HLERequestContext& ctx); | 35 | void GetActivateEventHandle(HLERequestContext& ctx); |
| 36 | void GetDeactivateEventHandle(Kernel::HLERequestContext& ctx); | 36 | void GetDeactivateEventHandle(HLERequestContext& ctx); |
| 37 | void GetState(Kernel::HLERequestContext& ctx); | 37 | void GetState(HLERequestContext& ctx); |
| 38 | void GetDeviceState(Kernel::HLERequestContext& ctx); | 38 | void GetDeviceState(HLERequestContext& ctx); |
| 39 | void GetNpadId(Kernel::HLERequestContext& ctx); | 39 | void GetNpadId(HLERequestContext& ctx); |
| 40 | void GetAvailabilityChangeEventHandle(Kernel::HLERequestContext& ctx); | 40 | void GetAvailabilityChangeEventHandle(HLERequestContext& ctx); |
| 41 | 41 | ||
| 42 | std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle); | 42 | std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle); |
| 43 | 43 | ||
diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index 34612b9df..6595e34ed 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "common/settings.h" | 7 | #include "common/settings.h" |
| 8 | #include "core/hle/ipc_helpers.h" | 8 | #include "core/hle/service/ipc_helpers.h" |
| 9 | #include "core/hle/service/nfc/mifare_user.h" | 9 | #include "core/hle/service/nfc/mifare_user.h" |
| 10 | #include "core/hle/service/nfc/nfc.h" | 10 | #include "core/hle/service/nfc/nfc.h" |
| 11 | #include "core/hle/service/nfc/nfc_user.h" | 11 | #include "core/hle/service/nfc/nfc_user.h" |
| @@ -42,7 +42,7 @@ public: | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | private: | 44 | private: |
| 45 | void CreateAmInterface(Kernel::HLERequestContext& ctx) { | 45 | void CreateAmInterface(HLERequestContext& ctx) { |
| 46 | LOG_DEBUG(Service_NFC, "called"); | 46 | LOG_DEBUG(Service_NFC, "called"); |
| 47 | 47 | ||
| 48 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 48 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -64,7 +64,7 @@ public: | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | private: | 66 | private: |
| 67 | void CreateUserInterface(Kernel::HLERequestContext& ctx) { | 67 | void CreateUserInterface(HLERequestContext& ctx) { |
| 68 | LOG_DEBUG(Service_NFC, "called"); | 68 | LOG_DEBUG(Service_NFC, "called"); |
| 69 | 69 | ||
| 70 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 70 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -86,7 +86,7 @@ public: | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | private: | 88 | private: |
| 89 | void CreateUserInterface(Kernel::HLERequestContext& ctx) { | 89 | void CreateUserInterface(HLERequestContext& ctx) { |
| 90 | LOG_DEBUG(Service_NFC, "called"); | 90 | LOG_DEBUG(Service_NFC, "called"); |
| 91 | 91 | ||
| 92 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 92 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -145,7 +145,7 @@ public: | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | private: | 147 | private: |
| 148 | void CreateSystemInterface(Kernel::HLERequestContext& ctx) { | 148 | void CreateSystemInterface(HLERequestContext& ctx) { |
| 149 | LOG_DEBUG(Service_NFC, "called"); | 149 | LOG_DEBUG(Service_NFC, "called"); |
| 150 | 150 | ||
| 151 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 151 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/nfc/nfc_device.cpp b/src/core/hle/service/nfc/nfc_device.cpp index 9a3234e8c..3f17d0c7a 100644 --- a/src/core/hle/service/nfc/nfc_device.cpp +++ b/src/core/hle/service/nfc/nfc_device.cpp | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include "core/hid/emulated_controller.h" | 7 | #include "core/hid/emulated_controller.h" |
| 8 | #include "core/hid/hid_core.h" | 8 | #include "core/hid/hid_core.h" |
| 9 | #include "core/hid/hid_types.h" | 9 | #include "core/hid/hid_types.h" |
| 10 | #include "core/hle/ipc_helpers.h" | ||
| 11 | #include "core/hle/kernel/k_event.h" | 10 | #include "core/hle/kernel/k_event.h" |
| 11 | #include "core/hle/service/ipc_helpers.h" | ||
| 12 | #include "core/hle/service/nfc/nfc_device.h" | 12 | #include "core/hle/service/nfc/nfc_device.h" |
| 13 | #include "core/hle/service/nfc/nfc_result.h" | 13 | #include "core/hle/service/nfc/nfc_result.h" |
| 14 | #include "core/hle/service/nfc/nfc_user.h" | 14 | #include "core/hle/service/nfc/nfc_user.h" |
diff --git a/src/core/hle/service/nfc/nfc_user.cpp b/src/core/hle/service/nfc/nfc_user.cpp index 89aa6b3f5..7c162a4f3 100644 --- a/src/core/hle/service/nfc/nfc_user.cpp +++ b/src/core/hle/service/nfc/nfc_user.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hid/hid_types.h" | 6 | #include "core/hid/hid_types.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/kernel/k_event.h" | 7 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/nfc/nfc_device.h" | 9 | #include "core/hle/service/nfc/nfc_device.h" |
| 10 | #include "core/hle/service/nfc/nfc_result.h" | 10 | #include "core/hle/service/nfc/nfc_result.h" |
| 11 | #include "core/hle/service/nfc/nfc_user.h" | 11 | #include "core/hle/service/nfc/nfc_user.h" |
| @@ -54,7 +54,7 @@ IUser ::~IUser() { | |||
| 54 | availability_change_event->Close(); | 54 | availability_change_event->Close(); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | void IUser::Initialize(Kernel::HLERequestContext& ctx) { | 57 | void IUser::Initialize(HLERequestContext& ctx) { |
| 58 | LOG_INFO(Service_NFC, "called"); | 58 | LOG_INFO(Service_NFC, "called"); |
| 59 | 59 | ||
| 60 | state = State::Initialized; | 60 | state = State::Initialized; |
| @@ -67,7 +67,7 @@ void IUser::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 67 | rb.Push(ResultSuccess); | 67 | rb.Push(ResultSuccess); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | void IUser::Finalize(Kernel::HLERequestContext& ctx) { | 70 | void IUser::Finalize(HLERequestContext& ctx) { |
| 71 | LOG_INFO(Service_NFC, "called"); | 71 | LOG_INFO(Service_NFC, "called"); |
| 72 | 72 | ||
| 73 | state = State::NonInitialized; | 73 | state = State::NonInitialized; |
| @@ -80,7 +80,7 @@ void IUser::Finalize(Kernel::HLERequestContext& ctx) { | |||
| 80 | rb.Push(ResultSuccess); | 80 | rb.Push(ResultSuccess); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | void IUser::GetState(Kernel::HLERequestContext& ctx) { | 83 | void IUser::GetState(HLERequestContext& ctx) { |
| 84 | LOG_DEBUG(Service_NFC, "called"); | 84 | LOG_DEBUG(Service_NFC, "called"); |
| 85 | 85 | ||
| 86 | IPC::ResponseBuilder rb{ctx, 3}; | 86 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -88,7 +88,7 @@ void IUser::GetState(Kernel::HLERequestContext& ctx) { | |||
| 88 | rb.PushEnum(state); | 88 | rb.PushEnum(state); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void IUser::IsNfcEnabled(Kernel::HLERequestContext& ctx) { | 91 | void IUser::IsNfcEnabled(HLERequestContext& ctx) { |
| 92 | LOG_DEBUG(Service_NFC, "called"); | 92 | LOG_DEBUG(Service_NFC, "called"); |
| 93 | 93 | ||
| 94 | IPC::ResponseBuilder rb{ctx, 3}; | 94 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -96,7 +96,7 @@ void IUser::IsNfcEnabled(Kernel::HLERequestContext& ctx) { | |||
| 96 | rb.Push(state != State::NonInitialized); | 96 | rb.Push(state != State::NonInitialized); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | void IUser::ListDevices(Kernel::HLERequestContext& ctx) { | 99 | void IUser::ListDevices(HLERequestContext& ctx) { |
| 100 | LOG_DEBUG(Service_NFC, "called"); | 100 | LOG_DEBUG(Service_NFC, "called"); |
| 101 | 101 | ||
| 102 | if (state == State::NonInitialized) { | 102 | if (state == State::NonInitialized) { |
| @@ -142,7 +142,7 @@ void IUser::ListDevices(Kernel::HLERequestContext& ctx) { | |||
| 142 | rb.Push(static_cast<s32>(nfp_devices.size())); | 142 | rb.Push(static_cast<s32>(nfp_devices.size())); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) { | 145 | void IUser::GetDeviceState(HLERequestContext& ctx) { |
| 146 | IPC::RequestParser rp{ctx}; | 146 | IPC::RequestParser rp{ctx}; |
| 147 | const auto device_handle{rp.Pop<u64>()}; | 147 | const auto device_handle{rp.Pop<u64>()}; |
| 148 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 148 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -160,7 +160,7 @@ void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) { | |||
| 160 | rb.PushEnum(device.value()->GetCurrentState()); | 160 | rb.PushEnum(device.value()->GetCurrentState()); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | void IUser::GetNpadId(Kernel::HLERequestContext& ctx) { | 163 | void IUser::GetNpadId(HLERequestContext& ctx) { |
| 164 | IPC::RequestParser rp{ctx}; | 164 | IPC::RequestParser rp{ctx}; |
| 165 | const auto device_handle{rp.Pop<u64>()}; | 165 | const auto device_handle{rp.Pop<u64>()}; |
| 166 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 166 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -184,7 +184,7 @@ void IUser::GetNpadId(Kernel::HLERequestContext& ctx) { | |||
| 184 | rb.PushEnum(device.value()->GetNpadId()); | 184 | rb.PushEnum(device.value()->GetNpadId()); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) { | 187 | void IUser::AttachAvailabilityChangeEvent(HLERequestContext& ctx) { |
| 188 | LOG_INFO(Service_NFC, "called"); | 188 | LOG_INFO(Service_NFC, "called"); |
| 189 | 189 | ||
| 190 | if (state == State::NonInitialized) { | 190 | if (state == State::NonInitialized) { |
| @@ -198,7 +198,7 @@ void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) { | |||
| 198 | rb.PushCopyObjects(availability_change_event->GetReadableEvent()); | 198 | rb.PushCopyObjects(availability_change_event->GetReadableEvent()); |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | void IUser::StartDetection(Kernel::HLERequestContext& ctx) { | 201 | void IUser::StartDetection(HLERequestContext& ctx) { |
| 202 | IPC::RequestParser rp{ctx}; | 202 | IPC::RequestParser rp{ctx}; |
| 203 | const auto device_handle{rp.Pop<u64>()}; | 203 | const auto device_handle{rp.Pop<u64>()}; |
| 204 | const auto nfp_protocol{rp.PopEnum<NFP::TagProtocol>()}; | 204 | const auto nfp_protocol{rp.PopEnum<NFP::TagProtocol>()}; |
| @@ -223,7 +223,7 @@ void IUser::StartDetection(Kernel::HLERequestContext& ctx) { | |||
| 223 | rb.Push(result); | 223 | rb.Push(result); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | void IUser::StopDetection(Kernel::HLERequestContext& ctx) { | 226 | void IUser::StopDetection(HLERequestContext& ctx) { |
| 227 | IPC::RequestParser rp{ctx}; | 227 | IPC::RequestParser rp{ctx}; |
| 228 | const auto device_handle{rp.Pop<u64>()}; | 228 | const auto device_handle{rp.Pop<u64>()}; |
| 229 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); | 229 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -247,7 +247,7 @@ void IUser::StopDetection(Kernel::HLERequestContext& ctx) { | |||
| 247 | rb.Push(result); | 247 | rb.Push(result); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) { | 250 | void IUser::GetTagInfo(HLERequestContext& ctx) { |
| 251 | IPC::RequestParser rp{ctx}; | 251 | IPC::RequestParser rp{ctx}; |
| 252 | const auto device_handle{rp.Pop<u64>()}; | 252 | const auto device_handle{rp.Pop<u64>()}; |
| 253 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); | 253 | LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -273,7 +273,7 @@ void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) { | |||
| 273 | rb.Push(result); | 273 | rb.Push(result); |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) { | 276 | void IUser::AttachActivateEvent(HLERequestContext& ctx) { |
| 277 | IPC::RequestParser rp{ctx}; | 277 | IPC::RequestParser rp{ctx}; |
| 278 | const auto device_handle{rp.Pop<u64>()}; | 278 | const auto device_handle{rp.Pop<u64>()}; |
| 279 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 279 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -297,7 +297,7 @@ void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) { | |||
| 297 | rb.PushCopyObjects(device.value()->GetActivateEvent()); | 297 | rb.PushCopyObjects(device.value()->GetActivateEvent()); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) { | 300 | void IUser::AttachDeactivateEvent(HLERequestContext& ctx) { |
| 301 | IPC::RequestParser rp{ctx}; | 301 | IPC::RequestParser rp{ctx}; |
| 302 | const auto device_handle{rp.Pop<u64>()}; | 302 | const auto device_handle{rp.Pop<u64>()}; |
| 303 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); | 303 | LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); |
| @@ -321,7 +321,7 @@ void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) { | |||
| 321 | rb.PushCopyObjects(device.value()->GetDeactivateEvent()); | 321 | rb.PushCopyObjects(device.value()->GetDeactivateEvent()); |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | void IUser::SendCommandByPassThrough(Kernel::HLERequestContext& ctx) { | 324 | void IUser::SendCommandByPassThrough(HLERequestContext& ctx) { |
| 325 | IPC::RequestParser rp{ctx}; | 325 | IPC::RequestParser rp{ctx}; |
| 326 | const auto device_handle{rp.Pop<u64>()}; | 326 | const auto device_handle{rp.Pop<u64>()}; |
| 327 | const auto timeout{rp.PopRaw<Time::Clock::TimeSpanType>()}; | 327 | const auto timeout{rp.PopRaw<Time::Clock::TimeSpanType>()}; |
diff --git a/src/core/hle/service/nfc/nfc_user.h b/src/core/hle/service/nfc/nfc_user.h index a5a4f12f9..aee046ae8 100644 --- a/src/core/hle/service/nfc/nfc_user.h +++ b/src/core/hle/service/nfc/nfc_user.h | |||
| @@ -24,20 +24,20 @@ private: | |||
| 24 | Initialized, | 24 | Initialized, |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | void Initialize(Kernel::HLERequestContext& ctx); | 27 | void Initialize(HLERequestContext& ctx); |
| 28 | void Finalize(Kernel::HLERequestContext& ctx); | 28 | void Finalize(HLERequestContext& ctx); |
| 29 | void GetState(Kernel::HLERequestContext& ctx); | 29 | void GetState(HLERequestContext& ctx); |
| 30 | void IsNfcEnabled(Kernel::HLERequestContext& ctx); | 30 | void IsNfcEnabled(HLERequestContext& ctx); |
| 31 | void ListDevices(Kernel::HLERequestContext& ctx); | 31 | void ListDevices(HLERequestContext& ctx); |
| 32 | void GetDeviceState(Kernel::HLERequestContext& ctx); | 32 | void GetDeviceState(HLERequestContext& ctx); |
| 33 | void GetNpadId(Kernel::HLERequestContext& ctx); | 33 | void GetNpadId(HLERequestContext& ctx); |
| 34 | void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx); | 34 | void AttachAvailabilityChangeEvent(HLERequestContext& ctx); |
| 35 | void StartDetection(Kernel::HLERequestContext& ctx); | 35 | void StartDetection(HLERequestContext& ctx); |
| 36 | void StopDetection(Kernel::HLERequestContext& ctx); | 36 | void StopDetection(HLERequestContext& ctx); |
| 37 | void GetTagInfo(Kernel::HLERequestContext& ctx); | 37 | void GetTagInfo(HLERequestContext& ctx); |
| 38 | void AttachActivateEvent(Kernel::HLERequestContext& ctx); | 38 | void AttachActivateEvent(HLERequestContext& ctx); |
| 39 | void AttachDeactivateEvent(Kernel::HLERequestContext& ctx); | 39 | void AttachDeactivateEvent(HLERequestContext& ctx); |
| 40 | void SendCommandByPassThrough(Kernel::HLERequestContext& ctx); | 40 | void SendCommandByPassThrough(HLERequestContext& ctx); |
| 41 | 41 | ||
| 42 | std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle); | 42 | std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle); |
| 43 | 43 | ||
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 1b59aba8e..e262dc2f2 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | 5 | #include "core/hle/service/ipc_helpers.h" |
| 6 | #include "core/hle/service/nfp/nfp.h" | 6 | #include "core/hle/service/nfp/nfp.h" |
| 7 | #include "core/hle/service/nfp/nfp_user.h" | 7 | #include "core/hle/service/nfp/nfp_user.h" |
| 8 | #include "core/hle/service/server_manager.h" | 8 | #include "core/hle/service/server_manager.h" |
| @@ -22,7 +22,7 @@ public: | |||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | private: | 24 | private: |
| 25 | void CreateUserInterface(Kernel::HLERequestContext& ctx) { | 25 | void CreateUserInterface(HLERequestContext& ctx) { |
| 26 | LOG_DEBUG(Service_NFP, "called"); | 26 | LOG_DEBUG(Service_NFP, "called"); |
| 27 | 27 | ||
| 28 | if (user_interface == nullptr) { | 28 | if (user_interface == nullptr) { |
diff --git a/src/core/hle/service/nfp/nfp_device.cpp b/src/core/hle/service/nfp/nfp_device.cpp index 7a6bbbba7..1bdc42741 100644 --- a/src/core/hle/service/nfp/nfp_device.cpp +++ b/src/core/hle/service/nfp/nfp_device.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | #include "core/hid/emulated_controller.h" | 11 | #include "core/hid/emulated_controller.h" |
| 12 | #include "core/hid/hid_core.h" | 12 | #include "core/hid/hid_core.h" |
| 13 | #include "core/hid/hid_types.h" | 13 | #include "core/hid/hid_types.h" |
| 14 | #include "core/hle/ipc_helpers.h" | ||
| 15 | #include "core/hle/kernel/k_event.h" | 14 | #include "core/hle/kernel/k_event.h" |
| 15 | #include "core/hle/service/ipc_helpers.h" | ||
| 16 | #include "core/hle/service/mii/mii_manager.h" | 16 | #include "core/hle/service/mii/mii_manager.h" |
| 17 | #include "core/hle/service/mii/types.h" | 17 | #include "core/hle/service/mii/types.h" |
| 18 | #include "core/hle/service/nfp/amiibo_crypto.h" | 18 | #include "core/hle/service/nfp/amiibo_crypto.h" |
diff --git a/src/core/hle/service/nfp/nfp_user.cpp b/src/core/hle/service/nfp/nfp_user.cpp index a4d3d1bc7..4e8534113 100644 --- a/src/core/hle/service/nfp/nfp_user.cpp +++ b/src/core/hle/service/nfp/nfp_user.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hid/hid_types.h" | 6 | #include "core/hid/hid_types.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/kernel/k_event.h" | 7 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/nfp/nfp_device.h" | 9 | #include "core/hle/service/nfp/nfp_device.h" |
| 10 | #include "core/hle/service/nfp/nfp_result.h" | 10 | #include "core/hle/service/nfp/nfp_result.h" |
| 11 | #include "core/hle/service/nfp/nfp_user.h" | 11 | #include "core/hle/service/nfp/nfp_user.h" |
| @@ -56,7 +56,7 @@ IUser ::~IUser() { | |||
| 56 | availability_change_event->Close(); | 56 | availability_change_event->Close(); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void IUser::Initialize(Kernel::HLERequestContext& ctx) { | 59 | void IUser::Initialize(HLERequestContext& ctx) { |
| 60 | LOG_INFO(Service_NFP, "called"); | 60 | LOG_INFO(Service_NFP, "called"); |
| 61 | 61 | ||
| 62 | state = State::Initialized; | 62 | state = State::Initialized; |
| @@ -69,7 +69,7 @@ void IUser::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 69 | rb.Push(ResultSuccess); | 69 | rb.Push(ResultSuccess); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | void IUser::Finalize(Kernel::HLERequestContext& ctx) { | 72 | void IUser::Finalize(HLERequestContext& ctx) { |
| 73 | LOG_INFO(Service_NFP, "called"); | 73 | LOG_INFO(Service_NFP, "called"); |
| 74 | 74 | ||
| 75 | state = State::NonInitialized; | 75 | state = State::NonInitialized; |
| @@ -82,7 +82,7 @@ void IUser::Finalize(Kernel::HLERequestContext& ctx) { | |||
| 82 | rb.Push(ResultSuccess); | 82 | rb.Push(ResultSuccess); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void IUser::ListDevices(Kernel::HLERequestContext& ctx) { | 85 | void IUser::ListDevices(HLERequestContext& ctx) { |
| 86 | LOG_DEBUG(Service_NFP, "called"); | 86 | LOG_DEBUG(Service_NFP, "called"); |
| 87 | 87 | ||
| 88 | if (state == State::NonInitialized) { | 88 | if (state == State::NonInitialized) { |
| @@ -128,7 +128,7 @@ void IUser::ListDevices(Kernel::HLERequestContext& ctx) { | |||
| 128 | rb.Push(static_cast<s32>(nfp_devices.size())); | 128 | rb.Push(static_cast<s32>(nfp_devices.size())); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | void IUser::StartDetection(Kernel::HLERequestContext& ctx) { | 131 | void IUser::StartDetection(HLERequestContext& ctx) { |
| 132 | IPC::RequestParser rp{ctx}; | 132 | IPC::RequestParser rp{ctx}; |
| 133 | const auto device_handle{rp.Pop<u64>()}; | 133 | const auto device_handle{rp.Pop<u64>()}; |
| 134 | const auto nfp_protocol{rp.PopEnum<TagProtocol>()}; | 134 | const auto nfp_protocol{rp.PopEnum<TagProtocol>()}; |
| @@ -153,7 +153,7 @@ void IUser::StartDetection(Kernel::HLERequestContext& ctx) { | |||
| 153 | rb.Push(result); | 153 | rb.Push(result); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | void IUser::StopDetection(Kernel::HLERequestContext& ctx) { | 156 | void IUser::StopDetection(HLERequestContext& ctx) { |
| 157 | IPC::RequestParser rp{ctx}; | 157 | IPC::RequestParser rp{ctx}; |
| 158 | const auto device_handle{rp.Pop<u64>()}; | 158 | const auto device_handle{rp.Pop<u64>()}; |
| 159 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 159 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -177,7 +177,7 @@ void IUser::StopDetection(Kernel::HLERequestContext& ctx) { | |||
| 177 | rb.Push(result); | 177 | rb.Push(result); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void IUser::Mount(Kernel::HLERequestContext& ctx) { | 180 | void IUser::Mount(HLERequestContext& ctx) { |
| 181 | IPC::RequestParser rp{ctx}; | 181 | IPC::RequestParser rp{ctx}; |
| 182 | const auto device_handle{rp.Pop<u64>()}; | 182 | const auto device_handle{rp.Pop<u64>()}; |
| 183 | const auto model_type{rp.PopEnum<ModelType>()}; | 183 | const auto model_type{rp.PopEnum<ModelType>()}; |
| @@ -204,7 +204,7 @@ void IUser::Mount(Kernel::HLERequestContext& ctx) { | |||
| 204 | rb.Push(result); | 204 | rb.Push(result); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | void IUser::Unmount(Kernel::HLERequestContext& ctx) { | 207 | void IUser::Unmount(HLERequestContext& ctx) { |
| 208 | IPC::RequestParser rp{ctx}; | 208 | IPC::RequestParser rp{ctx}; |
| 209 | const auto device_handle{rp.Pop<u64>()}; | 209 | const auto device_handle{rp.Pop<u64>()}; |
| 210 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 210 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -228,7 +228,7 @@ void IUser::Unmount(Kernel::HLERequestContext& ctx) { | |||
| 228 | rb.Push(result); | 228 | rb.Push(result); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void IUser::OpenApplicationArea(Kernel::HLERequestContext& ctx) { | 231 | void IUser::OpenApplicationArea(HLERequestContext& ctx) { |
| 232 | IPC::RequestParser rp{ctx}; | 232 | IPC::RequestParser rp{ctx}; |
| 233 | const auto device_handle{rp.Pop<u64>()}; | 233 | const auto device_handle{rp.Pop<u64>()}; |
| 234 | const auto access_id{rp.Pop<u32>()}; | 234 | const auto access_id{rp.Pop<u32>()}; |
| @@ -253,7 +253,7 @@ void IUser::OpenApplicationArea(Kernel::HLERequestContext& ctx) { | |||
| 253 | rb.Push(result); | 253 | rb.Push(result); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | void IUser::GetApplicationArea(Kernel::HLERequestContext& ctx) { | 256 | void IUser::GetApplicationArea(HLERequestContext& ctx) { |
| 257 | IPC::RequestParser rp{ctx}; | 257 | IPC::RequestParser rp{ctx}; |
| 258 | const auto device_handle{rp.Pop<u64>()}; | 258 | const auto device_handle{rp.Pop<u64>()}; |
| 259 | const auto data_size = ctx.GetWriteBufferSize(); | 259 | const auto data_size = ctx.GetWriteBufferSize(); |
| @@ -287,7 +287,7 @@ void IUser::GetApplicationArea(Kernel::HLERequestContext& ctx) { | |||
| 287 | rb.Push(static_cast<u32>(data_size)); | 287 | rb.Push(static_cast<u32>(data_size)); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | void IUser::SetApplicationArea(Kernel::HLERequestContext& ctx) { | 290 | void IUser::SetApplicationArea(HLERequestContext& ctx) { |
| 291 | IPC::RequestParser rp{ctx}; | 291 | IPC::RequestParser rp{ctx}; |
| 292 | const auto device_handle{rp.Pop<u64>()}; | 292 | const auto device_handle{rp.Pop<u64>()}; |
| 293 | const auto data{ctx.ReadBuffer()}; | 293 | const auto data{ctx.ReadBuffer()}; |
| @@ -318,7 +318,7 @@ void IUser::SetApplicationArea(Kernel::HLERequestContext& ctx) { | |||
| 318 | rb.Push(result); | 318 | rb.Push(result); |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | void IUser::Flush(Kernel::HLERequestContext& ctx) { | 321 | void IUser::Flush(HLERequestContext& ctx) { |
| 322 | IPC::RequestParser rp{ctx}; | 322 | IPC::RequestParser rp{ctx}; |
| 323 | const auto device_handle{rp.Pop<u64>()}; | 323 | const auto device_handle{rp.Pop<u64>()}; |
| 324 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 324 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -342,7 +342,7 @@ void IUser::Flush(Kernel::HLERequestContext& ctx) { | |||
| 342 | rb.Push(result); | 342 | rb.Push(result); |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | void IUser::Restore(Kernel::HLERequestContext& ctx) { | 345 | void IUser::Restore(HLERequestContext& ctx) { |
| 346 | IPC::RequestParser rp{ctx}; | 346 | IPC::RequestParser rp{ctx}; |
| 347 | const auto device_handle{rp.Pop<u64>()}; | 347 | const auto device_handle{rp.Pop<u64>()}; |
| 348 | LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle); | 348 | LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle); |
| @@ -366,7 +366,7 @@ void IUser::Restore(Kernel::HLERequestContext& ctx) { | |||
| 366 | rb.Push(result); | 366 | rb.Push(result); |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | void IUser::CreateApplicationArea(Kernel::HLERequestContext& ctx) { | 369 | void IUser::CreateApplicationArea(HLERequestContext& ctx) { |
| 370 | IPC::RequestParser rp{ctx}; | 370 | IPC::RequestParser rp{ctx}; |
| 371 | const auto device_handle{rp.Pop<u64>()}; | 371 | const auto device_handle{rp.Pop<u64>()}; |
| 372 | const auto access_id{rp.Pop<u32>()}; | 372 | const auto access_id{rp.Pop<u32>()}; |
| @@ -399,7 +399,7 @@ void IUser::CreateApplicationArea(Kernel::HLERequestContext& ctx) { | |||
| 399 | rb.Push(result); | 399 | rb.Push(result); |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) { | 402 | void IUser::GetTagInfo(HLERequestContext& ctx) { |
| 403 | IPC::RequestParser rp{ctx}; | 403 | IPC::RequestParser rp{ctx}; |
| 404 | const auto device_handle{rp.Pop<u64>()}; | 404 | const auto device_handle{rp.Pop<u64>()}; |
| 405 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 405 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -425,7 +425,7 @@ void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) { | |||
| 425 | rb.Push(result); | 425 | rb.Push(result); |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | void IUser::GetRegisterInfo(Kernel::HLERequestContext& ctx) { | 428 | void IUser::GetRegisterInfo(HLERequestContext& ctx) { |
| 429 | IPC::RequestParser rp{ctx}; | 429 | IPC::RequestParser rp{ctx}; |
| 430 | const auto device_handle{rp.Pop<u64>()}; | 430 | const auto device_handle{rp.Pop<u64>()}; |
| 431 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 431 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -451,7 +451,7 @@ void IUser::GetRegisterInfo(Kernel::HLERequestContext& ctx) { | |||
| 451 | rb.Push(result); | 451 | rb.Push(result); |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | void IUser::GetCommonInfo(Kernel::HLERequestContext& ctx) { | 454 | void IUser::GetCommonInfo(HLERequestContext& ctx) { |
| 455 | IPC::RequestParser rp{ctx}; | 455 | IPC::RequestParser rp{ctx}; |
| 456 | const auto device_handle{rp.Pop<u64>()}; | 456 | const auto device_handle{rp.Pop<u64>()}; |
| 457 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 457 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -477,7 +477,7 @@ void IUser::GetCommonInfo(Kernel::HLERequestContext& ctx) { | |||
| 477 | rb.Push(result); | 477 | rb.Push(result); |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | void IUser::GetModelInfo(Kernel::HLERequestContext& ctx) { | 480 | void IUser::GetModelInfo(HLERequestContext& ctx) { |
| 481 | IPC::RequestParser rp{ctx}; | 481 | IPC::RequestParser rp{ctx}; |
| 482 | const auto device_handle{rp.Pop<u64>()}; | 482 | const auto device_handle{rp.Pop<u64>()}; |
| 483 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); | 483 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -503,7 +503,7 @@ void IUser::GetModelInfo(Kernel::HLERequestContext& ctx) { | |||
| 503 | rb.Push(result); | 503 | rb.Push(result); |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) { | 506 | void IUser::AttachActivateEvent(HLERequestContext& ctx) { |
| 507 | IPC::RequestParser rp{ctx}; | 507 | IPC::RequestParser rp{ctx}; |
| 508 | const auto device_handle{rp.Pop<u64>()}; | 508 | const auto device_handle{rp.Pop<u64>()}; |
| 509 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); | 509 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -527,7 +527,7 @@ void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) { | |||
| 527 | rb.PushCopyObjects(device.value()->GetActivateEvent()); | 527 | rb.PushCopyObjects(device.value()->GetActivateEvent()); |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) { | 530 | void IUser::AttachDeactivateEvent(HLERequestContext& ctx) { |
| 531 | IPC::RequestParser rp{ctx}; | 531 | IPC::RequestParser rp{ctx}; |
| 532 | const auto device_handle{rp.Pop<u64>()}; | 532 | const auto device_handle{rp.Pop<u64>()}; |
| 533 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); | 533 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -551,7 +551,7 @@ void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) { | |||
| 551 | rb.PushCopyObjects(device.value()->GetDeactivateEvent()); | 551 | rb.PushCopyObjects(device.value()->GetDeactivateEvent()); |
| 552 | } | 552 | } |
| 553 | 553 | ||
| 554 | void IUser::GetState(Kernel::HLERequestContext& ctx) { | 554 | void IUser::GetState(HLERequestContext& ctx) { |
| 555 | LOG_DEBUG(Service_NFP, "called"); | 555 | LOG_DEBUG(Service_NFP, "called"); |
| 556 | 556 | ||
| 557 | IPC::ResponseBuilder rb{ctx, 3}; | 557 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -559,7 +559,7 @@ void IUser::GetState(Kernel::HLERequestContext& ctx) { | |||
| 559 | rb.PushEnum(state); | 559 | rb.PushEnum(state); |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) { | 562 | void IUser::GetDeviceState(HLERequestContext& ctx) { |
| 563 | IPC::RequestParser rp{ctx}; | 563 | IPC::RequestParser rp{ctx}; |
| 564 | const auto device_handle{rp.Pop<u64>()}; | 564 | const auto device_handle{rp.Pop<u64>()}; |
| 565 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); | 565 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -577,7 +577,7 @@ void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) { | |||
| 577 | rb.PushEnum(device.value()->GetCurrentState()); | 577 | rb.PushEnum(device.value()->GetCurrentState()); |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | void IUser::GetNpadId(Kernel::HLERequestContext& ctx) { | 580 | void IUser::GetNpadId(HLERequestContext& ctx) { |
| 581 | IPC::RequestParser rp{ctx}; | 581 | IPC::RequestParser rp{ctx}; |
| 582 | const auto device_handle{rp.Pop<u64>()}; | 582 | const auto device_handle{rp.Pop<u64>()}; |
| 583 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); | 583 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -601,7 +601,7 @@ void IUser::GetNpadId(Kernel::HLERequestContext& ctx) { | |||
| 601 | rb.PushEnum(device.value()->GetNpadId()); | 601 | rb.PushEnum(device.value()->GetNpadId()); |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | void IUser::GetApplicationAreaSize(Kernel::HLERequestContext& ctx) { | 604 | void IUser::GetApplicationAreaSize(HLERequestContext& ctx) { |
| 605 | IPC::RequestParser rp{ctx}; | 605 | IPC::RequestParser rp{ctx}; |
| 606 | const auto device_handle{rp.Pop<u64>()}; | 606 | const auto device_handle{rp.Pop<u64>()}; |
| 607 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); | 607 | LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle); |
| @@ -619,7 +619,7 @@ void IUser::GetApplicationAreaSize(Kernel::HLERequestContext& ctx) { | |||
| 619 | rb.Push(device.value()->GetApplicationAreaSize()); | 619 | rb.Push(device.value()->GetApplicationAreaSize()); |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) { | 622 | void IUser::AttachAvailabilityChangeEvent(HLERequestContext& ctx) { |
| 623 | LOG_INFO(Service_NFP, "called"); | 623 | LOG_INFO(Service_NFP, "called"); |
| 624 | 624 | ||
| 625 | if (state == State::NonInitialized) { | 625 | if (state == State::NonInitialized) { |
| @@ -633,7 +633,7 @@ void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) { | |||
| 633 | rb.PushCopyObjects(availability_change_event->GetReadableEvent()); | 633 | rb.PushCopyObjects(availability_change_event->GetReadableEvent()); |
| 634 | } | 634 | } |
| 635 | 635 | ||
| 636 | void IUser::RecreateApplicationArea(Kernel::HLERequestContext& ctx) { | 636 | void IUser::RecreateApplicationArea(HLERequestContext& ctx) { |
| 637 | IPC::RequestParser rp{ctx}; | 637 | IPC::RequestParser rp{ctx}; |
| 638 | const auto device_handle{rp.Pop<u64>()}; | 638 | const auto device_handle{rp.Pop<u64>()}; |
| 639 | const auto access_id{rp.Pop<u32>()}; | 639 | const auto access_id{rp.Pop<u32>()}; |
diff --git a/src/core/hle/service/nfp/nfp_user.h b/src/core/hle/service/nfp/nfp_user.h index 7e9a90af8..1f3ff2ea8 100644 --- a/src/core/hle/service/nfp/nfp_user.h +++ b/src/core/hle/service/nfp/nfp_user.h | |||
| @@ -24,31 +24,31 @@ private: | |||
| 24 | Initialized, | 24 | Initialized, |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | void Initialize(Kernel::HLERequestContext& ctx); | 27 | void Initialize(HLERequestContext& ctx); |
| 28 | void Finalize(Kernel::HLERequestContext& ctx); | 28 | void Finalize(HLERequestContext& ctx); |
| 29 | void ListDevices(Kernel::HLERequestContext& ctx); | 29 | void ListDevices(HLERequestContext& ctx); |
| 30 | void StartDetection(Kernel::HLERequestContext& ctx); | 30 | void StartDetection(HLERequestContext& ctx); |
| 31 | void StopDetection(Kernel::HLERequestContext& ctx); | 31 | void StopDetection(HLERequestContext& ctx); |
| 32 | void Mount(Kernel::HLERequestContext& ctx); | 32 | void Mount(HLERequestContext& ctx); |
| 33 | void Unmount(Kernel::HLERequestContext& ctx); | 33 | void Unmount(HLERequestContext& ctx); |
| 34 | void OpenApplicationArea(Kernel::HLERequestContext& ctx); | 34 | void OpenApplicationArea(HLERequestContext& ctx); |
| 35 | void GetApplicationArea(Kernel::HLERequestContext& ctx); | 35 | void GetApplicationArea(HLERequestContext& ctx); |
| 36 | void SetApplicationArea(Kernel::HLERequestContext& ctx); | 36 | void SetApplicationArea(HLERequestContext& ctx); |
| 37 | void Flush(Kernel::HLERequestContext& ctx); | 37 | void Flush(HLERequestContext& ctx); |
| 38 | void Restore(Kernel::HLERequestContext& ctx); | 38 | void Restore(HLERequestContext& ctx); |
| 39 | void CreateApplicationArea(Kernel::HLERequestContext& ctx); | 39 | void CreateApplicationArea(HLERequestContext& ctx); |
| 40 | void GetTagInfo(Kernel::HLERequestContext& ctx); | 40 | void GetTagInfo(HLERequestContext& ctx); |
| 41 | void GetRegisterInfo(Kernel::HLERequestContext& ctx); | 41 | void GetRegisterInfo(HLERequestContext& ctx); |
| 42 | void GetCommonInfo(Kernel::HLERequestContext& ctx); | 42 | void GetCommonInfo(HLERequestContext& ctx); |
| 43 | void GetModelInfo(Kernel::HLERequestContext& ctx); | 43 | void GetModelInfo(HLERequestContext& ctx); |
| 44 | void AttachActivateEvent(Kernel::HLERequestContext& ctx); | 44 | void AttachActivateEvent(HLERequestContext& ctx); |
| 45 | void AttachDeactivateEvent(Kernel::HLERequestContext& ctx); | 45 | void AttachDeactivateEvent(HLERequestContext& ctx); |
| 46 | void GetState(Kernel::HLERequestContext& ctx); | 46 | void GetState(HLERequestContext& ctx); |
| 47 | void GetDeviceState(Kernel::HLERequestContext& ctx); | 47 | void GetDeviceState(HLERequestContext& ctx); |
| 48 | void GetNpadId(Kernel::HLERequestContext& ctx); | 48 | void GetNpadId(HLERequestContext& ctx); |
| 49 | void GetApplicationAreaSize(Kernel::HLERequestContext& ctx); | 49 | void GetApplicationAreaSize(HLERequestContext& ctx); |
| 50 | void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx); | 50 | void AttachAvailabilityChangeEvent(HLERequestContext& ctx); |
| 51 | void RecreateApplicationArea(Kernel::HLERequestContext& ctx); | 51 | void RecreateApplicationArea(HLERequestContext& ctx); |
| 52 | 52 | ||
| 53 | std::optional<std::shared_ptr<NfpDevice>> GetNfpDevice(u64 handle); | 53 | std::optional<std::shared_ptr<NfpDevice>> GetNfpDevice(u64 handle); |
| 54 | 54 | ||
diff --git a/src/core/hle/service/ngct/ngct.cpp b/src/core/hle/service/ngct/ngct.cpp index 76897d05c..493c80ed2 100644 --- a/src/core/hle/service/ngct/ngct.cpp +++ b/src/core/hle/service/ngct/ngct.cpp | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/string_util.h" | 4 | #include "common/string_util.h" |
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/service/ipc_helpers.h" |
| 7 | #include "core/hle/service/ngct/ngct.h" | 7 | #include "core/hle/service/ngct/ngct.h" |
| 8 | #include "core/hle/service/server_manager.h" | 8 | #include "core/hle/service/server_manager.h" |
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| @@ -24,7 +24,7 @@ public: | |||
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | private: | 26 | private: |
| 27 | void Match(Kernel::HLERequestContext& ctx) { | 27 | void Match(HLERequestContext& ctx) { |
| 28 | const auto buffer = ctx.ReadBuffer(); | 28 | const auto buffer = ctx.ReadBuffer(); |
| 29 | const auto text = Common::StringFromFixedZeroTerminatedBuffer( | 29 | const auto text = Common::StringFromFixedZeroTerminatedBuffer( |
| 30 | reinterpret_cast<const char*>(buffer.data()), buffer.size()); | 30 | reinterpret_cast<const char*>(buffer.data()), buffer.size()); |
| @@ -37,7 +37,7 @@ private: | |||
| 37 | rb.Push(false); | 37 | rb.Push(false); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | void Filter(Kernel::HLERequestContext& ctx) { | 40 | void Filter(HLERequestContext& ctx) { |
| 41 | const auto buffer = ctx.ReadBuffer(); | 41 | const auto buffer = ctx.ReadBuffer(); |
| 42 | const auto text = Common::StringFromFixedZeroTerminatedBuffer( | 42 | const auto text = Common::StringFromFixedZeroTerminatedBuffer( |
| 43 | reinterpret_cast<const char*>(buffer.data()), buffer.size()); | 43 | reinterpret_cast<const char*>(buffer.data()), buffer.size()); |
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 3d176b3c2..0c042f412 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/core.h" | 4 | #include "core/core.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/kernel/k_event.h" | 5 | #include "core/hle/kernel/k_event.h" |
| 6 | #include "core/hle/service/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/kernel_helpers.h" | 7 | #include "core/hle/service/kernel_helpers.h" |
| 8 | #include "core/hle/service/nifm/nifm.h" | 8 | #include "core/hle/service/nifm/nifm.h" |
| 9 | #include "core/hle/service/server_manager.h" | 9 | #include "core/hle/service/server_manager.h" |
| @@ -217,7 +217,7 @@ public: | |||
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | private: | 219 | private: |
| 220 | void Submit(Kernel::HLERequestContext& ctx) { | 220 | void Submit(HLERequestContext& ctx) { |
| 221 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 221 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 222 | 222 | ||
| 223 | if (state == RequestState::NotSubmitted) { | 223 | if (state == RequestState::NotSubmitted) { |
| @@ -228,7 +228,7 @@ private: | |||
| 228 | rb.Push(ResultSuccess); | 228 | rb.Push(ResultSuccess); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void GetRequestState(Kernel::HLERequestContext& ctx) { | 231 | void GetRequestState(HLERequestContext& ctx) { |
| 232 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 232 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 233 | 233 | ||
| 234 | IPC::ResponseBuilder rb{ctx, 3}; | 234 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -236,7 +236,7 @@ private: | |||
| 236 | rb.PushEnum(state); | 236 | rb.PushEnum(state); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | void GetResult(Kernel::HLERequestContext& ctx) { | 239 | void GetResult(HLERequestContext& ctx) { |
| 240 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 240 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 241 | 241 | ||
| 242 | const auto result = [this] { | 242 | const auto result = [this] { |
| @@ -261,7 +261,7 @@ private: | |||
| 261 | rb.Push(result); | 261 | rb.Push(result); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) { | 264 | void GetSystemEventReadableHandles(HLERequestContext& ctx) { |
| 265 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 265 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 266 | 266 | ||
| 267 | IPC::ResponseBuilder rb{ctx, 2, 2}; | 267 | IPC::ResponseBuilder rb{ctx, 2, 2}; |
| @@ -269,21 +269,21 @@ private: | |||
| 269 | rb.PushCopyObjects(event1->GetReadableEvent(), event2->GetReadableEvent()); | 269 | rb.PushCopyObjects(event1->GetReadableEvent(), event2->GetReadableEvent()); |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | void Cancel(Kernel::HLERequestContext& ctx) { | 272 | void Cancel(HLERequestContext& ctx) { |
| 273 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 273 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 274 | 274 | ||
| 275 | IPC::ResponseBuilder rb{ctx, 2}; | 275 | IPC::ResponseBuilder rb{ctx, 2}; |
| 276 | rb.Push(ResultSuccess); | 276 | rb.Push(ResultSuccess); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | void SetConnectionConfirmationOption(Kernel::HLERequestContext& ctx) { | 279 | void SetConnectionConfirmationOption(HLERequestContext& ctx) { |
| 280 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 280 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 281 | 281 | ||
| 282 | IPC::ResponseBuilder rb{ctx, 2}; | 282 | IPC::ResponseBuilder rb{ctx, 2}; |
| 283 | rb.Push(ResultSuccess); | 283 | rb.Push(ResultSuccess); |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | void GetAppletInfo(Kernel::HLERequestContext& ctx) { | 286 | void GetAppletInfo(HLERequestContext& ctx) { |
| 287 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 287 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 288 | 288 | ||
| 289 | std::vector<u8> out_buffer(ctx.GetWriteBufferSize()); | 289 | std::vector<u8> out_buffer(ctx.GetWriteBufferSize()); |
| @@ -322,7 +322,7 @@ public: | |||
| 322 | } | 322 | } |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | void IGeneralService::GetClientId(Kernel::HLERequestContext& ctx) { | 325 | void IGeneralService::GetClientId(HLERequestContext& ctx) { |
| 326 | static constexpr u32 client_id = 1; | 326 | static constexpr u32 client_id = 1; |
| 327 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 327 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 328 | 328 | ||
| @@ -331,7 +331,7 @@ void IGeneralService::GetClientId(Kernel::HLERequestContext& ctx) { | |||
| 331 | rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid | 331 | rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | void IGeneralService::CreateScanRequest(Kernel::HLERequestContext& ctx) { | 334 | void IGeneralService::CreateScanRequest(HLERequestContext& ctx) { |
| 335 | LOG_DEBUG(Service_NIFM, "called"); | 335 | LOG_DEBUG(Service_NIFM, "called"); |
| 336 | 336 | ||
| 337 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 337 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -340,7 +340,7 @@ void IGeneralService::CreateScanRequest(Kernel::HLERequestContext& ctx) { | |||
| 340 | rb.PushIpcInterface<IScanRequest>(system); | 340 | rb.PushIpcInterface<IScanRequest>(system); |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | void IGeneralService::CreateRequest(Kernel::HLERequestContext& ctx) { | 343 | void IGeneralService::CreateRequest(HLERequestContext& ctx) { |
| 344 | LOG_DEBUG(Service_NIFM, "called"); | 344 | LOG_DEBUG(Service_NIFM, "called"); |
| 345 | 345 | ||
| 346 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 346 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -349,7 +349,7 @@ void IGeneralService::CreateRequest(Kernel::HLERequestContext& ctx) { | |||
| 349 | rb.PushIpcInterface<IRequest>(system); | 349 | rb.PushIpcInterface<IRequest>(system); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | void IGeneralService::GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) { | 352 | void IGeneralService::GetCurrentNetworkProfile(HLERequestContext& ctx) { |
| 353 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 353 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 354 | 354 | ||
| 355 | const auto net_iface = Network::GetSelectedNetworkInterface(); | 355 | const auto net_iface = Network::GetSelectedNetworkInterface(); |
| @@ -408,14 +408,14 @@ void IGeneralService::GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) { | |||
| 408 | rb.Push(ResultSuccess); | 408 | rb.Push(ResultSuccess); |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | void IGeneralService::RemoveNetworkProfile(Kernel::HLERequestContext& ctx) { | 411 | void IGeneralService::RemoveNetworkProfile(HLERequestContext& ctx) { |
| 412 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 412 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 413 | 413 | ||
| 414 | IPC::ResponseBuilder rb{ctx, 2}; | 414 | IPC::ResponseBuilder rb{ctx, 2}; |
| 415 | rb.Push(ResultSuccess); | 415 | rb.Push(ResultSuccess); |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | void IGeneralService::GetCurrentIpAddress(Kernel::HLERequestContext& ctx) { | 418 | void IGeneralService::GetCurrentIpAddress(HLERequestContext& ctx) { |
| 419 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 419 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 420 | 420 | ||
| 421 | auto ipv4 = Network::GetHostIPv4Address(); | 421 | auto ipv4 = Network::GetHostIPv4Address(); |
| @@ -436,7 +436,7 @@ void IGeneralService::GetCurrentIpAddress(Kernel::HLERequestContext& ctx) { | |||
| 436 | rb.PushRaw(*ipv4); | 436 | rb.PushRaw(*ipv4); |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | void IGeneralService::CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) { | 439 | void IGeneralService::CreateTemporaryNetworkProfile(HLERequestContext& ctx) { |
| 440 | LOG_DEBUG(Service_NIFM, "called"); | 440 | LOG_DEBUG(Service_NIFM, "called"); |
| 441 | 441 | ||
| 442 | ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c, "SfNetworkProfileData is not the correct size"); | 442 | ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c, "SfNetworkProfileData is not the correct size"); |
| @@ -451,7 +451,7 @@ void IGeneralService::CreateTemporaryNetworkProfile(Kernel::HLERequestContext& c | |||
| 451 | rb.PushRaw<u128>(uuid); | 451 | rb.PushRaw<u128>(uuid); |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | void IGeneralService::GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) { | 454 | void IGeneralService::GetCurrentIpConfigInfo(HLERequestContext& ctx) { |
| 455 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 455 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 456 | 456 | ||
| 457 | struct IpConfigInfo { | 457 | struct IpConfigInfo { |
| @@ -495,7 +495,7 @@ void IGeneralService::GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) { | |||
| 495 | rb.PushRaw<IpConfigInfo>(ip_config_info); | 495 | rb.PushRaw<IpConfigInfo>(ip_config_info); |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | void IGeneralService::IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) { | 498 | void IGeneralService::IsWirelessCommunicationEnabled(HLERequestContext& ctx) { |
| 499 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 499 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 500 | 500 | ||
| 501 | IPC::ResponseBuilder rb{ctx, 3}; | 501 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -503,7 +503,7 @@ void IGeneralService::IsWirelessCommunicationEnabled(Kernel::HLERequestContext& | |||
| 503 | rb.Push<u8>(1); | 503 | rb.Push<u8>(1); |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | void IGeneralService::GetInternetConnectionStatus(Kernel::HLERequestContext& ctx) { | 506 | void IGeneralService::GetInternetConnectionStatus(HLERequestContext& ctx) { |
| 507 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 507 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 508 | 508 | ||
| 509 | struct Output { | 509 | struct Output { |
| @@ -520,7 +520,7 @@ void IGeneralService::GetInternetConnectionStatus(Kernel::HLERequestContext& ctx | |||
| 520 | rb.PushRaw(out); | 520 | rb.PushRaw(out); |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | void IGeneralService::IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) { | 523 | void IGeneralService::IsEthernetCommunicationEnabled(HLERequestContext& ctx) { |
| 524 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 524 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 525 | 525 | ||
| 526 | IPC::ResponseBuilder rb{ctx, 3}; | 526 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -532,7 +532,7 @@ void IGeneralService::IsEthernetCommunicationEnabled(Kernel::HLERequestContext& | |||
| 532 | } | 532 | } |
| 533 | } | 533 | } |
| 534 | 534 | ||
| 535 | void IGeneralService::IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx) { | 535 | void IGeneralService::IsAnyInternetRequestAccepted(HLERequestContext& ctx) { |
| 536 | LOG_ERROR(Service_NIFM, "(STUBBED) called"); | 536 | LOG_ERROR(Service_NIFM, "(STUBBED) called"); |
| 537 | 537 | ||
| 538 | IPC::ResponseBuilder rb{ctx, 3}; | 538 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -610,7 +610,7 @@ public: | |||
| 610 | } | 610 | } |
| 611 | 611 | ||
| 612 | private: | 612 | private: |
| 613 | void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx) { | 613 | void CreateGeneralServiceOld(HLERequestContext& ctx) { |
| 614 | LOG_DEBUG(Service_NIFM, "called"); | 614 | LOG_DEBUG(Service_NIFM, "called"); |
| 615 | 615 | ||
| 616 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 616 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -618,7 +618,7 @@ private: | |||
| 618 | rb.PushIpcInterface<IGeneralService>(system); | 618 | rb.PushIpcInterface<IGeneralService>(system); |
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | void CreateGeneralService(Kernel::HLERequestContext& ctx) { | 621 | void CreateGeneralService(HLERequestContext& ctx) { |
| 622 | LOG_DEBUG(Service_NIFM, "called"); | 622 | LOG_DEBUG(Service_NIFM, "called"); |
| 623 | 623 | ||
| 624 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 624 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/nifm/nifm.h b/src/core/hle/service/nifm/nifm.h index b5da7ae12..9b20e6823 100644 --- a/src/core/hle/service/nifm/nifm.h +++ b/src/core/hle/service/nifm/nifm.h | |||
| @@ -22,18 +22,18 @@ public: | |||
| 22 | ~IGeneralService() override; | 22 | ~IGeneralService() override; |
| 23 | 23 | ||
| 24 | private: | 24 | private: |
| 25 | void GetClientId(Kernel::HLERequestContext& ctx); | 25 | void GetClientId(HLERequestContext& ctx); |
| 26 | void CreateScanRequest(Kernel::HLERequestContext& ctx); | 26 | void CreateScanRequest(HLERequestContext& ctx); |
| 27 | void CreateRequest(Kernel::HLERequestContext& ctx); | 27 | void CreateRequest(HLERequestContext& ctx); |
| 28 | void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx); | 28 | void GetCurrentNetworkProfile(HLERequestContext& ctx); |
| 29 | void RemoveNetworkProfile(Kernel::HLERequestContext& ctx); | 29 | void RemoveNetworkProfile(HLERequestContext& ctx); |
| 30 | void GetCurrentIpAddress(Kernel::HLERequestContext& ctx); | 30 | void GetCurrentIpAddress(HLERequestContext& ctx); |
| 31 | void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx); | 31 | void CreateTemporaryNetworkProfile(HLERequestContext& ctx); |
| 32 | void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx); | 32 | void GetCurrentIpConfigInfo(HLERequestContext& ctx); |
| 33 | void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx); | 33 | void IsWirelessCommunicationEnabled(HLERequestContext& ctx); |
| 34 | void GetInternetConnectionStatus(Kernel::HLERequestContext& ctx); | 34 | void GetInternetConnectionStatus(HLERequestContext& ctx); |
| 35 | void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx); | 35 | void IsEthernetCommunicationEnabled(HLERequestContext& ctx); |
| 36 | void IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx); | 36 | void IsAnyInternetRequestAccepted(HLERequestContext& ctx); |
| 37 | 37 | ||
| 38 | Network::RoomNetwork& network; | 38 | Network::RoomNetwork& network; |
| 39 | }; | 39 | }; |
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index aff7cc5bd..42de87f9a 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <chrono> | 4 | #include <chrono> |
| 5 | #include <ctime> | 5 | #include <ctime> |
| 6 | #include "core/core.h" | 6 | #include "core/core.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/kernel/k_event.h" | 7 | #include "core/hle/kernel/k_event.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/kernel_helpers.h" | 9 | #include "core/hle/service/kernel_helpers.h" |
| 10 | #include "core/hle/service/nim/nim.h" | 10 | #include "core/hle/service/nim/nim.h" |
| 11 | #include "core/hle/service/server_manager.h" | 11 | #include "core/hle/service/server_manager.h" |
| @@ -46,7 +46,7 @@ public: | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | private: | 48 | private: |
| 49 | void CreateAsyncInterface(Kernel::HLERequestContext& ctx) { | 49 | void CreateAsyncInterface(HLERequestContext& ctx) { |
| 50 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | 50 | LOG_WARNING(Service_NIM, "(STUBBED) called"); |
| 51 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 51 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 52 | rb.Push(ResultSuccess); | 52 | rb.Push(ResultSuccess); |
| @@ -68,7 +68,7 @@ public: | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | private: | 70 | private: |
| 71 | void CreateAccessorInterface(Kernel::HLERequestContext& ctx) { | 71 | void CreateAccessorInterface(HLERequestContext& ctx) { |
| 72 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | 72 | LOG_WARNING(Service_NIM, "(STUBBED) called"); |
| 73 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 73 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 74 | rb.Push(ResultSuccess); | 74 | rb.Push(ResultSuccess); |
| @@ -239,14 +239,14 @@ public: | |||
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | private: | 241 | private: |
| 242 | void CreateServerInterface(Kernel::HLERequestContext& ctx) { | 242 | void CreateServerInterface(HLERequestContext& ctx) { |
| 243 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | 243 | LOG_WARNING(Service_NIM, "(STUBBED) called"); |
| 244 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 244 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 245 | rb.Push(ResultSuccess); | 245 | rb.Push(ResultSuccess); |
| 246 | rb.PushIpcInterface<IShopServiceAccessServer>(system); | 246 | rb.PushIpcInterface<IShopServiceAccessServer>(system); |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | void IsLargeResourceAvailable(Kernel::HLERequestContext& ctx) { | 249 | void IsLargeResourceAvailable(HLERequestContext& ctx) { |
| 250 | IPC::RequestParser rp{ctx}; | 250 | IPC::RequestParser rp{ctx}; |
| 251 | 251 | ||
| 252 | const auto unknown{rp.Pop<u64>()}; | 252 | const auto unknown{rp.Pop<u64>()}; |
| @@ -325,7 +325,7 @@ public: | |||
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | private: | 327 | private: |
| 328 | void StartTask(Kernel::HLERequestContext& ctx) { | 328 | void StartTask(HLERequestContext& ctx) { |
| 329 | // No need to connect to the internet, just finish the task straight away. | 329 | // No need to connect to the internet, just finish the task straight away. |
| 330 | LOG_DEBUG(Service_NIM, "called"); | 330 | LOG_DEBUG(Service_NIM, "called"); |
| 331 | finished_event->Signal(); | 331 | finished_event->Signal(); |
| @@ -333,7 +333,7 @@ private: | |||
| 333 | rb.Push(ResultSuccess); | 333 | rb.Push(ResultSuccess); |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | void GetFinishNotificationEvent(Kernel::HLERequestContext& ctx) { | 336 | void GetFinishNotificationEvent(HLERequestContext& ctx) { |
| 337 | LOG_DEBUG(Service_NIM, "called"); | 337 | LOG_DEBUG(Service_NIM, "called"); |
| 338 | 338 | ||
| 339 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 339 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -341,21 +341,21 @@ private: | |||
| 341 | rb.PushCopyObjects(finished_event->GetReadableEvent()); | 341 | rb.PushCopyObjects(finished_event->GetReadableEvent()); |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | void GetResult(Kernel::HLERequestContext& ctx) { | 344 | void GetResult(HLERequestContext& ctx) { |
| 345 | LOG_DEBUG(Service_NIM, "called"); | 345 | LOG_DEBUG(Service_NIM, "called"); |
| 346 | 346 | ||
| 347 | IPC::ResponseBuilder rb{ctx, 2}; | 347 | IPC::ResponseBuilder rb{ctx, 2}; |
| 348 | rb.Push(ResultSuccess); | 348 | rb.Push(ResultSuccess); |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | void Cancel(Kernel::HLERequestContext& ctx) { | 351 | void Cancel(HLERequestContext& ctx) { |
| 352 | LOG_DEBUG(Service_NIM, "called"); | 352 | LOG_DEBUG(Service_NIM, "called"); |
| 353 | finished_event->Clear(); | 353 | finished_event->Clear(); |
| 354 | IPC::ResponseBuilder rb{ctx, 2}; | 354 | IPC::ResponseBuilder rb{ctx, 2}; |
| 355 | rb.Push(ResultSuccess); | 355 | rb.Push(ResultSuccess); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | void IsProcessing(Kernel::HLERequestContext& ctx) { | 358 | void IsProcessing(HLERequestContext& ctx) { |
| 359 | LOG_DEBUG(Service_NIM, "called"); | 359 | LOG_DEBUG(Service_NIM, "called"); |
| 360 | 360 | ||
| 361 | IPC::ResponseBuilder rb{ctx, 3}; | 361 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -363,7 +363,7 @@ private: | |||
| 363 | rb.PushRaw<u32>(0); // We instantly process the request | 363 | rb.PushRaw<u32>(0); // We instantly process the request |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | void GetServerTime(Kernel::HLERequestContext& ctx) { | 366 | void GetServerTime(HLERequestContext& ctx) { |
| 367 | LOG_DEBUG(Service_NIM, "called"); | 367 | LOG_DEBUG(Service_NIM, "called"); |
| 368 | 368 | ||
| 369 | const s64 server_time{std::chrono::duration_cast<std::chrono::seconds>( | 369 | const s64 server_time{std::chrono::duration_cast<std::chrono::seconds>( |
| @@ -394,7 +394,7 @@ public: | |||
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | private: | 396 | private: |
| 397 | void OpenEnsureNetworkClockAvailabilityService(Kernel::HLERequestContext& ctx) { | 397 | void OpenEnsureNetworkClockAvailabilityService(HLERequestContext& ctx) { |
| 398 | LOG_DEBUG(Service_NIM, "called"); | 398 | LOG_DEBUG(Service_NIM, "called"); |
| 399 | 399 | ||
| 400 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 400 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -403,14 +403,14 @@ private: | |||
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | // TODO(ogniK): Do we need these? | 405 | // TODO(ogniK): Do we need these? |
| 406 | void SuspendAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) { | 406 | void SuspendAutonomicTimeCorrection(HLERequestContext& ctx) { |
| 407 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | 407 | LOG_WARNING(Service_NIM, "(STUBBED) called"); |
| 408 | 408 | ||
| 409 | IPC::ResponseBuilder rb{ctx, 2}; | 409 | IPC::ResponseBuilder rb{ctx, 2}; |
| 410 | rb.Push(ResultSuccess); | 410 | rb.Push(ResultSuccess); |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | void ResumeAutonomicTimeCorrection(Kernel::HLERequestContext& ctx) { | 413 | void ResumeAutonomicTimeCorrection(HLERequestContext& ctx) { |
| 414 | LOG_WARNING(Service_NIM, "(STUBBED) called"); | 414 | LOG_WARNING(Service_NIM, "(STUBBED) called"); |
| 415 | 415 | ||
| 416 | IPC::ResponseBuilder rb{ctx, 2}; | 416 | IPC::ResponseBuilder rb{ctx, 2}; |
diff --git a/src/core/hle/service/ns/iplatform_service_manager.cpp b/src/core/hle/service/ns/iplatform_service_manager.cpp index 1fab2f0dd..cd2705881 100644 --- a/src/core/hle/service/ns/iplatform_service_manager.cpp +++ b/src/core/hle/service/ns/iplatform_service_manager.cpp | |||
| @@ -15,11 +15,11 @@ | |||
| 15 | #include "core/file_sys/registered_cache.h" | 15 | #include "core/file_sys/registered_cache.h" |
| 16 | #include "core/file_sys/romfs.h" | 16 | #include "core/file_sys/romfs.h" |
| 17 | #include "core/file_sys/system_archive/system_archive.h" | 17 | #include "core/file_sys/system_archive/system_archive.h" |
| 18 | #include "core/hle/ipc_helpers.h" | ||
| 19 | #include "core/hle/kernel/k_shared_memory.h" | 18 | #include "core/hle/kernel/k_shared_memory.h" |
| 20 | #include "core/hle/kernel/kernel.h" | 19 | #include "core/hle/kernel/kernel.h" |
| 21 | #include "core/hle/kernel/physical_memory.h" | 20 | #include "core/hle/kernel/physical_memory.h" |
| 22 | #include "core/hle/service/filesystem/filesystem.h" | 21 | #include "core/hle/service/filesystem/filesystem.h" |
| 22 | #include "core/hle/service/ipc_helpers.h" | ||
| 23 | #include "core/hle/service/ns/iplatform_service_manager.h" | 23 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 24 | 24 | ||
| 25 | namespace Service::NS { | 25 | namespace Service::NS { |
| @@ -208,7 +208,7 @@ IPlatformServiceManager::IPlatformServiceManager(Core::System& system_, const ch | |||
| 208 | 208 | ||
| 209 | IPlatformServiceManager::~IPlatformServiceManager() = default; | 209 | IPlatformServiceManager::~IPlatformServiceManager() = default; |
| 210 | 210 | ||
| 211 | void IPlatformServiceManager::RequestLoad(Kernel::HLERequestContext& ctx) { | 211 | void IPlatformServiceManager::RequestLoad(HLERequestContext& ctx) { |
| 212 | IPC::RequestParser rp{ctx}; | 212 | IPC::RequestParser rp{ctx}; |
| 213 | const u32 shared_font_type{rp.Pop<u32>()}; | 213 | const u32 shared_font_type{rp.Pop<u32>()}; |
| 214 | // Games don't call this so all fonts should be loaded | 214 | // Games don't call this so all fonts should be loaded |
| @@ -218,7 +218,7 @@ void IPlatformServiceManager::RequestLoad(Kernel::HLERequestContext& ctx) { | |||
| 218 | rb.Push(ResultSuccess); | 218 | rb.Push(ResultSuccess); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | void IPlatformServiceManager::GetLoadState(Kernel::HLERequestContext& ctx) { | 221 | void IPlatformServiceManager::GetLoadState(HLERequestContext& ctx) { |
| 222 | IPC::RequestParser rp{ctx}; | 222 | IPC::RequestParser rp{ctx}; |
| 223 | const u32 font_id{rp.Pop<u32>()}; | 223 | const u32 font_id{rp.Pop<u32>()}; |
| 224 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 224 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -228,7 +228,7 @@ void IPlatformServiceManager::GetLoadState(Kernel::HLERequestContext& ctx) { | |||
| 228 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); | 228 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void IPlatformServiceManager::GetSize(Kernel::HLERequestContext& ctx) { | 231 | void IPlatformServiceManager::GetSize(HLERequestContext& ctx) { |
| 232 | IPC::RequestParser rp{ctx}; | 232 | IPC::RequestParser rp{ctx}; |
| 233 | const u32 font_id{rp.Pop<u32>()}; | 233 | const u32 font_id{rp.Pop<u32>()}; |
| 234 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 234 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -238,7 +238,7 @@ void IPlatformServiceManager::GetSize(Kernel::HLERequestContext& ctx) { | |||
| 238 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).size); | 238 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).size); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | void IPlatformServiceManager::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) { | 241 | void IPlatformServiceManager::GetSharedMemoryAddressOffset(HLERequestContext& ctx) { |
| 242 | IPC::RequestParser rp{ctx}; | 242 | IPC::RequestParser rp{ctx}; |
| 243 | const u32 font_id{rp.Pop<u32>()}; | 243 | const u32 font_id{rp.Pop<u32>()}; |
| 244 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 244 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -248,7 +248,7 @@ void IPlatformServiceManager::GetSharedMemoryAddressOffset(Kernel::HLERequestCon | |||
| 248 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset); | 248 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset); |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | void IPlatformServiceManager::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | 251 | void IPlatformServiceManager::GetSharedMemoryNativeHandle(HLERequestContext& ctx) { |
| 252 | // Map backing memory for the font data | 252 | // Map backing memory for the font data |
| 253 | LOG_DEBUG(Service_NS, "called"); | 253 | LOG_DEBUG(Service_NS, "called"); |
| 254 | 254 | ||
| @@ -261,7 +261,7 @@ void IPlatformServiceManager::GetSharedMemoryNativeHandle(Kernel::HLERequestCont | |||
| 261 | rb.PushCopyObjects(&kernel.GetFontSharedMem()); | 261 | rb.PushCopyObjects(&kernel.GetFontSharedMem()); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void IPlatformServiceManager::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { | 264 | void IPlatformServiceManager::GetSharedFontInOrderOfPriority(HLERequestContext& ctx) { |
| 265 | IPC::RequestParser rp{ctx}; | 265 | IPC::RequestParser rp{ctx}; |
| 266 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for | 266 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for |
| 267 | LOG_DEBUG(Service_NS, "called, language_code={:X}", language_code); | 267 | LOG_DEBUG(Service_NS, "called, language_code={:X}", language_code); |
diff --git a/src/core/hle/service/ns/iplatform_service_manager.h b/src/core/hle/service/ns/iplatform_service_manager.h index ed6eda89f..03071e02b 100644 --- a/src/core/hle/service/ns/iplatform_service_manager.h +++ b/src/core/hle/service/ns/iplatform_service_manager.h | |||
| @@ -42,12 +42,12 @@ public: | |||
| 42 | ~IPlatformServiceManager() override; | 42 | ~IPlatformServiceManager() override; |
| 43 | 43 | ||
| 44 | private: | 44 | private: |
| 45 | void RequestLoad(Kernel::HLERequestContext& ctx); | 45 | void RequestLoad(HLERequestContext& ctx); |
| 46 | void GetLoadState(Kernel::HLERequestContext& ctx); | 46 | void GetLoadState(HLERequestContext& ctx); |
| 47 | void GetSize(Kernel::HLERequestContext& ctx); | 47 | void GetSize(HLERequestContext& ctx); |
| 48 | void GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx); | 48 | void GetSharedMemoryAddressOffset(HLERequestContext& ctx); |
| 49 | void GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx); | 49 | void GetSharedMemoryNativeHandle(HLERequestContext& ctx); |
| 50 | void GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx); | 50 | void GetSharedFontInOrderOfPriority(HLERequestContext& ctx); |
| 51 | 51 | ||
| 52 | struct Impl; | 52 | struct Impl; |
| 53 | std::unique_ptr<Impl> impl; | 53 | std::unique_ptr<Impl> impl; |
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 062e96ef9..d6f0faea2 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include "core/file_sys/control_metadata.h" | 7 | #include "core/file_sys/control_metadata.h" |
| 8 | #include "core/file_sys/patch_manager.h" | 8 | #include "core/file_sys/patch_manager.h" |
| 9 | #include "core/file_sys/vfs.h" | 9 | #include "core/file_sys/vfs.h" |
| 10 | #include "core/hle/ipc_helpers.h" | ||
| 11 | #include "core/hle/service/glue/glue_manager.h" | 10 | #include "core/hle/service/glue/glue_manager.h" |
| 11 | #include "core/hle/service/ipc_helpers.h" | ||
| 12 | #include "core/hle/service/ns/errors.h" | 12 | #include "core/hle/service/ns/errors.h" |
| 13 | #include "core/hle/service/ns/iplatform_service_manager.h" | 13 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 14 | #include "core/hle/service/ns/language.h" | 14 | #include "core/hle/service/ns/language.h" |
| @@ -329,7 +329,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_ | |||
| 329 | 329 | ||
| 330 | IApplicationManagerInterface::~IApplicationManagerInterface() = default; | 330 | IApplicationManagerInterface::~IApplicationManagerInterface() = default; |
| 331 | 331 | ||
| 332 | void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestContext& ctx) { | 332 | void IApplicationManagerInterface::GetApplicationControlData(HLERequestContext& ctx) { |
| 333 | IPC::RequestParser rp{ctx}; | 333 | IPC::RequestParser rp{ctx}; |
| 334 | const auto flag = rp.PopRaw<u64>(); | 334 | const auto flag = rp.PopRaw<u64>(); |
| 335 | LOG_DEBUG(Service_NS, "called with flag={:016X}", flag); | 335 | LOG_DEBUG(Service_NS, "called with flag={:016X}", flag); |
| @@ -388,7 +388,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC | |||
| 388 | rb.Push<u32>(static_cast<u32>(out.size())); | 388 | rb.Push<u32>(static_cast<u32>(out.size())); |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | void IApplicationManagerInterface::GetApplicationDesiredLanguage(Kernel::HLERequestContext& ctx) { | 391 | void IApplicationManagerInterface::GetApplicationDesiredLanguage(HLERequestContext& ctx) { |
| 392 | IPC::RequestParser rp{ctx}; | 392 | IPC::RequestParser rp{ctx}; |
| 393 | const auto supported_languages = rp.Pop<u32>(); | 393 | const auto supported_languages = rp.Pop<u32>(); |
| 394 | 394 | ||
| @@ -440,7 +440,7 @@ ResultVal<u8> IApplicationManagerInterface::GetApplicationDesiredLanguage( | |||
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | void IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( | 442 | void IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( |
| 443 | Kernel::HLERequestContext& ctx) { | 443 | HLERequestContext& ctx) { |
| 444 | IPC::RequestParser rp{ctx}; | 444 | IPC::RequestParser rp{ctx}; |
| 445 | const auto application_language = rp.Pop<u8>(); | 445 | const auto application_language = rp.Pop<u8>(); |
| 446 | 446 | ||
| @@ -604,8 +604,7 @@ IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterfa | |||
| 604 | 604 | ||
| 605 | IReadOnlyApplicationControlDataInterface::~IReadOnlyApplicationControlDataInterface() = default; | 605 | IReadOnlyApplicationControlDataInterface::~IReadOnlyApplicationControlDataInterface() = default; |
| 606 | 606 | ||
| 607 | void IReadOnlyApplicationControlDataInterface::GetApplicationControlData( | 607 | void IReadOnlyApplicationControlDataInterface::GetApplicationControlData(HLERequestContext& ctx) { |
| 608 | Kernel::HLERequestContext& ctx) { | ||
| 609 | enum class ApplicationControlSource : u8 { | 608 | enum class ApplicationControlSource : u8 { |
| 610 | CacheOnly, | 609 | CacheOnly, |
| 611 | Storage, | 610 | Storage, |
| @@ -753,7 +752,7 @@ public: | |||
| 753 | } | 752 | } |
| 754 | 753 | ||
| 755 | private: | 754 | private: |
| 756 | void OpenSystemUpdateControl(Kernel::HLERequestContext& ctx) { | 755 | void OpenSystemUpdateControl(HLERequestContext& ctx) { |
| 757 | LOG_DEBUG(Service_NS, "called"); | 756 | LOG_DEBUG(Service_NS, "called"); |
| 758 | 757 | ||
| 759 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 758 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -777,7 +776,7 @@ public: | |||
| 777 | } | 776 | } |
| 778 | 777 | ||
| 779 | private: | 778 | private: |
| 780 | void NeedsUpdateVulnerability(Kernel::HLERequestContext& ctx) { | 779 | void NeedsUpdateVulnerability(HLERequestContext& ctx) { |
| 781 | LOG_WARNING(Service_NS, "(STUBBED) called"); | 780 | LOG_WARNING(Service_NS, "(STUBBED) called"); |
| 782 | 781 | ||
| 783 | IPC::ResponseBuilder rb{ctx, 3}; | 782 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index 797e69a13..203388e1f 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h | |||
| @@ -32,9 +32,9 @@ public: | |||
| 32 | ResultVal<u64> ConvertApplicationLanguageToLanguageCode(u8 application_language); | 32 | ResultVal<u64> ConvertApplicationLanguageToLanguageCode(u8 application_language); |
| 33 | 33 | ||
| 34 | private: | 34 | private: |
| 35 | void GetApplicationControlData(Kernel::HLERequestContext& ctx); | 35 | void GetApplicationControlData(HLERequestContext& ctx); |
| 36 | void GetApplicationDesiredLanguage(Kernel::HLERequestContext& ctx); | 36 | void GetApplicationDesiredLanguage(HLERequestContext& ctx); |
| 37 | void ConvertApplicationLanguageToLanguageCode(Kernel::HLERequestContext& ctx); | 37 | void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> { | 40 | class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> { |
| @@ -80,7 +80,7 @@ public: | |||
| 80 | ~IReadOnlyApplicationControlDataInterface() override; | 80 | ~IReadOnlyApplicationControlDataInterface() override; |
| 81 | 81 | ||
| 82 | private: | 82 | private: |
| 83 | void GetApplicationControlData(Kernel::HLERequestContext& ctx); | 83 | void GetApplicationControlData(HLERequestContext& ctx); |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | class NS final : public ServiceFramework<NS> { | 86 | class NS final : public ServiceFramework<NS> { |
| @@ -92,7 +92,7 @@ public: | |||
| 92 | 92 | ||
| 93 | private: | 93 | private: |
| 94 | template <typename T, typename... Args> | 94 | template <typename T, typename... Args> |
| 95 | void PushInterface(Kernel::HLERequestContext& ctx) { | 95 | void PushInterface(HLERequestContext& ctx) { |
| 96 | LOG_DEBUG(Service_NS, "called"); | 96 | LOG_DEBUG(Service_NS, "called"); |
| 97 | 97 | ||
| 98 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 98 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -100,7 +100,7 @@ private: | |||
| 100 | rb.PushIpcInterface<T>(system); | 100 | rb.PushIpcInterface<T>(system); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void PushIApplicationManagerInterface(Kernel::HLERequestContext& ctx) { | 103 | void PushIApplicationManagerInterface(HLERequestContext& ctx) { |
| 104 | LOG_DEBUG(Service_NS, "called"); | 104 | LOG_DEBUG(Service_NS, "called"); |
| 105 | 105 | ||
| 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -110,7 +110,7 @@ private: | |||
| 110 | 110 | ||
| 111 | template <typename T, typename... Args> | 111 | template <typename T, typename... Args> |
| 112 | std::shared_ptr<T> GetInterface(Args&&... args) const { | 112 | std::shared_ptr<T> GetInterface(Args&&... args) const { |
| 113 | static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, | 113 | static_assert(std::is_base_of_v<SessionRequestHandler, T>, |
| 114 | "Not a base of ServiceFrameworkBase"); | 114 | "Not a base of ServiceFrameworkBase"); |
| 115 | 115 | ||
| 116 | return std::make_shared<T>(std::forward<Args>(args)...); | 116 | return std::make_shared<T>(std::forward<Args>(args)...); |
diff --git a/src/core/hle/service/ns/pdm_qry.cpp b/src/core/hle/service/ns/pdm_qry.cpp index aac8f573f..ce0ee30e0 100644 --- a/src/core/hle/service/ns/pdm_qry.cpp +++ b/src/core/hle/service/ns/pdm_qry.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "common/uuid.h" | 7 | #include "common/uuid.h" |
| 8 | #include "core/hle/ipc_helpers.h" | 8 | #include "core/hle/service/ipc_helpers.h" |
| 9 | #include "core/hle/service/ns/pdm_qry.h" | 9 | #include "core/hle/service/ns/pdm_qry.h" |
| 10 | #include "core/hle/service/service.h" | 10 | #include "core/hle/service/service.h" |
| 11 | 11 | ||
| @@ -42,7 +42,7 @@ PDM_QRY::PDM_QRY(Core::System& system_) : ServiceFramework{system_, "pdm:qry"} { | |||
| 42 | 42 | ||
| 43 | PDM_QRY::~PDM_QRY() = default; | 43 | PDM_QRY::~PDM_QRY() = default; |
| 44 | 44 | ||
| 45 | void PDM_QRY::QueryPlayStatisticsByApplicationIdAndUserAccountId(Kernel::HLERequestContext& ctx) { | 45 | void PDM_QRY::QueryPlayStatisticsByApplicationIdAndUserAccountId(HLERequestContext& ctx) { |
| 46 | IPC::RequestParser rp{ctx}; | 46 | IPC::RequestParser rp{ctx}; |
| 47 | const auto unknown = rp.Pop<bool>(); | 47 | const auto unknown = rp.Pop<bool>(); |
| 48 | rp.Pop<u8>(); // Padding | 48 | rp.Pop<u8>(); // Padding |
diff --git a/src/core/hle/service/ns/pdm_qry.h b/src/core/hle/service/ns/pdm_qry.h index abcc3bef3..c98e01660 100644 --- a/src/core/hle/service/ns/pdm_qry.h +++ b/src/core/hle/service/ns/pdm_qry.h | |||
| @@ -26,7 +26,7 @@ public: | |||
| 26 | ~PDM_QRY() override; | 26 | ~PDM_QRY() override; |
| 27 | 27 | ||
| 28 | private: | 28 | private: |
| 29 | void QueryPlayStatisticsByApplicationIdAndUserAccountId(Kernel::HLERequestContext& ctx); | 29 | void QueryPlayStatisticsByApplicationIdAndUserAccountId(HLERequestContext& ctx); |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | } // namespace Service::NS | 32 | } // namespace Service::NS |
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index a70ea9385..5e71ec99f 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | #include <fmt/format.h> | 7 | #include <fmt/format.h> |
| 8 | #include "core/core.h" | 8 | #include "core/core.h" |
| 9 | #include "core/hle/ipc_helpers.h" | ||
| 10 | #include "core/hle/kernel/k_event.h" | 9 | #include "core/hle/kernel/k_event.h" |
| 10 | #include "core/hle/service/ipc_helpers.h" | ||
| 11 | #include "core/hle/service/nvdrv/core/container.h" | 11 | #include "core/hle/service/nvdrv/core/container.h" |
| 12 | #include "core/hle/service/nvdrv/devices/nvdevice.h" | 12 | #include "core/hle/service/nvdrv/devices/nvdevice.h" |
| 13 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" | 13 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" |
diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.cpp b/src/core/hle/service/nvdrv/nvdrv_interface.cpp index 396fa7ed5..d010a1e03 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.cpp +++ b/src/core/hle/service/nvdrv/nvdrv_interface.cpp | |||
| @@ -5,16 +5,16 @@ | |||
| 5 | #include <cinttypes> | 5 | #include <cinttypes> |
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/k_event.h" | 8 | #include "core/hle/kernel/k_event.h" |
| 10 | #include "core/hle/kernel/k_readable_event.h" | 9 | #include "core/hle/kernel/k_readable_event.h" |
| 10 | #include "core/hle/service/ipc_helpers.h" | ||
| 11 | #include "core/hle/service/nvdrv/nvdata.h" | 11 | #include "core/hle/service/nvdrv/nvdata.h" |
| 12 | #include "core/hle/service/nvdrv/nvdrv.h" | 12 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 13 | #include "core/hle/service/nvdrv/nvdrv_interface.h" | 13 | #include "core/hle/service/nvdrv/nvdrv_interface.h" |
| 14 | 14 | ||
| 15 | namespace Service::Nvidia { | 15 | namespace Service::Nvidia { |
| 16 | 16 | ||
| 17 | void NVDRV::Open(Kernel::HLERequestContext& ctx) { | 17 | void NVDRV::Open(HLERequestContext& ctx) { |
| 18 | LOG_DEBUG(Service_NVDRV, "called"); | 18 | LOG_DEBUG(Service_NVDRV, "called"); |
| 19 | IPC::ResponseBuilder rb{ctx, 4}; | 19 | IPC::ResponseBuilder rb{ctx, 4}; |
| 20 | rb.Push(ResultSuccess); | 20 | rb.Push(ResultSuccess); |
| @@ -44,13 +44,13 @@ void NVDRV::Open(Kernel::HLERequestContext& ctx) { | |||
| 44 | rb.PushEnum(fd != INVALID_NVDRV_FD ? NvResult::Success : NvResult::FileOperationFailed); | 44 | rb.PushEnum(fd != INVALID_NVDRV_FD ? NvResult::Success : NvResult::FileOperationFailed); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void NVDRV::ServiceError(Kernel::HLERequestContext& ctx, NvResult result) { | 47 | void NVDRV::ServiceError(HLERequestContext& ctx, NvResult result) { |
| 48 | IPC::ResponseBuilder rb{ctx, 3}; | 48 | IPC::ResponseBuilder rb{ctx, 3}; |
| 49 | rb.Push(ResultSuccess); | 49 | rb.Push(ResultSuccess); |
| 50 | rb.PushEnum(result); | 50 | rb.PushEnum(result); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void NVDRV::Ioctl1(Kernel::HLERequestContext& ctx) { | 53 | void NVDRV::Ioctl1(HLERequestContext& ctx) { |
| 54 | IPC::RequestParser rp{ctx}; | 54 | IPC::RequestParser rp{ctx}; |
| 55 | const auto fd = rp.Pop<DeviceFD>(); | 55 | const auto fd = rp.Pop<DeviceFD>(); |
| 56 | const auto command = rp.PopRaw<Ioctl>(); | 56 | const auto command = rp.PopRaw<Ioctl>(); |
| @@ -76,7 +76,7 @@ void NVDRV::Ioctl1(Kernel::HLERequestContext& ctx) { | |||
| 76 | rb.PushEnum(nv_result); | 76 | rb.PushEnum(nv_result); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | void NVDRV::Ioctl2(Kernel::HLERequestContext& ctx) { | 79 | void NVDRV::Ioctl2(HLERequestContext& ctx) { |
| 80 | IPC::RequestParser rp{ctx}; | 80 | IPC::RequestParser rp{ctx}; |
| 81 | const auto fd = rp.Pop<DeviceFD>(); | 81 | const auto fd = rp.Pop<DeviceFD>(); |
| 82 | const auto command = rp.PopRaw<Ioctl>(); | 82 | const auto command = rp.PopRaw<Ioctl>(); |
| @@ -103,7 +103,7 @@ void NVDRV::Ioctl2(Kernel::HLERequestContext& ctx) { | |||
| 103 | rb.PushEnum(nv_result); | 103 | rb.PushEnum(nv_result); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | void NVDRV::Ioctl3(Kernel::HLERequestContext& ctx) { | 106 | void NVDRV::Ioctl3(HLERequestContext& ctx) { |
| 107 | IPC::RequestParser rp{ctx}; | 107 | IPC::RequestParser rp{ctx}; |
| 108 | const auto fd = rp.Pop<DeviceFD>(); | 108 | const auto fd = rp.Pop<DeviceFD>(); |
| 109 | const auto command = rp.PopRaw<Ioctl>(); | 109 | const auto command = rp.PopRaw<Ioctl>(); |
| @@ -131,7 +131,7 @@ void NVDRV::Ioctl3(Kernel::HLERequestContext& ctx) { | |||
| 131 | rb.PushEnum(nv_result); | 131 | rb.PushEnum(nv_result); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | void NVDRV::Close(Kernel::HLERequestContext& ctx) { | 134 | void NVDRV::Close(HLERequestContext& ctx) { |
| 135 | LOG_DEBUG(Service_NVDRV, "called"); | 135 | LOG_DEBUG(Service_NVDRV, "called"); |
| 136 | 136 | ||
| 137 | if (!is_initialized) { | 137 | if (!is_initialized) { |
| @@ -149,7 +149,7 @@ void NVDRV::Close(Kernel::HLERequestContext& ctx) { | |||
| 149 | rb.PushEnum(result); | 149 | rb.PushEnum(result); |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { | 152 | void NVDRV::Initialize(HLERequestContext& ctx) { |
| 153 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 153 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 154 | 154 | ||
| 155 | is_initialized = true; | 155 | is_initialized = true; |
| @@ -159,7 +159,7 @@ void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 159 | rb.PushEnum(NvResult::Success); | 159 | rb.PushEnum(NvResult::Success); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { | 162 | void NVDRV::QueryEvent(HLERequestContext& ctx) { |
| 163 | IPC::RequestParser rp{ctx}; | 163 | IPC::RequestParser rp{ctx}; |
| 164 | const auto fd = rp.Pop<DeviceFD>(); | 164 | const auto fd = rp.Pop<DeviceFD>(); |
| 165 | const auto event_id = rp.Pop<u32>(); | 165 | const auto event_id = rp.Pop<u32>(); |
| @@ -187,7 +187,7 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { | |||
| 187 | } | 187 | } |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | void NVDRV::SetAruid(Kernel::HLERequestContext& ctx) { | 190 | void NVDRV::SetAruid(HLERequestContext& ctx) { |
| 191 | IPC::RequestParser rp{ctx}; | 191 | IPC::RequestParser rp{ctx}; |
| 192 | pid = rp.Pop<u64>(); | 192 | pid = rp.Pop<u64>(); |
| 193 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x{:X}", pid); | 193 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x{:X}", pid); |
| @@ -197,14 +197,14 @@ void NVDRV::SetAruid(Kernel::HLERequestContext& ctx) { | |||
| 197 | rb.PushEnum(NvResult::Success); | 197 | rb.PushEnum(NvResult::Success); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | void NVDRV::SetGraphicsFirmwareMemoryMarginEnabled(Kernel::HLERequestContext& ctx) { | 200 | void NVDRV::SetGraphicsFirmwareMemoryMarginEnabled(HLERequestContext& ctx) { |
| 201 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 201 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 202 | 202 | ||
| 203 | IPC::ResponseBuilder rb{ctx, 2}; | 203 | IPC::ResponseBuilder rb{ctx, 2}; |
| 204 | rb.Push(ResultSuccess); | 204 | rb.Push(ResultSuccess); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | void NVDRV::GetStatus(Kernel::HLERequestContext& ctx) { | 207 | void NVDRV::GetStatus(HLERequestContext& ctx) { |
| 208 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 208 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 209 | 209 | ||
| 210 | IPC::ResponseBuilder rb{ctx, 3}; | 210 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -212,7 +212,7 @@ void NVDRV::GetStatus(Kernel::HLERequestContext& ctx) { | |||
| 212 | rb.PushEnum(NvResult::Success); | 212 | rb.PushEnum(NvResult::Success); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | void NVDRV::DumpGraphicsMemoryInfo(Kernel::HLERequestContext& ctx) { | 215 | void NVDRV::DumpGraphicsMemoryInfo(HLERequestContext& ctx) { |
| 216 | // According to SwitchBrew, this has no inputs and no outputs, so effectively does nothing on | 216 | // According to SwitchBrew, this has no inputs and no outputs, so effectively does nothing on |
| 217 | // retail hardware. | 217 | // retail hardware. |
| 218 | LOG_DEBUG(Service_NVDRV, "called"); | 218 | LOG_DEBUG(Service_NVDRV, "called"); |
diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.h b/src/core/hle/service/nvdrv/nvdrv_interface.h index 5ac06ee30..881ea1a6b 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.h +++ b/src/core/hle/service/nvdrv/nvdrv_interface.h | |||
| @@ -15,19 +15,19 @@ public: | |||
| 15 | ~NVDRV() override; | 15 | ~NVDRV() override; |
| 16 | 16 | ||
| 17 | private: | 17 | private: |
| 18 | void Open(Kernel::HLERequestContext& ctx); | 18 | void Open(HLERequestContext& ctx); |
| 19 | void Ioctl1(Kernel::HLERequestContext& ctx); | 19 | void Ioctl1(HLERequestContext& ctx); |
| 20 | void Ioctl2(Kernel::HLERequestContext& ctx); | 20 | void Ioctl2(HLERequestContext& ctx); |
| 21 | void Ioctl3(Kernel::HLERequestContext& ctx); | 21 | void Ioctl3(HLERequestContext& ctx); |
| 22 | void Close(Kernel::HLERequestContext& ctx); | 22 | void Close(HLERequestContext& ctx); |
| 23 | void Initialize(Kernel::HLERequestContext& ctx); | 23 | void Initialize(HLERequestContext& ctx); |
| 24 | void QueryEvent(Kernel::HLERequestContext& ctx); | 24 | void QueryEvent(HLERequestContext& ctx); |
| 25 | void SetAruid(Kernel::HLERequestContext& ctx); | 25 | void SetAruid(HLERequestContext& ctx); |
| 26 | void SetGraphicsFirmwareMemoryMarginEnabled(Kernel::HLERequestContext& ctx); | 26 | void SetGraphicsFirmwareMemoryMarginEnabled(HLERequestContext& ctx); |
| 27 | void GetStatus(Kernel::HLERequestContext& ctx); | 27 | void GetStatus(HLERequestContext& ctx); |
| 28 | void DumpGraphicsMemoryInfo(Kernel::HLERequestContext& ctx); | 28 | void DumpGraphicsMemoryInfo(HLERequestContext& ctx); |
| 29 | 29 | ||
| 30 | void ServiceError(Kernel::HLERequestContext& ctx, NvResult result); | 30 | void ServiceError(HLERequestContext& ctx, NvResult result); |
| 31 | 31 | ||
| 32 | std::shared_ptr<Module> nvdrv; | 32 | std::shared_ptr<Module> nvdrv; |
| 33 | 33 | ||
diff --git a/src/core/hle/service/nvdrv/nvmemp.cpp b/src/core/hle/service/nvdrv/nvmemp.cpp index e433580b1..fc10f6406 100644 --- a/src/core/hle/service/nvdrv/nvmemp.cpp +++ b/src/core/hle/service/nvdrv/nvmemp.cpp | |||
| @@ -17,11 +17,11 @@ NVMEMP::NVMEMP(Core::System& system_) : ServiceFramework{system_, "nvmemp"} { | |||
| 17 | 17 | ||
| 18 | NVMEMP::~NVMEMP() = default; | 18 | NVMEMP::~NVMEMP() = default; |
| 19 | 19 | ||
| 20 | void NVMEMP::Open(Kernel::HLERequestContext& ctx) { | 20 | void NVMEMP::Open(HLERequestContext& ctx) { |
| 21 | UNIMPLEMENTED(); | 21 | UNIMPLEMENTED(); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | void NVMEMP::GetAruid(Kernel::HLERequestContext& ctx) { | 24 | void NVMEMP::GetAruid(HLERequestContext& ctx) { |
| 25 | UNIMPLEMENTED(); | 25 | UNIMPLEMENTED(); |
| 26 | } | 26 | } |
| 27 | 27 | ||
diff --git a/src/core/hle/service/nvdrv/nvmemp.h b/src/core/hle/service/nvdrv/nvmemp.h index 3d4276327..85e3053a8 100644 --- a/src/core/hle/service/nvdrv/nvmemp.h +++ b/src/core/hle/service/nvdrv/nvmemp.h | |||
| @@ -17,8 +17,8 @@ public: | |||
| 17 | ~NVMEMP() override; | 17 | ~NVMEMP() override; |
| 18 | 18 | ||
| 19 | private: | 19 | private: |
| 20 | void Open(Kernel::HLERequestContext& ctx); | 20 | void Open(HLERequestContext& ctx); |
| 21 | void GetAruid(Kernel::HLERequestContext& ctx); | 21 | void GetAruid(HLERequestContext& ctx); |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | } // namespace Service::Nvidia | 24 | } // namespace Service::Nvidia |
diff --git a/src/core/hle/service/nvflinger/binder.h b/src/core/hle/service/nvflinger/binder.h index 157333ff8..aef1477e3 100644 --- a/src/core/hle/service/nvflinger/binder.h +++ b/src/core/hle/service/nvflinger/binder.h | |||
| @@ -9,10 +9,13 @@ | |||
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | 10 | ||
| 11 | namespace Kernel { | 11 | namespace Kernel { |
| 12 | class HLERequestContext; | ||
| 13 | class KReadableEvent; | 12 | class KReadableEvent; |
| 14 | } // namespace Kernel | 13 | } // namespace Kernel |
| 15 | 14 | ||
| 15 | namespace Service { | ||
| 16 | class HLERequestContext; | ||
| 17 | } | ||
| 18 | |||
| 16 | namespace Service::android { | 19 | namespace Service::android { |
| 17 | 20 | ||
| 18 | enum class TransactionId { | 21 | enum class TransactionId { |
| @@ -35,8 +38,7 @@ enum class TransactionId { | |||
| 35 | class IBinder { | 38 | class IBinder { |
| 36 | public: | 39 | public: |
| 37 | virtual ~IBinder() = default; | 40 | virtual ~IBinder() = default; |
| 38 | virtual void Transact(Kernel::HLERequestContext& ctx, android::TransactionId code, | 41 | virtual void Transact(HLERequestContext& ctx, android::TransactionId code, u32 flags) = 0; |
| 39 | u32 flags) = 0; | ||
| 40 | virtual Kernel::KReadableEvent& GetNativeHandle() = 0; | 42 | virtual Kernel::KReadableEvent& GetNativeHandle() = 0; |
| 41 | }; | 43 | }; |
| 42 | 44 | ||
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp index bcbe05b0d..ad73edd66 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "core/core.h" | 10 | #include "core/core.h" |
| 11 | #include "core/hle/kernel/hle_ipc.h" | ||
| 12 | #include "core/hle/kernel/k_event.h" | 11 | #include "core/hle/kernel/k_event.h" |
| 13 | #include "core/hle/kernel/k_readable_event.h" | 12 | #include "core/hle/kernel/k_readable_event.h" |
| 14 | #include "core/hle/kernel/kernel.h" | 13 | #include "core/hle/kernel/kernel.h" |
| 14 | #include "core/hle/service/hle_ipc.h" | ||
| 15 | #include "core/hle/service/kernel_helpers.h" | 15 | #include "core/hle/service/kernel_helpers.h" |
| 16 | #include "core/hle/service/nvdrv/core/nvmap.h" | 16 | #include "core/hle/service/nvdrv/core/nvmap.h" |
| 17 | #include "core/hle/service/nvflinger/buffer_queue_core.h" | 17 | #include "core/hle/service/nvflinger/buffer_queue_core.h" |
| @@ -813,7 +813,7 @@ Status BufferQueueProducer::SetPreallocatedBuffer(s32 slot, | |||
| 813 | return Status::NoError; | 813 | return Status::NoError; |
| 814 | } | 814 | } |
| 815 | 815 | ||
| 816 | void BufferQueueProducer::Transact(Kernel::HLERequestContext& ctx, TransactionId code, u32 flags) { | 816 | void BufferQueueProducer::Transact(HLERequestContext& ctx, TransactionId code, u32 flags) { |
| 817 | Status status{Status::NoError}; | 817 | Status status{Status::NoError}; |
| 818 | InputParcel parcel_in{ctx.ReadBuffer()}; | 818 | InputParcel parcel_in{ctx.ReadBuffer()}; |
| 819 | OutputParcel parcel_out{}; | 819 | OutputParcel parcel_out{}; |
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.h b/src/core/hle/service/nvflinger/buffer_queue_producer.h index 1d380480f..16189fa6f 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.h +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.h | |||
| @@ -46,7 +46,7 @@ public: | |||
| 46 | Service::Nvidia::NvCore::NvMap& nvmap_); | 46 | Service::Nvidia::NvCore::NvMap& nvmap_); |
| 47 | ~BufferQueueProducer(); | 47 | ~BufferQueueProducer(); |
| 48 | 48 | ||
| 49 | void Transact(Kernel::HLERequestContext& ctx, android::TransactionId code, u32 flags) override; | 49 | void Transact(HLERequestContext& ctx, android::TransactionId code, u32 flags) override; |
| 50 | 50 | ||
| 51 | Kernel::KReadableEvent& GetNativeHandle() override; | 51 | Kernel::KReadableEvent& GetNativeHandle() override; |
| 52 | 52 | ||
diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp index 3493f8272..14ba67b4c 100644 --- a/src/core/hle/service/olsc/olsc.cpp +++ b/src/core/hle/service/olsc/olsc.cpp | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/ipc_helpers.h" | 4 | #include "core/hle/service/ipc_helpers.h" |
| 5 | #include "core/hle/service/olsc/olsc.h" | 5 | #include "core/hle/service/olsc/olsc.h" |
| 6 | #include "core/hle/service/server_manager.h" | 6 | #include "core/hle/service/server_manager.h" |
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| @@ -42,7 +42,7 @@ public: | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | private: | 44 | private: |
| 45 | void Initialize(Kernel::HLERequestContext& ctx) { | 45 | void Initialize(HLERequestContext& ctx) { |
| 46 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | 46 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); |
| 47 | 47 | ||
| 48 | initialized = true; | 48 | initialized = true; |
| @@ -51,7 +51,7 @@ private: | |||
| 51 | rb.Push(ResultSuccess); | 51 | rb.Push(ResultSuccess); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void GetSaveDataBackupSetting(Kernel::HLERequestContext& ctx) { | 54 | void GetSaveDataBackupSetting(HLERequestContext& ctx) { |
| 55 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | 55 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); |
| 56 | 56 | ||
| 57 | // backup_setting is set to 0 since real value is unknown | 57 | // backup_setting is set to 0 since real value is unknown |
| @@ -62,7 +62,7 @@ private: | |||
| 62 | rb.Push(backup_setting); | 62 | rb.Push(backup_setting); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | void SetSaveDataBackupSettingEnabled(Kernel::HLERequestContext& ctx) { | 65 | void SetSaveDataBackupSettingEnabled(HLERequestContext& ctx) { |
| 66 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | 66 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); |
| 67 | 67 | ||
| 68 | IPC::ResponseBuilder rb{ctx, 2}; | 68 | IPC::ResponseBuilder rb{ctx, 2}; |
diff --git a/src/core/hle/service/pctl/pctl_module.cpp b/src/core/hle/service/pctl/pctl_module.cpp index a4a12a78c..f966c5c8b 100644 --- a/src/core/hle/service/pctl/pctl_module.cpp +++ b/src/core/hle/service/pctl/pctl_module.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/file_sys/control_metadata.h" | 6 | #include "core/file_sys/control_metadata.h" |
| 7 | #include "core/file_sys/patch_manager.h" | 7 | #include "core/file_sys/patch_manager.h" |
| 8 | #include "core/hle/ipc_helpers.h" | 8 | #include "core/hle/service/ipc_helpers.h" |
| 9 | #include "core/hle/service/pctl/pctl.h" | 9 | #include "core/hle/service/pctl/pctl.h" |
| 10 | #include "core/hle/service/pctl/pctl_module.h" | 10 | #include "core/hle/service/pctl/pctl_module.h" |
| 11 | #include "core/hle/service/server_manager.h" | 11 | #include "core/hle/service/server_manager.h" |
| @@ -177,7 +177,7 @@ private: | |||
| 177 | settings.is_stero_vision_restricted = is_restricted; | 177 | settings.is_stero_vision_restricted = is_restricted; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void Initialize(Kernel::HLERequestContext& ctx) { | 180 | void Initialize(HLERequestContext& ctx) { |
| 181 | LOG_DEBUG(Service_PCTL, "called"); | 181 | LOG_DEBUG(Service_PCTL, "called"); |
| 182 | IPC::ResponseBuilder rb{ctx, 2}; | 182 | IPC::ResponseBuilder rb{ctx, 2}; |
| 183 | 183 | ||
| @@ -215,7 +215,7 @@ private: | |||
| 215 | rb.Push(ResultSuccess); | 215 | rb.Push(ResultSuccess); |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | void CheckFreeCommunicationPermission(Kernel::HLERequestContext& ctx) { | 218 | void CheckFreeCommunicationPermission(HLERequestContext& ctx) { |
| 219 | LOG_DEBUG(Service_PCTL, "called"); | 219 | LOG_DEBUG(Service_PCTL, "called"); |
| 220 | 220 | ||
| 221 | IPC::ResponseBuilder rb{ctx, 2}; | 221 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -228,7 +228,7 @@ private: | |||
| 228 | states.free_communication = true; | 228 | states.free_communication = true; |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void ConfirmStereoVisionPermission(Kernel::HLERequestContext& ctx) { | 231 | void ConfirmStereoVisionPermission(HLERequestContext& ctx) { |
| 232 | LOG_DEBUG(Service_PCTL, "called"); | 232 | LOG_DEBUG(Service_PCTL, "called"); |
| 233 | states.stereo_vision = true; | 233 | states.stereo_vision = true; |
| 234 | 234 | ||
| @@ -236,14 +236,14 @@ private: | |||
| 236 | rb.Push(ResultSuccess); | 236 | rb.Push(ResultSuccess); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | void EndFreeCommunication(Kernel::HLERequestContext& ctx) { | 239 | void EndFreeCommunication(HLERequestContext& ctx) { |
| 240 | LOG_WARNING(Service_PCTL, "(STUBBED) called"); | 240 | LOG_WARNING(Service_PCTL, "(STUBBED) called"); |
| 241 | 241 | ||
| 242 | IPC::ResponseBuilder rb{ctx, 2}; | 242 | IPC::ResponseBuilder rb{ctx, 2}; |
| 243 | rb.Push(ResultSuccess); | 243 | rb.Push(ResultSuccess); |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | void IsFreeCommunicationAvailable(Kernel::HLERequestContext& ctx) { | 246 | void IsFreeCommunicationAvailable(HLERequestContext& ctx) { |
| 247 | LOG_WARNING(Service_PCTL, "(STUBBED) called"); | 247 | LOG_WARNING(Service_PCTL, "(STUBBED) called"); |
| 248 | 248 | ||
| 249 | IPC::ResponseBuilder rb{ctx, 2}; | 249 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -254,7 +254,7 @@ private: | |||
| 254 | } | 254 | } |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | void IsRestrictionEnabled(Kernel::HLERequestContext& ctx) { | 257 | void IsRestrictionEnabled(HLERequestContext& ctx) { |
| 258 | LOG_DEBUG(Service_PCTL, "called"); | 258 | LOG_DEBUG(Service_PCTL, "called"); |
| 259 | 259 | ||
| 260 | IPC::ResponseBuilder rb{ctx, 3}; | 260 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -268,7 +268,7 @@ private: | |||
| 268 | rb.Push(pin_code[0] != '\0'); | 268 | rb.Push(pin_code[0] != '\0'); |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | void ConfirmStereoVisionRestrictionConfigurable(Kernel::HLERequestContext& ctx) { | 271 | void ConfirmStereoVisionRestrictionConfigurable(HLERequestContext& ctx) { |
| 272 | LOG_DEBUG(Service_PCTL, "called"); | 272 | LOG_DEBUG(Service_PCTL, "called"); |
| 273 | 273 | ||
| 274 | IPC::ResponseBuilder rb{ctx, 2}; | 274 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -287,7 +287,7 @@ private: | |||
| 287 | rb.Push(ResultSuccess); | 287 | rb.Push(ResultSuccess); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | void IsStereoVisionPermitted(Kernel::HLERequestContext& ctx) { | 290 | void IsStereoVisionPermitted(HLERequestContext& ctx) { |
| 291 | LOG_DEBUG(Service_PCTL, "called"); | 291 | LOG_DEBUG(Service_PCTL, "called"); |
| 292 | 292 | ||
| 293 | IPC::ResponseBuilder rb{ctx, 3}; | 293 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -300,7 +300,7 @@ private: | |||
| 300 | } | 300 | } |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | void SetStereoVisionRestriction(Kernel::HLERequestContext& ctx) { | 303 | void SetStereoVisionRestriction(HLERequestContext& ctx) { |
| 304 | IPC::RequestParser rp{ctx}; | 304 | IPC::RequestParser rp{ctx}; |
| 305 | const auto can_use = rp.Pop<bool>(); | 305 | const auto can_use = rp.Pop<bool>(); |
| 306 | LOG_DEBUG(Service_PCTL, "called, can_use={}", can_use); | 306 | LOG_DEBUG(Service_PCTL, "called, can_use={}", can_use); |
| @@ -316,7 +316,7 @@ private: | |||
| 316 | rb.Push(ResultSuccess); | 316 | rb.Push(ResultSuccess); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | void GetStereoVisionRestriction(Kernel::HLERequestContext& ctx) { | 319 | void GetStereoVisionRestriction(HLERequestContext& ctx) { |
| 320 | LOG_DEBUG(Service_PCTL, "called"); | 320 | LOG_DEBUG(Service_PCTL, "called"); |
| 321 | 321 | ||
| 322 | IPC::ResponseBuilder rb{ctx, 3}; | 322 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -331,7 +331,7 @@ private: | |||
| 331 | rb.Push(settings.is_stero_vision_restricted); | 331 | rb.Push(settings.is_stero_vision_restricted); |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | void ResetConfirmedStereoVisionPermission(Kernel::HLERequestContext& ctx) { | 334 | void ResetConfirmedStereoVisionPermission(HLERequestContext& ctx) { |
| 335 | LOG_DEBUG(Service_PCTL, "called"); | 335 | LOG_DEBUG(Service_PCTL, "called"); |
| 336 | 336 | ||
| 337 | states.stereo_vision = false; | 337 | states.stereo_vision = false; |
| @@ -370,7 +370,7 @@ private: | |||
| 370 | Capability capability{}; | 370 | Capability capability{}; |
| 371 | }; | 371 | }; |
| 372 | 372 | ||
| 373 | void Module::Interface::CreateService(Kernel::HLERequestContext& ctx) { | 373 | void Module::Interface::CreateService(HLERequestContext& ctx) { |
| 374 | LOG_DEBUG(Service_PCTL, "called"); | 374 | LOG_DEBUG(Service_PCTL, "called"); |
| 375 | 375 | ||
| 376 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 376 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -380,7 +380,7 @@ void Module::Interface::CreateService(Kernel::HLERequestContext& ctx) { | |||
| 380 | rb.PushIpcInterface<IParentalControlService>(system, capability); | 380 | rb.PushIpcInterface<IParentalControlService>(system, capability); |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | void Module::Interface::CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx) { | 383 | void Module::Interface::CreateServiceWithoutInitialize(HLERequestContext& ctx) { |
| 384 | LOG_DEBUG(Service_PCTL, "called"); | 384 | LOG_DEBUG(Service_PCTL, "called"); |
| 385 | 385 | ||
| 386 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 386 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/pctl/pctl_module.h b/src/core/hle/service/pctl/pctl_module.h index 4ea77ab21..dff0d3f08 100644 --- a/src/core/hle/service/pctl/pctl_module.h +++ b/src/core/hle/service/pctl/pctl_module.h | |||
| @@ -31,8 +31,8 @@ public: | |||
| 31 | const char* name_, Capability capability_); | 31 | const char* name_, Capability capability_); |
| 32 | ~Interface() override; | 32 | ~Interface() override; |
| 33 | 33 | ||
| 34 | void CreateService(Kernel::HLERequestContext& ctx); | 34 | void CreateService(HLERequestContext& ctx); |
| 35 | void CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx); | 35 | void CreateServiceWithoutInitialize(HLERequestContext& ctx); |
| 36 | 36 | ||
| 37 | protected: | 37 | protected: |
| 38 | std::shared_ptr<Module> module; | 38 | std::shared_ptr<Module> module; |
diff --git a/src/core/hle/service/pcv/pcv.cpp b/src/core/hle/service/pcv/pcv.cpp index be64b94ea..c13ffa6f6 100644 --- a/src/core/hle/service/pcv/pcv.cpp +++ b/src/core/hle/service/pcv/pcv.cpp | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/service/ipc_helpers.h" |
| 7 | #include "core/hle/service/pcv/pcv.h" | 7 | #include "core/hle/service/pcv/pcv.h" |
| 8 | #include "core/hle/service/server_manager.h" | 8 | #include "core/hle/service/server_manager.h" |
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| @@ -76,7 +76,7 @@ public: | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | private: | 78 | private: |
| 79 | void SetClockRate(Kernel::HLERequestContext& ctx) { | 79 | void SetClockRate(HLERequestContext& ctx) { |
| 80 | IPC::RequestParser rp{ctx}; | 80 | IPC::RequestParser rp{ctx}; |
| 81 | clock_rate = rp.Pop<u32>(); | 81 | clock_rate = rp.Pop<u32>(); |
| 82 | LOG_DEBUG(Service_PCV, "(STUBBED) called, clock_rate={}", clock_rate); | 82 | LOG_DEBUG(Service_PCV, "(STUBBED) called, clock_rate={}", clock_rate); |
| @@ -85,7 +85,7 @@ private: | |||
| 85 | rb.Push(ResultSuccess); | 85 | rb.Push(ResultSuccess); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | void GetClockRate(Kernel::HLERequestContext& ctx) { | 88 | void GetClockRate(HLERequestContext& ctx) { |
| 89 | LOG_DEBUG(Service_PCV, "(STUBBED) called"); | 89 | LOG_DEBUG(Service_PCV, "(STUBBED) called"); |
| 90 | 90 | ||
| 91 | IPC::ResponseBuilder rb{ctx, 3}; | 91 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -115,7 +115,7 @@ public: | |||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | private: | 117 | private: |
| 118 | void OpenSession(Kernel::HLERequestContext& ctx) { | 118 | void OpenSession(HLERequestContext& ctx) { |
| 119 | IPC::RequestParser rp{ctx}; | 119 | IPC::RequestParser rp{ctx}; |
| 120 | const auto device_code = static_cast<DeviceCode>(rp.Pop<u32>()); | 120 | const auto device_code = static_cast<DeviceCode>(rp.Pop<u32>()); |
| 121 | const auto unkonwn_input = rp.Pop<u32>(); | 121 | const auto unkonwn_input = rp.Pop<u32>(); |
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index 02a4ca13b..ea249c26f 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/core.h" | 4 | #include "core/core.h" |
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/kernel/k_process.h" | 5 | #include "core/hle/kernel/k_process.h" |
| 7 | #include "core/hle/kernel/kernel.h" | 6 | #include "core/hle/kernel/kernel.h" |
| 7 | #include "core/hle/service/ipc_helpers.h" | ||
| 8 | #include "core/hle/service/pm/pm.h" | 8 | #include "core/hle/service/pm/pm.h" |
| 9 | #include "core/hle/service/server_manager.h" | 9 | #include "core/hle/service/server_manager.h" |
| 10 | #include "core/hle/service/service.h" | 10 | #include "core/hle/service/service.h" |
| @@ -34,7 +34,7 @@ std::optional<Kernel::KProcess*> SearchProcessList( | |||
| 34 | return *iter; | 34 | return *iter; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx, | 37 | void GetApplicationPidGeneric(HLERequestContext& ctx, |
| 38 | const std::vector<Kernel::KProcess*>& process_list) { | 38 | const std::vector<Kernel::KProcess*>& process_list) { |
| 39 | const auto process = SearchProcessList(process_list, [](const auto& proc) { | 39 | const auto process = SearchProcessList(process_list, [](const auto& proc) { |
| 40 | return proc->GetProcessID() == Kernel::KProcess::ProcessIDMin; | 40 | return proc->GetProcessID() == Kernel::KProcess::ProcessIDMin; |
| @@ -58,7 +58,7 @@ public: | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | private: | 60 | private: |
| 61 | void GetBootMode(Kernel::HLERequestContext& ctx) { | 61 | void GetBootMode(HLERequestContext& ctx) { |
| 62 | LOG_DEBUG(Service_PM, "called"); | 62 | LOG_DEBUG(Service_PM, "called"); |
| 63 | 63 | ||
| 64 | IPC::ResponseBuilder rb{ctx, 3}; | 64 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -66,7 +66,7 @@ private: | |||
| 66 | rb.PushEnum(boot_mode); | 66 | rb.PushEnum(boot_mode); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void SetMaintenanceBoot(Kernel::HLERequestContext& ctx) { | 69 | void SetMaintenanceBoot(HLERequestContext& ctx) { |
| 70 | LOG_DEBUG(Service_PM, "called"); | 70 | LOG_DEBUG(Service_PM, "called"); |
| 71 | 71 | ||
| 72 | boot_mode = SystemBootMode::Maintenance; | 72 | boot_mode = SystemBootMode::Maintenance; |
| @@ -100,7 +100,7 @@ public: | |||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | private: | 102 | private: |
| 103 | void GetProcessId(Kernel::HLERequestContext& ctx) { | 103 | void GetProcessId(HLERequestContext& ctx) { |
| 104 | IPC::RequestParser rp{ctx}; | 104 | IPC::RequestParser rp{ctx}; |
| 105 | const auto program_id = rp.PopRaw<u64>(); | 105 | const auto program_id = rp.PopRaw<u64>(); |
| 106 | 106 | ||
| @@ -122,12 +122,12 @@ private: | |||
| 122 | rb.Push((*process)->GetProcessID()); | 122 | rb.Push((*process)->GetProcessID()); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void GetApplicationProcessId(Kernel::HLERequestContext& ctx) { | 125 | void GetApplicationProcessId(HLERequestContext& ctx) { |
| 126 | LOG_DEBUG(Service_PM, "called"); | 126 | LOG_DEBUG(Service_PM, "called"); |
| 127 | GetApplicationPidGeneric(ctx, kernel.GetProcessList()); | 127 | GetApplicationPidGeneric(ctx, kernel.GetProcessList()); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | void AtmosphereGetProcessInfo(Kernel::HLERequestContext& ctx) { | 130 | void AtmosphereGetProcessInfo(HLERequestContext& ctx) { |
| 131 | // https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/pm/source/impl/pm_process_manager.cpp#L614 | 131 | // https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/pm/source/impl/pm_process_manager.cpp#L614 |
| 132 | // This implementation is incomplete; only a handle to the process is returned. | 132 | // This implementation is incomplete; only a handle to the process is returned. |
| 133 | IPC::RequestParser rp{ctx}; | 133 | IPC::RequestParser rp{ctx}; |
| @@ -187,7 +187,7 @@ public: | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | private: | 189 | private: |
| 190 | void GetProgramId(Kernel::HLERequestContext& ctx) { | 190 | void GetProgramId(HLERequestContext& ctx) { |
| 191 | IPC::RequestParser rp{ctx}; | 191 | IPC::RequestParser rp{ctx}; |
| 192 | const auto process_id = rp.PopRaw<u64>(); | 192 | const auto process_id = rp.PopRaw<u64>(); |
| 193 | 193 | ||
| @@ -208,7 +208,7 @@ private: | |||
| 208 | rb.Push((*process)->GetProgramID()); | 208 | rb.Push((*process)->GetProgramID()); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | void AtmosphereGetProcessId(Kernel::HLERequestContext& ctx) { | 211 | void AtmosphereGetProcessId(HLERequestContext& ctx) { |
| 212 | IPC::RequestParser rp{ctx}; | 212 | IPC::RequestParser rp{ctx}; |
| 213 | const auto program_id = rp.PopRaw<u64>(); | 213 | const auto program_id = rp.PopRaw<u64>(); |
| 214 | 214 | ||
| @@ -255,7 +255,7 @@ public: | |||
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | private: | 257 | private: |
| 258 | void GetApplicationProcessIdForShell(Kernel::HLERequestContext& ctx) { | 258 | void GetApplicationProcessIdForShell(HLERequestContext& ctx) { |
| 259 | LOG_DEBUG(Service_PM, "called"); | 259 | LOG_DEBUG(Service_PM, "called"); |
| 260 | GetApplicationPidGeneric(ctx, kernel.GetProcessList()); | 260 | GetApplicationPidGeneric(ctx, kernel.GetProcessList()); |
| 261 | } | 261 | } |
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index 02af311e8..ec4a84989 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include "common/hex_util.h" | 4 | #include "common/hex_util.h" |
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "core/core.h" | 6 | #include "core/core.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/service/acc/profile_manager.h" | 7 | #include "core/hle/service/acc/profile_manager.h" |
| 8 | #include "core/hle/service/ipc_helpers.h" | ||
| 9 | #include "core/hle/service/prepo/prepo.h" | 9 | #include "core/hle/service/prepo/prepo.h" |
| 10 | #include "core/hle/service/server_manager.h" | 10 | #include "core/hle/service/server_manager.h" |
| 11 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| @@ -54,7 +54,7 @@ public: | |||
| 54 | 54 | ||
| 55 | private: | 55 | private: |
| 56 | template <Core::Reporter::PlayReportType Type> | 56 | template <Core::Reporter::PlayReportType Type> |
| 57 | void SaveReport(Kernel::HLERequestContext& ctx) { | 57 | void SaveReport(HLERequestContext& ctx) { |
| 58 | IPC::RequestParser rp{ctx}; | 58 | IPC::RequestParser rp{ctx}; |
| 59 | const auto process_id = rp.PopRaw<u64>(); | 59 | const auto process_id = rp.PopRaw<u64>(); |
| 60 | 60 | ||
| @@ -80,7 +80,7 @@ private: | |||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | template <Core::Reporter::PlayReportType Type> | 82 | template <Core::Reporter::PlayReportType Type> |
| 83 | void SaveReportWithUser(Kernel::HLERequestContext& ctx) { | 83 | void SaveReportWithUser(HLERequestContext& ctx) { |
| 84 | IPC::RequestParser rp{ctx}; | 84 | IPC::RequestParser rp{ctx}; |
| 85 | const auto user_id = rp.PopRaw<u128>(); | 85 | const auto user_id = rp.PopRaw<u128>(); |
| 86 | const auto process_id = rp.PopRaw<u64>(); | 86 | const auto process_id = rp.PopRaw<u64>(); |
| @@ -107,14 +107,14 @@ private: | |||
| 107 | rb.Push(ResultSuccess); | 107 | rb.Push(ResultSuccess); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | void RequestImmediateTransmission(Kernel::HLERequestContext& ctx) { | 110 | void RequestImmediateTransmission(HLERequestContext& ctx) { |
| 111 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); | 111 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); |
| 112 | 112 | ||
| 113 | IPC::ResponseBuilder rb{ctx, 2}; | 113 | IPC::ResponseBuilder rb{ctx, 2}; |
| 114 | rb.Push(ResultSuccess); | 114 | rb.Push(ResultSuccess); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | void GetTransmissionStatus(Kernel::HLERequestContext& ctx) { | 117 | void GetTransmissionStatus(HLERequestContext& ctx) { |
| 118 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); | 118 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); |
| 119 | 119 | ||
| 120 | constexpr s32 status = 0; | 120 | constexpr s32 status = 0; |
| @@ -124,7 +124,7 @@ private: | |||
| 124 | rb.Push(status); | 124 | rb.Push(status); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | void GetSystemSessionId(Kernel::HLERequestContext& ctx) { | 127 | void GetSystemSessionId(HLERequestContext& ctx) { |
| 128 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); | 128 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); |
| 129 | 129 | ||
| 130 | constexpr u64 system_session_id = 0; | 130 | constexpr u64 system_session_id = 0; |
| @@ -133,7 +133,7 @@ private: | |||
| 133 | rb.Push(system_session_id); | 133 | rb.Push(system_session_id); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | void SaveSystemReport(Kernel::HLERequestContext& ctx) { | 136 | void SaveSystemReport(HLERequestContext& ctx) { |
| 137 | IPC::RequestParser rp{ctx}; | 137 | IPC::RequestParser rp{ctx}; |
| 138 | const auto title_id = rp.PopRaw<u64>(); | 138 | const auto title_id = rp.PopRaw<u64>(); |
| 139 | 139 | ||
| @@ -156,7 +156,7 @@ private: | |||
| 156 | rb.Push(ResultSuccess); | 156 | rb.Push(ResultSuccess); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | void SaveSystemReportWithUser(Kernel::HLERequestContext& ctx) { | 159 | void SaveSystemReportWithUser(HLERequestContext& ctx) { |
| 160 | IPC::RequestParser rp{ctx}; | 160 | IPC::RequestParser rp{ctx}; |
| 161 | const auto user_id = rp.PopRaw<u128>(); | 161 | const auto user_id = rp.PopRaw<u128>(); |
| 162 | const auto title_id = rp.PopRaw<u64>(); | 162 | const auto title_id = rp.PopRaw<u64>(); |
diff --git a/src/core/hle/service/psc/psc.cpp b/src/core/hle/service/psc/psc.cpp index 1650d2f39..25702703e 100644 --- a/src/core/hle/service/psc/psc.cpp +++ b/src/core/hle/service/psc/psc.cpp | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/service/ipc_helpers.h" |
| 8 | #include "core/hle/service/psc/psc.h" | 8 | #include "core/hle/service/psc/psc.h" |
| 9 | #include "core/hle/service/server_manager.h" | 9 | #include "core/hle/service/server_manager.h" |
| 10 | #include "core/hle/service/service.h" | 10 | #include "core/hle/service/service.h" |
| @@ -62,7 +62,7 @@ public: | |||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | private: | 64 | private: |
| 65 | void GetPmModule(Kernel::HLERequestContext& ctx) { | 65 | void GetPmModule(HLERequestContext& ctx) { |
| 66 | LOG_DEBUG(Service_PSC, "called"); | 66 | LOG_DEBUG(Service_PSC, "called"); |
| 67 | 67 | ||
| 68 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 68 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/ptm/psm.cpp b/src/core/hle/service/ptm/psm.cpp index 1ac97fe31..136313d7b 100644 --- a/src/core/hle/service/ptm/psm.cpp +++ b/src/core/hle/service/ptm/psm.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/k_event.h" | 8 | #include "core/hle/kernel/k_event.h" |
| 9 | #include "core/hle/service/ipc_helpers.h" | ||
| 10 | #include "core/hle/service/kernel_helpers.h" | 10 | #include "core/hle/service/kernel_helpers.h" |
| 11 | #include "core/hle/service/ptm/psm.h" | 11 | #include "core/hle/service/ptm/psm.h" |
| 12 | 12 | ||
| @@ -54,7 +54,7 @@ public: | |||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | private: | 56 | private: |
| 57 | void BindStateChangeEvent(Kernel::HLERequestContext& ctx) { | 57 | void BindStateChangeEvent(HLERequestContext& ctx) { |
| 58 | LOG_DEBUG(Service_PTM, "called"); | 58 | LOG_DEBUG(Service_PTM, "called"); |
| 59 | 59 | ||
| 60 | should_signal = true; | 60 | should_signal = true; |
| @@ -64,7 +64,7 @@ private: | |||
| 64 | rb.PushCopyObjects(state_change_event->GetReadableEvent()); | 64 | rb.PushCopyObjects(state_change_event->GetReadableEvent()); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void UnbindStateChangeEvent(Kernel::HLERequestContext& ctx) { | 67 | void UnbindStateChangeEvent(HLERequestContext& ctx) { |
| 68 | LOG_DEBUG(Service_PTM, "called"); | 68 | LOG_DEBUG(Service_PTM, "called"); |
| 69 | 69 | ||
| 70 | should_signal = false; | 70 | should_signal = false; |
| @@ -73,7 +73,7 @@ private: | |||
| 73 | rb.Push(ResultSuccess); | 73 | rb.Push(ResultSuccess); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | void SetChargerTypeChangeEventEnabled(Kernel::HLERequestContext& ctx) { | 76 | void SetChargerTypeChangeEventEnabled(HLERequestContext& ctx) { |
| 77 | IPC::RequestParser rp{ctx}; | 77 | IPC::RequestParser rp{ctx}; |
| 78 | const auto state = rp.Pop<bool>(); | 78 | const auto state = rp.Pop<bool>(); |
| 79 | LOG_DEBUG(Service_PTM, "called, state={}", state); | 79 | LOG_DEBUG(Service_PTM, "called, state={}", state); |
| @@ -84,7 +84,7 @@ private: | |||
| 84 | rb.Push(ResultSuccess); | 84 | rb.Push(ResultSuccess); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void SetPowerSupplyChangeEventEnabled(Kernel::HLERequestContext& ctx) { | 87 | void SetPowerSupplyChangeEventEnabled(HLERequestContext& ctx) { |
| 88 | IPC::RequestParser rp{ctx}; | 88 | IPC::RequestParser rp{ctx}; |
| 89 | const auto state = rp.Pop<bool>(); | 89 | const auto state = rp.Pop<bool>(); |
| 90 | LOG_DEBUG(Service_PTM, "called, state={}", state); | 90 | LOG_DEBUG(Service_PTM, "called, state={}", state); |
| @@ -95,7 +95,7 @@ private: | |||
| 95 | rb.Push(ResultSuccess); | 95 | rb.Push(ResultSuccess); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void SetBatteryVoltageStateChangeEventEnabled(Kernel::HLERequestContext& ctx) { | 98 | void SetBatteryVoltageStateChangeEventEnabled(HLERequestContext& ctx) { |
| 99 | IPC::RequestParser rp{ctx}; | 99 | IPC::RequestParser rp{ctx}; |
| 100 | const auto state = rp.Pop<bool>(); | 100 | const auto state = rp.Pop<bool>(); |
| 101 | LOG_DEBUG(Service_PTM, "called, state={}", state); | 101 | LOG_DEBUG(Service_PTM, "called, state={}", state); |
| @@ -145,7 +145,7 @@ PSM::PSM(Core::System& system_) : ServiceFramework{system_, "psm"} { | |||
| 145 | 145 | ||
| 146 | PSM::~PSM() = default; | 146 | PSM::~PSM() = default; |
| 147 | 147 | ||
| 148 | void PSM::GetBatteryChargePercentage(Kernel::HLERequestContext& ctx) { | 148 | void PSM::GetBatteryChargePercentage(HLERequestContext& ctx) { |
| 149 | LOG_DEBUG(Service_PTM, "called"); | 149 | LOG_DEBUG(Service_PTM, "called"); |
| 150 | 150 | ||
| 151 | IPC::ResponseBuilder rb{ctx, 3}; | 151 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -153,7 +153,7 @@ void PSM::GetBatteryChargePercentage(Kernel::HLERequestContext& ctx) { | |||
| 153 | rb.Push<u32>(battery_charge_percentage); | 153 | rb.Push<u32>(battery_charge_percentage); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | void PSM::GetChargerType(Kernel::HLERequestContext& ctx) { | 156 | void PSM::GetChargerType(HLERequestContext& ctx) { |
| 157 | LOG_DEBUG(Service_PTM, "called"); | 157 | LOG_DEBUG(Service_PTM, "called"); |
| 158 | 158 | ||
| 159 | IPC::ResponseBuilder rb{ctx, 3}; | 159 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -161,7 +161,7 @@ void PSM::GetChargerType(Kernel::HLERequestContext& ctx) { | |||
| 161 | rb.PushEnum(charger_type); | 161 | rb.PushEnum(charger_type); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | void PSM::OpenSession(Kernel::HLERequestContext& ctx) { | 164 | void PSM::OpenSession(HLERequestContext& ctx) { |
| 165 | LOG_DEBUG(Service_PTM, "called"); | 165 | LOG_DEBUG(Service_PTM, "called"); |
| 166 | 166 | ||
| 167 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 167 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/ptm/psm.h b/src/core/hle/service/ptm/psm.h index f674ba8bc..fa47919e5 100644 --- a/src/core/hle/service/ptm/psm.h +++ b/src/core/hle/service/ptm/psm.h | |||
| @@ -20,9 +20,9 @@ private: | |||
| 20 | Unknown = 3, | 20 | Unknown = 3, |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | void GetBatteryChargePercentage(Kernel::HLERequestContext& ctx); | 23 | void GetBatteryChargePercentage(HLERequestContext& ctx); |
| 24 | void GetChargerType(Kernel::HLERequestContext& ctx); | 24 | void GetChargerType(HLERequestContext& ctx); |
| 25 | void OpenSession(Kernel::HLERequestContext& ctx); | 25 | void OpenSession(HLERequestContext& ctx); |
| 26 | 26 | ||
| 27 | u32 battery_charge_percentage{100}; | 27 | u32 battery_charge_percentage{100}; |
| 28 | ChargerType charger_type{ChargerType::RegularCharger}; | 28 | ChargerType charger_type{ChargerType::RegularCharger}; |
diff --git a/src/core/hle/service/ptm/ts.cpp b/src/core/hle/service/ptm/ts.cpp index b1a0a5544..ca064dd90 100644 --- a/src/core/hle/service/ptm/ts.cpp +++ b/src/core/hle/service/ptm/ts.cpp | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/core.h" | 6 | #include "core/core.h" |
| 7 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/service/ipc_helpers.h" |
| 8 | #include "core/hle/service/ptm/ts.h" | 8 | #include "core/hle/service/ptm/ts.h" |
| 9 | 9 | ||
| 10 | namespace Service::PTM { | 10 | namespace Service::PTM { |
| @@ -25,7 +25,7 @@ TS::TS(Core::System& system_) : ServiceFramework{system_, "ts"} { | |||
| 25 | 25 | ||
| 26 | TS::~TS() = default; | 26 | TS::~TS() = default; |
| 27 | 27 | ||
| 28 | void TS::GetTemperature(Kernel::HLERequestContext& ctx) { | 28 | void TS::GetTemperature(HLERequestContext& ctx) { |
| 29 | IPC::RequestParser rp{ctx}; | 29 | IPC::RequestParser rp{ctx}; |
| 30 | const auto location{rp.PopEnum<Location>()}; | 30 | const auto location{rp.PopEnum<Location>()}; |
| 31 | 31 | ||
| @@ -36,7 +36,7 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) { | |||
| 36 | rb.Push(temperature); | 36 | rb.Push(temperature); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | void TS::GetTemperatureMilliC(Kernel::HLERequestContext& ctx) { | 39 | void TS::GetTemperatureMilliC(HLERequestContext& ctx) { |
| 40 | IPC::RequestParser rp{ctx}; | 40 | IPC::RequestParser rp{ctx}; |
| 41 | const auto location{rp.PopEnum<Location>()}; | 41 | const auto location{rp.PopEnum<Location>()}; |
| 42 | 42 | ||
diff --git a/src/core/hle/service/ptm/ts.h b/src/core/hle/service/ptm/ts.h index 39d51847e..c3f43d5a3 100644 --- a/src/core/hle/service/ptm/ts.h +++ b/src/core/hle/service/ptm/ts.h | |||
| @@ -19,8 +19,8 @@ private: | |||
| 19 | External, | 19 | External, |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | void GetTemperature(Kernel::HLERequestContext& ctx); | 22 | void GetTemperature(HLERequestContext& ctx); |
| 23 | void GetTemperatureMilliC(Kernel::HLERequestContext& ctx); | 23 | void GetTemperatureMilliC(HLERequestContext& ctx); |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | } // namespace Service::PTM | 26 | } // namespace Service::PTM |
diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp index 1b3db3caf..c91f6d880 100644 --- a/src/core/hle/service/server_manager.cpp +++ b/src/core/hle/service/server_manager.cpp | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | #include "common/scope_exit.h" | 4 | #include "common/scope_exit.h" |
| 5 | 5 | ||
| 6 | #include "core/core.h" | 6 | #include "core/core.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/kernel/hle_ipc.h" | ||
| 9 | #include "core/hle/kernel/k_client_port.h" | 7 | #include "core/hle/kernel/k_client_port.h" |
| 10 | #include "core/hle/kernel/k_client_session.h" | 8 | #include "core/hle/kernel/k_client_session.h" |
| 11 | #include "core/hle/kernel/k_event.h" | 9 | #include "core/hle/kernel/k_event.h" |
| @@ -15,6 +13,8 @@ | |||
| 15 | #include "core/hle/kernel/k_server_session.h" | 13 | #include "core/hle/kernel/k_server_session.h" |
| 16 | #include "core/hle/kernel/k_synchronization_object.h" | 14 | #include "core/hle/kernel/k_synchronization_object.h" |
| 17 | #include "core/hle/kernel/svc_results.h" | 15 | #include "core/hle/kernel/svc_results.h" |
| 16 | #include "core/hle/service/hle_ipc.h" | ||
| 17 | #include "core/hle/service/ipc_helpers.h" | ||
| 18 | #include "core/hle/service/server_manager.h" | 18 | #include "core/hle/service/server_manager.h" |
| 19 | #include "core/hle/service/sm/sm.h" | 19 | #include "core/hle/service/sm/sm.h" |
| 20 | 20 | ||
| @@ -73,7 +73,7 @@ void ServerManager::RunServer(std::unique_ptr<ServerManager>&& server_manager) { | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | Result ServerManager::RegisterSession(Kernel::KServerSession* session, | 75 | Result ServerManager::RegisterSession(Kernel::KServerSession* session, |
| 76 | std::shared_ptr<Kernel::SessionRequestManager> manager) { | 76 | std::shared_ptr<SessionRequestManager> manager) { |
| 77 | ASSERT(m_sessions.size() + m_ports.size() < MaximumWaitObjects); | 77 | ASSERT(m_sessions.size() + m_ports.size() < MaximumWaitObjects); |
| 78 | 78 | ||
| 79 | // We are taking ownership of the server session, so don't open it. | 79 | // We are taking ownership of the server session, so don't open it. |
| @@ -90,7 +90,7 @@ Result ServerManager::RegisterSession(Kernel::KServerSession* session, | |||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | Result ServerManager::RegisterNamedService(const std::string& service_name, | 92 | Result ServerManager::RegisterNamedService(const std::string& service_name, |
| 93 | std::shared_ptr<Kernel::SessionRequestHandler>&& handler, | 93 | std::shared_ptr<SessionRequestHandler>&& handler, |
| 94 | u32 max_sessions) { | 94 | u32 max_sessions) { |
| 95 | ASSERT(m_sessions.size() + m_ports.size() < MaximumWaitObjects); | 95 | ASSERT(m_sessions.size() + m_ports.size() < MaximumWaitObjects); |
| 96 | 96 | ||
| @@ -118,7 +118,7 @@ Result ServerManager::RegisterNamedService(const std::string& service_name, | |||
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | Result ServerManager::ManageNamedPort(const std::string& service_name, | 120 | Result ServerManager::ManageNamedPort(const std::string& service_name, |
| 121 | std::shared_ptr<Kernel::SessionRequestHandler>&& handler, | 121 | std::shared_ptr<SessionRequestHandler>&& handler, |
| 122 | u32 max_sessions) { | 122 | u32 max_sessions) { |
| 123 | ASSERT(m_sessions.size() + m_ports.size() < MaximumWaitObjects); | 123 | ASSERT(m_sessions.size() + m_ports.size() < MaximumWaitObjects); |
| 124 | 124 | ||
| @@ -265,7 +265,7 @@ Result ServerManager::WaitAndProcessImpl() { | |||
| 265 | case HandleType::Port: { | 265 | case HandleType::Port: { |
| 266 | // Port signaled. | 266 | // Port signaled. |
| 267 | auto* port = wait_obj->DynamicCast<Kernel::KServerPort*>(); | 267 | auto* port = wait_obj->DynamicCast<Kernel::KServerPort*>(); |
| 268 | std::shared_ptr<Kernel::SessionRequestHandler> handler; | 268 | std::shared_ptr<SessionRequestHandler> handler; |
| 269 | 269 | ||
| 270 | // Remove from tracking. | 270 | // Remove from tracking. |
| 271 | { | 271 | { |
| @@ -284,7 +284,7 @@ Result ServerManager::WaitAndProcessImpl() { | |||
| 284 | case HandleType::Session: { | 284 | case HandleType::Session: { |
| 285 | // Session signaled. | 285 | // Session signaled. |
| 286 | auto* session = wait_obj->DynamicCast<Kernel::KServerSession*>(); | 286 | auto* session = wait_obj->DynamicCast<Kernel::KServerSession*>(); |
| 287 | std::shared_ptr<Kernel::SessionRequestManager> manager; | 287 | std::shared_ptr<SessionRequestManager> manager; |
| 288 | 288 | ||
| 289 | // Remove from tracking. | 289 | // Remove from tracking. |
| 290 | { | 290 | { |
| @@ -329,13 +329,13 @@ Result ServerManager::WaitAndProcessImpl() { | |||
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | Result ServerManager::OnPortEvent(Kernel::KServerPort* port, | 331 | Result ServerManager::OnPortEvent(Kernel::KServerPort* port, |
| 332 | std::shared_ptr<Kernel::SessionRequestHandler>&& handler) { | 332 | std::shared_ptr<SessionRequestHandler>&& handler) { |
| 333 | // Accept a new server session. | 333 | // Accept a new server session. |
| 334 | Kernel::KServerSession* session = port->AcceptSession(); | 334 | Kernel::KServerSession* session = port->AcceptSession(); |
| 335 | ASSERT(session != nullptr); | 335 | ASSERT(session != nullptr); |
| 336 | 336 | ||
| 337 | // Create the session manager and install the handler. | 337 | // Create the session manager and install the handler. |
| 338 | auto manager = std::make_shared<Kernel::SessionRequestManager>(m_system.Kernel(), *this); | 338 | auto manager = std::make_shared<SessionRequestManager>(m_system.Kernel(), *this); |
| 339 | manager->SetSessionHandler(std::shared_ptr(handler)); | 339 | manager->SetSessionHandler(std::shared_ptr(handler)); |
| 340 | 340 | ||
| 341 | // Track the server session. | 341 | // Track the server session. |
| @@ -353,11 +353,11 @@ Result ServerManager::OnPortEvent(Kernel::KServerPort* port, | |||
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | Result ServerManager::OnSessionEvent(Kernel::KServerSession* session, | 355 | Result ServerManager::OnSessionEvent(Kernel::KServerSession* session, |
| 356 | std::shared_ptr<Kernel::SessionRequestManager>&& manager) { | 356 | std::shared_ptr<SessionRequestManager>&& manager) { |
| 357 | Result rc{ResultSuccess}; | 357 | Result rc{ResultSuccess}; |
| 358 | 358 | ||
| 359 | // Try to receive a message. | 359 | // Try to receive a message. |
| 360 | std::shared_ptr<Kernel::HLERequestContext> context; | 360 | std::shared_ptr<HLERequestContext> context; |
| 361 | rc = session->ReceiveRequest(&context, manager); | 361 | rc = session->ReceiveRequest(&context, manager); |
| 362 | 362 | ||
| 363 | // If the session has been closed, we're done. | 363 | // If the session has been closed, we're done. |
diff --git a/src/core/hle/service/server_manager.h b/src/core/hle/service/server_manager.h index 57b954ae8..fdb8af2ff 100644 --- a/src/core/hle/service/server_manager.h +++ b/src/core/hle/service/server_manager.h | |||
| @@ -20,30 +20,30 @@ class System; | |||
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | namespace Kernel { | 22 | namespace Kernel { |
| 23 | class HLERequestContext; | ||
| 24 | class KEvent; | 23 | class KEvent; |
| 25 | class KServerPort; | 24 | class KServerPort; |
| 26 | class KServerSession; | 25 | class KServerSession; |
| 27 | class KSynchronizationObject; | 26 | class KSynchronizationObject; |
| 28 | class SessionRequestHandler; | ||
| 29 | class SessionRequestManager; | ||
| 30 | } // namespace Kernel | 27 | } // namespace Kernel |
| 31 | 28 | ||
| 32 | namespace Service { | 29 | namespace Service { |
| 33 | 30 | ||
| 31 | class HLERequestContext; | ||
| 32 | class SessionRequestHandler; | ||
| 33 | class SessionRequestManager; | ||
| 34 | |||
| 34 | class ServerManager { | 35 | class ServerManager { |
| 35 | public: | 36 | public: |
| 36 | explicit ServerManager(Core::System& system); | 37 | explicit ServerManager(Core::System& system); |
| 37 | ~ServerManager(); | 38 | ~ServerManager(); |
| 38 | 39 | ||
| 39 | Result RegisterSession(Kernel::KServerSession* session, | 40 | Result RegisterSession(Kernel::KServerSession* session, |
| 40 | std::shared_ptr<Kernel::SessionRequestManager> manager); | 41 | std::shared_ptr<SessionRequestManager> manager); |
| 41 | Result RegisterNamedService(const std::string& service_name, | 42 | Result RegisterNamedService(const std::string& service_name, |
| 42 | std::shared_ptr<Kernel::SessionRequestHandler>&& handler, | 43 | std::shared_ptr<SessionRequestHandler>&& handler, |
| 43 | u32 max_sessions = 64); | 44 | u32 max_sessions = 64); |
| 44 | Result ManageNamedPort(const std::string& service_name, | 45 | Result ManageNamedPort(const std::string& service_name, |
| 45 | std::shared_ptr<Kernel::SessionRequestHandler>&& handler, | 46 | std::shared_ptr<SessionRequestHandler>&& handler, u32 max_sessions = 64); |
| 46 | u32 max_sessions = 64); | ||
| 47 | Result ManageDeferral(Kernel::KEvent** out_event); | 47 | Result ManageDeferral(Kernel::KEvent** out_event); |
| 48 | 48 | ||
| 49 | Result LoopProcess(); | 49 | Result LoopProcess(); |
| @@ -56,10 +56,9 @@ private: | |||
| 56 | 56 | ||
| 57 | Result LoopProcessImpl(); | 57 | Result LoopProcessImpl(); |
| 58 | Result WaitAndProcessImpl(); | 58 | Result WaitAndProcessImpl(); |
| 59 | Result OnPortEvent(Kernel::KServerPort* port, | 59 | Result OnPortEvent(Kernel::KServerPort* port, std::shared_ptr<SessionRequestHandler>&& handler); |
| 60 | std::shared_ptr<Kernel::SessionRequestHandler>&& handler); | ||
| 61 | Result OnSessionEvent(Kernel::KServerSession* session, | 60 | Result OnSessionEvent(Kernel::KServerSession* session, |
| 62 | std::shared_ptr<Kernel::SessionRequestManager>&& manager); | 61 | std::shared_ptr<SessionRequestManager>&& manager); |
| 63 | Result OnDeferralEvent(std::list<RequestState>&& deferrals); | 62 | Result OnDeferralEvent(std::list<RequestState>&& deferrals); |
| 64 | Result CompleteSyncRequest(RequestState&& state); | 63 | Result CompleteSyncRequest(RequestState&& state); |
| 65 | 64 | ||
| @@ -69,16 +68,16 @@ private: | |||
| 69 | std::mutex m_list_mutex; | 68 | std::mutex m_list_mutex; |
| 70 | 69 | ||
| 71 | // Guest state tracking | 70 | // Guest state tracking |
| 72 | std::map<Kernel::KServerPort*, std::shared_ptr<Kernel::SessionRequestHandler>> m_ports{}; | 71 | std::map<Kernel::KServerPort*, std::shared_ptr<SessionRequestHandler>> m_ports{}; |
| 73 | std::map<Kernel::KServerSession*, std::shared_ptr<Kernel::SessionRequestManager>> m_sessions{}; | 72 | std::map<Kernel::KServerSession*, std::shared_ptr<SessionRequestManager>> m_sessions{}; |
| 74 | Kernel::KEvent* m_event{}; | 73 | Kernel::KEvent* m_event{}; |
| 75 | Kernel::KEvent* m_deferral_event{}; | 74 | Kernel::KEvent* m_deferral_event{}; |
| 76 | 75 | ||
| 77 | // Deferral tracking | 76 | // Deferral tracking |
| 78 | struct RequestState { | 77 | struct RequestState { |
| 79 | Kernel::KServerSession* session; | 78 | Kernel::KServerSession* session; |
| 80 | std::shared_ptr<Kernel::HLERequestContext> context; | 79 | std::shared_ptr<HLERequestContext> context; |
| 81 | std::shared_ptr<Kernel::SessionRequestManager> manager; | 80 | std::shared_ptr<SessionRequestManager> manager; |
| 82 | }; | 81 | }; |
| 83 | std::list<RequestState> m_deferrals{}; | 82 | std::list<RequestState> m_deferrals{}; |
| 84 | 83 | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 31021ea03..6415fc310 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include "common/settings.h" | 7 | #include "common/settings.h" |
| 8 | #include "core/core.h" | 8 | #include "core/core.h" |
| 9 | #include "core/hle/ipc.h" | 9 | #include "core/hle/ipc.h" |
| 10 | #include "core/hle/ipc_helpers.h" | ||
| 11 | #include "core/hle/kernel/k_process.h" | 10 | #include "core/hle/kernel/k_process.h" |
| 12 | #include "core/hle/kernel/k_server_port.h" | 11 | #include "core/hle/kernel/k_server_port.h" |
| 13 | #include "core/hle/kernel/kernel.h" | 12 | #include "core/hle/kernel/kernel.h" |
| @@ -31,6 +30,7 @@ | |||
| 31 | #include "core/hle/service/glue/glue.h" | 30 | #include "core/hle/service/glue/glue.h" |
| 32 | #include "core/hle/service/grc/grc.h" | 31 | #include "core/hle/service/grc/grc.h" |
| 33 | #include "core/hle/service/hid/hid.h" | 32 | #include "core/hle/service/hid/hid.h" |
| 33 | #include "core/hle/service/ipc_helpers.h" | ||
| 34 | #include "core/hle/service/jit/jit.h" | 34 | #include "core/hle/service/jit/jit.h" |
| 35 | #include "core/hle/service/lbl/lbl.h" | 35 | #include "core/hle/service/lbl/lbl.h" |
| 36 | #include "core/hle/service/ldn/ldn.h" | 36 | #include "core/hle/service/ldn/ldn.h" |
| @@ -117,7 +117,7 @@ void ServiceFrameworkBase::RegisterHandlersBaseTipc(const FunctionInfoBase* func | |||
| 117 | } | 117 | } |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext& ctx, | 120 | void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx, |
| 121 | const FunctionInfoBase* info) { | 121 | const FunctionInfoBase* info) { |
| 122 | auto cmd_buf = ctx.CommandBuffer(); | 122 | auto cmd_buf = ctx.CommandBuffer(); |
| 123 | std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name; | 123 | std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name; |
| @@ -140,7 +140,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext | |||
| 140 | } | 140 | } |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { | 143 | void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) { |
| 144 | auto itr = handlers.find(ctx.GetCommand()); | 144 | auto itr = handlers.find(ctx.GetCommand()); |
| 145 | const FunctionInfoBase* info = itr == handlers.end() ? nullptr : &itr->second; | 145 | const FunctionInfoBase* info = itr == handlers.end() ? nullptr : &itr->second; |
| 146 | if (info == nullptr || info->handler_callback == nullptr) { | 146 | if (info == nullptr || info->handler_callback == nullptr) { |
| @@ -151,7 +151,7 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { | |||
| 151 | handler_invoker(this, info->handler_callback, ctx); | 151 | handler_invoker(this, info->handler_callback, ctx); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | void ServiceFrameworkBase::InvokeRequestTipc(Kernel::HLERequestContext& ctx) { | 154 | void ServiceFrameworkBase::InvokeRequestTipc(HLERequestContext& ctx) { |
| 155 | boost::container::flat_map<u32, FunctionInfoBase>::iterator itr; | 155 | boost::container::flat_map<u32, FunctionInfoBase>::iterator itr; |
| 156 | 156 | ||
| 157 | itr = handlers_tipc.find(ctx.GetCommand()); | 157 | itr = handlers_tipc.find(ctx.GetCommand()); |
| @@ -166,7 +166,7 @@ void ServiceFrameworkBase::InvokeRequestTipc(Kernel::HLERequestContext& ctx) { | |||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | Result ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session, | 168 | Result ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session, |
| 169 | Kernel::HLERequestContext& ctx) { | 169 | HLERequestContext& ctx) { |
| 170 | const auto guard = LockService(); | 170 | const auto guard = LockService(); |
| 171 | 171 | ||
| 172 | Result result = ResultSuccess; | 172 | Result result = ResultSuccess; |
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index db3b31378..06226409a 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <string> | 8 | #include <string> |
| 9 | #include <boost/container/flat_map.hpp> | 9 | #include <boost/container/flat_map.hpp> |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "core/hle/kernel/hle_ipc.h" | 11 | #include "core/hle/service/hle_ipc.h" |
| 12 | 12 | ||
| 13 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 13 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 14 | // Namespace Service | 14 | // Namespace Service |
| @@ -18,7 +18,6 @@ class System; | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | namespace Kernel { | 20 | namespace Kernel { |
| 21 | class HLERequestContext; | ||
| 22 | class KServerSession; | 21 | class KServerSession; |
| 23 | class ServiceThread; | 22 | class ServiceThread; |
| 24 | } // namespace Kernel | 23 | } // namespace Kernel |
| @@ -50,7 +49,7 @@ static_assert(ServerSessionCountMax == 0x40, | |||
| 50 | * | 49 | * |
| 51 | * @see ServiceFramework | 50 | * @see ServiceFramework |
| 52 | */ | 51 | */ |
| 53 | class ServiceFrameworkBase : public Kernel::SessionRequestHandler { | 52 | class ServiceFrameworkBase : public SessionRequestHandler { |
| 54 | public: | 53 | public: |
| 55 | /// Returns the string identifier used to connect to the service. | 54 | /// Returns the string identifier used to connect to the service. |
| 56 | std::string GetServiceName() const { | 55 | std::string GetServiceName() const { |
| @@ -66,19 +65,18 @@ public: | |||
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | /// Invokes a service request routine using the HIPC protocol. | 67 | /// Invokes a service request routine using the HIPC protocol. |
| 69 | void InvokeRequest(Kernel::HLERequestContext& ctx); | 68 | void InvokeRequest(HLERequestContext& ctx); |
| 70 | 69 | ||
| 71 | /// Invokes a service request routine using the HIPC protocol. | 70 | /// Invokes a service request routine using the HIPC protocol. |
| 72 | void InvokeRequestTipc(Kernel::HLERequestContext& ctx); | 71 | void InvokeRequestTipc(HLERequestContext& ctx); |
| 73 | 72 | ||
| 74 | /// Handles a synchronization request for the service. | 73 | /// Handles a synchronization request for the service. |
| 75 | Result HandleSyncRequest(Kernel::KServerSession& session, | 74 | Result HandleSyncRequest(Kernel::KServerSession& session, HLERequestContext& context) override; |
| 76 | Kernel::HLERequestContext& context) override; | ||
| 77 | 75 | ||
| 78 | protected: | 76 | protected: |
| 79 | /// Member-function pointer type of SyncRequest handlers. | 77 | /// Member-function pointer type of SyncRequest handlers. |
| 80 | template <typename Self> | 78 | template <typename Self> |
| 81 | using HandlerFnP = void (Self::*)(Kernel::HLERequestContext&); | 79 | using HandlerFnP = void (Self::*)(HLERequestContext&); |
| 82 | 80 | ||
| 83 | /// Used to gain exclusive access to the service members, e.g. from CoreTiming thread. | 81 | /// Used to gain exclusive access to the service members, e.g. from CoreTiming thread. |
| 84 | [[nodiscard]] std::scoped_lock<std::mutex> LockService() { | 82 | [[nodiscard]] std::scoped_lock<std::mutex> LockService() { |
| @@ -102,7 +100,7 @@ private: | |||
| 102 | }; | 100 | }; |
| 103 | 101 | ||
| 104 | using InvokerFn = void(ServiceFrameworkBase* object, HandlerFnP<ServiceFrameworkBase> member, | 102 | using InvokerFn = void(ServiceFrameworkBase* object, HandlerFnP<ServiceFrameworkBase> member, |
| 105 | Kernel::HLERequestContext& ctx); | 103 | HLERequestContext& ctx); |
| 106 | 104 | ||
| 107 | explicit ServiceFrameworkBase(Core::System& system_, const char* service_name_, | 105 | explicit ServiceFrameworkBase(Core::System& system_, const char* service_name_, |
| 108 | u32 max_sessions_, InvokerFn* handler_invoker_); | 106 | u32 max_sessions_, InvokerFn* handler_invoker_); |
| @@ -110,7 +108,7 @@ private: | |||
| 110 | 108 | ||
| 111 | void RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n); | 109 | void RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n); |
| 112 | void RegisterHandlersBaseTipc(const FunctionInfoBase* functions, std::size_t n); | 110 | void RegisterHandlersBaseTipc(const FunctionInfoBase* functions, std::size_t n); |
| 113 | void ReportUnimplementedFunction(Kernel::HLERequestContext& ctx, const FunctionInfoBase* info); | 111 | void ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info); |
| 114 | 112 | ||
| 115 | /// Maximum number of concurrent sessions that this service can handle. | 113 | /// Maximum number of concurrent sessions that this service can handle. |
| 116 | u32 max_sessions; | 114 | u32 max_sessions; |
| @@ -212,7 +210,7 @@ private: | |||
| 212 | * of the derived class in order to invoke one of it's functions through a pointer. | 210 | * of the derived class in order to invoke one of it's functions through a pointer. |
| 213 | */ | 211 | */ |
| 214 | static void Invoker(ServiceFrameworkBase* object, HandlerFnP<ServiceFrameworkBase> member, | 212 | static void Invoker(ServiceFrameworkBase* object, HandlerFnP<ServiceFrameworkBase> member, |
| 215 | Kernel::HLERequestContext& ctx) { | 213 | HLERequestContext& ctx) { |
| 216 | // Cast back up to our original types and call the member function | 214 | // Cast back up to our original types and call the member function |
| 217 | (static_cast<Self*>(object)->*static_cast<HandlerFnP<Self>>(member))(ctx); | 215 | (static_cast<Self*>(object)->*static_cast<HandlerFnP<Self>>(member))(ctx); |
| 218 | } | 216 | } |
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index 16c5eaf75..88df52331 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <chrono> | 6 | #include <chrono> |
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "core/hle/ipc_helpers.h" | 9 | #include "core/hle/service/ipc_helpers.h" |
| 10 | #include "core/hle/service/set/set.h" | 10 | #include "core/hle/service/set/set.h" |
| 11 | 11 | ||
| 12 | namespace Service::Set { | 12 | namespace Service::Set { |
| @@ -76,13 +76,13 @@ constexpr std::size_t POST_4_0_0_MAX_ENTRIES = 0x40; | |||
| 76 | 76 | ||
| 77 | constexpr Result ERR_INVALID_LANGUAGE{ErrorModule::Settings, 625}; | 77 | constexpr Result ERR_INVALID_LANGUAGE{ErrorModule::Settings, 625}; |
| 78 | 78 | ||
| 79 | void PushResponseLanguageCode(Kernel::HLERequestContext& ctx, std::size_t num_language_codes) { | 79 | void PushResponseLanguageCode(HLERequestContext& ctx, std::size_t num_language_codes) { |
| 80 | IPC::ResponseBuilder rb{ctx, 3}; | 80 | IPC::ResponseBuilder rb{ctx, 3}; |
| 81 | rb.Push(ResultSuccess); | 81 | rb.Push(ResultSuccess); |
| 82 | rb.Push(static_cast<u32>(num_language_codes)); | 82 | rb.Push(static_cast<u32>(num_language_codes)); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void GetAvailableLanguageCodesImpl(Kernel::HLERequestContext& ctx, std::size_t max_entries) { | 85 | void GetAvailableLanguageCodesImpl(HLERequestContext& ctx, std::size_t max_entries) { |
| 86 | const std::size_t requested_amount = ctx.GetWriteBufferNumElements<LanguageCode>(); | 86 | const std::size_t requested_amount = ctx.GetWriteBufferNumElements<LanguageCode>(); |
| 87 | const std::size_t max_amount = std::min(requested_amount, max_entries); | 87 | const std::size_t max_amount = std::min(requested_amount, max_entries); |
| 88 | const std::size_t copy_amount = std::min(available_language_codes.size(), max_amount); | 88 | const std::size_t copy_amount = std::min(available_language_codes.size(), max_amount); |
| @@ -92,7 +92,7 @@ void GetAvailableLanguageCodesImpl(Kernel::HLERequestContext& ctx, std::size_t m | |||
| 92 | PushResponseLanguageCode(ctx, copy_amount); | 92 | PushResponseLanguageCode(ctx, copy_amount); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void GetKeyCodeMapImpl(Kernel::HLERequestContext& ctx) { | 95 | void GetKeyCodeMapImpl(HLERequestContext& ctx) { |
| 96 | const auto language_code = available_language_codes[Settings::values.language_index.GetValue()]; | 96 | const auto language_code = available_language_codes[Settings::values.language_index.GetValue()]; |
| 97 | const auto key_code = | 97 | const auto key_code = |
| 98 | std::find_if(language_to_layout.cbegin(), language_to_layout.cend(), | 98 | std::find_if(language_to_layout.cbegin(), language_to_layout.cend(), |
| @@ -117,13 +117,13 @@ LanguageCode GetLanguageCodeFromIndex(std::size_t index) { | |||
| 117 | return available_language_codes.at(index); | 117 | return available_language_codes.at(index); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void SET::GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx) { | 120 | void SET::GetAvailableLanguageCodes(HLERequestContext& ctx) { |
| 121 | LOG_DEBUG(Service_SET, "called"); | 121 | LOG_DEBUG(Service_SET, "called"); |
| 122 | 122 | ||
| 123 | GetAvailableLanguageCodesImpl(ctx, PRE_4_0_0_MAX_ENTRIES); | 123 | GetAvailableLanguageCodesImpl(ctx, PRE_4_0_0_MAX_ENTRIES); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | void SET::MakeLanguageCode(Kernel::HLERequestContext& ctx) { | 126 | void SET::MakeLanguageCode(HLERequestContext& ctx) { |
| 127 | IPC::RequestParser rp{ctx}; | 127 | IPC::RequestParser rp{ctx}; |
| 128 | const auto index = rp.Pop<u32>(); | 128 | const auto index = rp.Pop<u32>(); |
| 129 | 129 | ||
| @@ -139,25 +139,25 @@ void SET::MakeLanguageCode(Kernel::HLERequestContext& ctx) { | |||
| 139 | rb.PushEnum(available_language_codes[index]); | 139 | rb.PushEnum(available_language_codes[index]); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | void SET::GetAvailableLanguageCodes2(Kernel::HLERequestContext& ctx) { | 142 | void SET::GetAvailableLanguageCodes2(HLERequestContext& ctx) { |
| 143 | LOG_DEBUG(Service_SET, "called"); | 143 | LOG_DEBUG(Service_SET, "called"); |
| 144 | 144 | ||
| 145 | GetAvailableLanguageCodesImpl(ctx, POST_4_0_0_MAX_ENTRIES); | 145 | GetAvailableLanguageCodesImpl(ctx, POST_4_0_0_MAX_ENTRIES); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | void SET::GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx) { | 148 | void SET::GetAvailableLanguageCodeCount(HLERequestContext& ctx) { |
| 149 | LOG_DEBUG(Service_SET, "called"); | 149 | LOG_DEBUG(Service_SET, "called"); |
| 150 | 150 | ||
| 151 | PushResponseLanguageCode(ctx, PRE_4_0_0_MAX_ENTRIES); | 151 | PushResponseLanguageCode(ctx, PRE_4_0_0_MAX_ENTRIES); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | void SET::GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx) { | 154 | void SET::GetAvailableLanguageCodeCount2(HLERequestContext& ctx) { |
| 155 | LOG_DEBUG(Service_SET, "called"); | 155 | LOG_DEBUG(Service_SET, "called"); |
| 156 | 156 | ||
| 157 | PushResponseLanguageCode(ctx, POST_4_0_0_MAX_ENTRIES); | 157 | PushResponseLanguageCode(ctx, POST_4_0_0_MAX_ENTRIES); |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | void SET::GetQuestFlag(Kernel::HLERequestContext& ctx) { | 160 | void SET::GetQuestFlag(HLERequestContext& ctx) { |
| 161 | LOG_DEBUG(Service_SET, "called"); | 161 | LOG_DEBUG(Service_SET, "called"); |
| 162 | 162 | ||
| 163 | IPC::ResponseBuilder rb{ctx, 3}; | 163 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -165,7 +165,7 @@ void SET::GetQuestFlag(Kernel::HLERequestContext& ctx) { | |||
| 165 | rb.Push(static_cast<u32>(Settings::values.quest_flag.GetValue())); | 165 | rb.Push(static_cast<u32>(Settings::values.quest_flag.GetValue())); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { | 168 | void SET::GetLanguageCode(HLERequestContext& ctx) { |
| 169 | LOG_DEBUG(Service_SET, "called {}", Settings::values.language_index.GetValue()); | 169 | LOG_DEBUG(Service_SET, "called {}", Settings::values.language_index.GetValue()); |
| 170 | 170 | ||
| 171 | IPC::ResponseBuilder rb{ctx, 4}; | 171 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -173,7 +173,7 @@ void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { | |||
| 173 | rb.PushEnum(available_language_codes[Settings::values.language_index.GetValue()]); | 173 | rb.PushEnum(available_language_codes[Settings::values.language_index.GetValue()]); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | void SET::GetRegionCode(Kernel::HLERequestContext& ctx) { | 176 | void SET::GetRegionCode(HLERequestContext& ctx) { |
| 177 | LOG_DEBUG(Service_SET, "called"); | 177 | LOG_DEBUG(Service_SET, "called"); |
| 178 | 178 | ||
| 179 | IPC::ResponseBuilder rb{ctx, 3}; | 179 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -181,17 +181,17 @@ void SET::GetRegionCode(Kernel::HLERequestContext& ctx) { | |||
| 181 | rb.Push(Settings::values.region_index.GetValue()); | 181 | rb.Push(Settings::values.region_index.GetValue()); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void SET::GetKeyCodeMap(Kernel::HLERequestContext& ctx) { | 184 | void SET::GetKeyCodeMap(HLERequestContext& ctx) { |
| 185 | LOG_DEBUG(Service_SET, "Called {}", ctx.Description()); | 185 | LOG_DEBUG(Service_SET, "Called {}", ctx.Description()); |
| 186 | GetKeyCodeMapImpl(ctx); | 186 | GetKeyCodeMapImpl(ctx); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void SET::GetKeyCodeMap2(Kernel::HLERequestContext& ctx) { | 189 | void SET::GetKeyCodeMap2(HLERequestContext& ctx) { |
| 190 | LOG_DEBUG(Service_SET, "Called {}", ctx.Description()); | 190 | LOG_DEBUG(Service_SET, "Called {}", ctx.Description()); |
| 191 | GetKeyCodeMapImpl(ctx); | 191 | GetKeyCodeMapImpl(ctx); |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | void SET::GetDeviceNickName(Kernel::HLERequestContext& ctx) { | 194 | void SET::GetDeviceNickName(HLERequestContext& ctx) { |
| 195 | LOG_DEBUG(Service_SET, "called"); | 195 | LOG_DEBUG(Service_SET, "called"); |
| 196 | IPC::ResponseBuilder rb{ctx, 2}; | 196 | IPC::ResponseBuilder rb{ctx, 2}; |
| 197 | rb.Push(ResultSuccess); | 197 | rb.Push(ResultSuccess); |
diff --git a/src/core/hle/service/set/set.h b/src/core/hle/service/set/set.h index 375975711..7fd3a7654 100644 --- a/src/core/hle/service/set/set.h +++ b/src/core/hle/service/set/set.h | |||
| @@ -40,17 +40,17 @@ public: | |||
| 40 | ~SET() override; | 40 | ~SET() override; |
| 41 | 41 | ||
| 42 | private: | 42 | private: |
| 43 | void GetLanguageCode(Kernel::HLERequestContext& ctx); | 43 | void GetLanguageCode(HLERequestContext& ctx); |
| 44 | void GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx); | 44 | void GetAvailableLanguageCodes(HLERequestContext& ctx); |
| 45 | void MakeLanguageCode(Kernel::HLERequestContext& ctx); | 45 | void MakeLanguageCode(HLERequestContext& ctx); |
| 46 | void GetAvailableLanguageCodes2(Kernel::HLERequestContext& ctx); | 46 | void GetAvailableLanguageCodes2(HLERequestContext& ctx); |
| 47 | void GetAvailableLanguageCodeCount(Kernel::HLERequestContext& ctx); | 47 | void GetAvailableLanguageCodeCount(HLERequestContext& ctx); |
| 48 | void GetAvailableLanguageCodeCount2(Kernel::HLERequestContext& ctx); | 48 | void GetAvailableLanguageCodeCount2(HLERequestContext& ctx); |
| 49 | void GetQuestFlag(Kernel::HLERequestContext& ctx); | 49 | void GetQuestFlag(HLERequestContext& ctx); |
| 50 | void GetRegionCode(Kernel::HLERequestContext& ctx); | 50 | void GetRegionCode(HLERequestContext& ctx); |
| 51 | void GetKeyCodeMap(Kernel::HLERequestContext& ctx); | 51 | void GetKeyCodeMap(HLERequestContext& ctx); |
| 52 | void GetKeyCodeMap2(Kernel::HLERequestContext& ctx); | 52 | void GetKeyCodeMap2(HLERequestContext& ctx); |
| 53 | void GetDeviceNickName(Kernel::HLERequestContext& ctx); | 53 | void GetDeviceNickName(HLERequestContext& ctx); |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | } // namespace Service::Set | 56 | } // namespace Service::Set |
diff --git a/src/core/hle/service/set/set_sys.cpp b/src/core/hle/service/set/set_sys.cpp index 94c20edda..2e38d1cfc 100644 --- a/src/core/hle/service/set/set_sys.cpp +++ b/src/core/hle/service/set/set_sys.cpp | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | #include "common/settings.h" | 6 | #include "common/settings.h" |
| 7 | #include "core/file_sys/errors.h" | 7 | #include "core/file_sys/errors.h" |
| 8 | #include "core/file_sys/system_archive/system_version.h" | 8 | #include "core/file_sys/system_archive/system_version.h" |
| 9 | #include "core/hle/ipc_helpers.h" | ||
| 10 | #include "core/hle/service/filesystem/filesystem.h" | 9 | #include "core/hle/service/filesystem/filesystem.h" |
| 10 | #include "core/hle/service/ipc_helpers.h" | ||
| 11 | #include "core/hle/service/set/set_sys.h" | 11 | #include "core/hle/service/set/set_sys.h" |
| 12 | 12 | ||
| 13 | namespace Service::Set { | 13 | namespace Service::Set { |
| @@ -20,7 +20,7 @@ enum class GetFirmwareVersionType { | |||
| 20 | Version2, | 20 | Version2, |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | void GetFirmwareVersionImpl(Kernel::HLERequestContext& ctx, GetFirmwareVersionType type) { | 23 | void GetFirmwareVersionImpl(HLERequestContext& ctx, GetFirmwareVersionType type) { |
| 24 | LOG_WARNING(Service_SET, "called - Using hardcoded firmware version '{}'", | 24 | LOG_WARNING(Service_SET, "called - Using hardcoded firmware version '{}'", |
| 25 | FileSys::SystemArchive::GetLongDisplayVersion()); | 25 | FileSys::SystemArchive::GetLongDisplayVersion()); |
| 26 | 26 | ||
| @@ -73,17 +73,17 @@ void GetFirmwareVersionImpl(Kernel::HLERequestContext& ctx, GetFirmwareVersionTy | |||
| 73 | } | 73 | } |
| 74 | } // Anonymous namespace | 74 | } // Anonymous namespace |
| 75 | 75 | ||
| 76 | void SET_SYS::GetFirmwareVersion(Kernel::HLERequestContext& ctx) { | 76 | void SET_SYS::GetFirmwareVersion(HLERequestContext& ctx) { |
| 77 | LOG_DEBUG(Service_SET, "called"); | 77 | LOG_DEBUG(Service_SET, "called"); |
| 78 | GetFirmwareVersionImpl(ctx, GetFirmwareVersionType::Version1); | 78 | GetFirmwareVersionImpl(ctx, GetFirmwareVersionType::Version1); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void SET_SYS::GetFirmwareVersion2(Kernel::HLERequestContext& ctx) { | 81 | void SET_SYS::GetFirmwareVersion2(HLERequestContext& ctx) { |
| 82 | LOG_DEBUG(Service_SET, "called"); | 82 | LOG_DEBUG(Service_SET, "called"); |
| 83 | GetFirmwareVersionImpl(ctx, GetFirmwareVersionType::Version2); | 83 | GetFirmwareVersionImpl(ctx, GetFirmwareVersionType::Version2); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) { | 86 | void SET_SYS::GetColorSetId(HLERequestContext& ctx) { |
| 87 | LOG_DEBUG(Service_SET, "called"); | 87 | LOG_DEBUG(Service_SET, "called"); |
| 88 | 88 | ||
| 89 | IPC::ResponseBuilder rb{ctx, 3}; | 89 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -92,7 +92,7 @@ void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) { | |||
| 92 | rb.PushEnum(color_set); | 92 | rb.PushEnum(color_set); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) { | 95 | void SET_SYS::SetColorSetId(HLERequestContext& ctx) { |
| 96 | LOG_DEBUG(Service_SET, "called"); | 96 | LOG_DEBUG(Service_SET, "called"); |
| 97 | 97 | ||
| 98 | IPC::RequestParser rp{ctx}; | 98 | IPC::RequestParser rp{ctx}; |
| @@ -126,7 +126,7 @@ static Settings GetSettings() { | |||
| 126 | return ret; | 126 | return ret; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | void SET_SYS::GetSettingsItemValueSize(Kernel::HLERequestContext& ctx) { | 129 | void SET_SYS::GetSettingsItemValueSize(HLERequestContext& ctx) { |
| 130 | LOG_DEBUG(Service_SET, "called"); | 130 | LOG_DEBUG(Service_SET, "called"); |
| 131 | 131 | ||
| 132 | // The category of the setting. This corresponds to the top-level keys of | 132 | // The category of the setting. This corresponds to the top-level keys of |
| @@ -151,7 +151,7 @@ void SET_SYS::GetSettingsItemValueSize(Kernel::HLERequestContext& ctx) { | |||
| 151 | rb.Push(response_size); | 151 | rb.Push(response_size); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | void SET_SYS::GetSettingsItemValue(Kernel::HLERequestContext& ctx) { | 154 | void SET_SYS::GetSettingsItemValue(HLERequestContext& ctx) { |
| 155 | LOG_DEBUG(Service_SET, "called"); | 155 | LOG_DEBUG(Service_SET, "called"); |
| 156 | 156 | ||
| 157 | // The category of the setting. This corresponds to the top-level keys of | 157 | // The category of the setting. This corresponds to the top-level keys of |
| @@ -177,7 +177,7 @@ void SET_SYS::GetSettingsItemValue(Kernel::HLERequestContext& ctx) { | |||
| 177 | rb.Push(response); | 177 | rb.Push(response); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void SET_SYS::GetDeviceNickName(Kernel::HLERequestContext& ctx) { | 180 | void SET_SYS::GetDeviceNickName(HLERequestContext& ctx) { |
| 181 | LOG_DEBUG(Service_SET, "called"); | 181 | LOG_DEBUG(Service_SET, "called"); |
| 182 | IPC::ResponseBuilder rb{ctx, 2}; | 182 | IPC::ResponseBuilder rb{ctx, 2}; |
| 183 | rb.Push(ResultSuccess); | 183 | rb.Push(ResultSuccess); |
diff --git a/src/core/hle/service/set/set_sys.h b/src/core/hle/service/set/set_sys.h index 464ac3da1..1efbcc97a 100644 --- a/src/core/hle/service/set/set_sys.h +++ b/src/core/hle/service/set/set_sys.h | |||
| @@ -23,13 +23,13 @@ private: | |||
| 23 | BasicBlack = 1, | 23 | BasicBlack = 1, |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | void GetSettingsItemValueSize(Kernel::HLERequestContext& ctx); | 26 | void GetSettingsItemValueSize(HLERequestContext& ctx); |
| 27 | void GetSettingsItemValue(Kernel::HLERequestContext& ctx); | 27 | void GetSettingsItemValue(HLERequestContext& ctx); |
| 28 | void GetFirmwareVersion(Kernel::HLERequestContext& ctx); | 28 | void GetFirmwareVersion(HLERequestContext& ctx); |
| 29 | void GetFirmwareVersion2(Kernel::HLERequestContext& ctx); | 29 | void GetFirmwareVersion2(HLERequestContext& ctx); |
| 30 | void GetColorSetId(Kernel::HLERequestContext& ctx); | 30 | void GetColorSetId(HLERequestContext& ctx); |
| 31 | void SetColorSetId(Kernel::HLERequestContext& ctx); | 31 | void SetColorSetId(HLERequestContext& ctx); |
| 32 | void GetDeviceNickName(Kernel::HLERequestContext& ctx); | 32 | void GetDeviceNickName(HLERequestContext& ctx); |
| 33 | 33 | ||
| 34 | ColorSet color_set = ColorSet::BasicWhite; | 34 | ColorSet color_set = ColorSet::BasicWhite; |
| 35 | }; | 35 | }; |
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 53c877836..a46f47d3e 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | #include "common/assert.h" | 5 | #include "common/assert.h" |
| 6 | #include "common/scope_exit.h" | 6 | #include "common/scope_exit.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/k_client_port.h" | 8 | #include "core/hle/kernel/k_client_port.h" |
| 10 | #include "core/hle/kernel/k_client_session.h" | 9 | #include "core/hle/kernel/k_client_session.h" |
| 11 | #include "core/hle/kernel/k_port.h" | 10 | #include "core/hle/kernel/k_port.h" |
| 12 | #include "core/hle/kernel/k_scoped_resource_reservation.h" | 11 | #include "core/hle/kernel/k_scoped_resource_reservation.h" |
| 13 | #include "core/hle/kernel/k_server_port.h" | 12 | #include "core/hle/kernel/k_server_port.h" |
| 14 | #include "core/hle/result.h" | 13 | #include "core/hle/result.h" |
| 14 | #include "core/hle/service/ipc_helpers.h" | ||
| 15 | #include "core/hle/service/server_manager.h" | 15 | #include "core/hle/service/server_manager.h" |
| 16 | #include "core/hle/service/sm/sm.h" | 16 | #include "core/hle/service/sm/sm.h" |
| 17 | #include "core/hle/service/sm/sm_controller.h" | 17 | #include "core/hle/service/sm/sm_controller.h" |
| @@ -38,7 +38,7 @@ ServiceManager::~ServiceManager() { | |||
| 38 | } | 38 | } |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) { | 41 | void ServiceManager::InvokeControlRequest(HLERequestContext& context) { |
| 42 | controller_interface->InvokeRequest(context); | 42 | controller_interface->InvokeRequest(context); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| @@ -51,7 +51,7 @@ static Result ValidateServiceName(const std::string& name) { | |||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | Result ServiceManager::RegisterService(std::string name, u32 max_sessions, | 53 | Result ServiceManager::RegisterService(std::string name, u32 max_sessions, |
| 54 | Kernel::SessionRequestHandlerPtr handler) { | 54 | SessionRequestHandlerPtr handler) { |
| 55 | 55 | ||
| 56 | CASCADE_CODE(ValidateServiceName(name)); | 56 | CASCADE_CODE(ValidateServiceName(name)); |
| 57 | 57 | ||
| @@ -109,7 +109,7 @@ ResultVal<Kernel::KPort*> ServiceManager::GetServicePort(const std::string& name | |||
| 109 | * Outputs: | 109 | * Outputs: |
| 110 | * 0: Result | 110 | * 0: Result |
| 111 | */ | 111 | */ |
| 112 | void SM::Initialize(Kernel::HLERequestContext& ctx) { | 112 | void SM::Initialize(HLERequestContext& ctx) { |
| 113 | LOG_DEBUG(Service_SM, "called"); | 113 | LOG_DEBUG(Service_SM, "called"); |
| 114 | 114 | ||
| 115 | ctx.GetManager()->SetIsInitializedForSm(); | 115 | ctx.GetManager()->SetIsInitializedForSm(); |
| @@ -118,7 +118,7 @@ void SM::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 118 | rb.Push(ResultSuccess); | 118 | rb.Push(ResultSuccess); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | void SM::GetService(Kernel::HLERequestContext& ctx) { | 121 | void SM::GetService(HLERequestContext& ctx) { |
| 122 | auto result = GetServiceImpl(ctx); | 122 | auto result = GetServiceImpl(ctx); |
| 123 | if (ctx.GetIsDeferred()) { | 123 | if (ctx.GetIsDeferred()) { |
| 124 | // Don't overwrite the command buffer. | 124 | // Don't overwrite the command buffer. |
| @@ -135,7 +135,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) { | |||
| 135 | } | 135 | } |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | void SM::GetServiceTipc(Kernel::HLERequestContext& ctx) { | 138 | void SM::GetServiceTipc(HLERequestContext& ctx) { |
| 139 | auto result = GetServiceImpl(ctx); | 139 | auto result = GetServiceImpl(ctx); |
| 140 | if (ctx.GetIsDeferred()) { | 140 | if (ctx.GetIsDeferred()) { |
| 141 | // Don't overwrite the command buffer. | 141 | // Don't overwrite the command buffer. |
| @@ -158,7 +158,7 @@ static std::string PopServiceName(IPC::RequestParser& rp) { | |||
| 158 | return result; | 158 | return result; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext& ctx) { | 161 | ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(HLERequestContext& ctx) { |
| 162 | if (!ctx.GetManager()->GetIsInitializedForSm()) { | 162 | if (!ctx.GetManager()->GetIsInitializedForSm()) { |
| 163 | return ERR_NOT_INITIALIZED; | 163 | return ERR_NOT_INITIALIZED; |
| 164 | } | 164 | } |
| @@ -192,7 +192,7 @@ ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext& | |||
| 192 | return session; | 192 | return session; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void SM::RegisterService(Kernel::HLERequestContext& ctx) { | 195 | void SM::RegisterService(HLERequestContext& ctx) { |
| 196 | IPC::RequestParser rp{ctx}; | 196 | IPC::RequestParser rp{ctx}; |
| 197 | std::string name(PopServiceName(rp)); | 197 | std::string name(PopServiceName(rp)); |
| 198 | 198 | ||
| @@ -219,7 +219,7 @@ void SM::RegisterService(Kernel::HLERequestContext& ctx) { | |||
| 219 | rb.PushMoveObjects(port->GetServerPort()); | 219 | rb.PushMoveObjects(port->GetServerPort()); |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | void SM::UnregisterService(Kernel::HLERequestContext& ctx) { | 222 | void SM::UnregisterService(HLERequestContext& ctx) { |
| 223 | IPC::RequestParser rp{ctx}; | 223 | IPC::RequestParser rp{ctx}; |
| 224 | std::string name(PopServiceName(rp)); | 224 | std::string name(PopServiceName(rp)); |
| 225 | 225 | ||
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index 8dbf2c767..6697f4007 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h | |||
| @@ -36,13 +36,13 @@ public: | |||
| 36 | ~SM() override; | 36 | ~SM() override; |
| 37 | 37 | ||
| 38 | private: | 38 | private: |
| 39 | void Initialize(Kernel::HLERequestContext& ctx); | 39 | void Initialize(HLERequestContext& ctx); |
| 40 | void GetService(Kernel::HLERequestContext& ctx); | 40 | void GetService(HLERequestContext& ctx); |
| 41 | void GetServiceTipc(Kernel::HLERequestContext& ctx); | 41 | void GetServiceTipc(HLERequestContext& ctx); |
| 42 | void RegisterService(Kernel::HLERequestContext& ctx); | 42 | void RegisterService(HLERequestContext& ctx); |
| 43 | void UnregisterService(Kernel::HLERequestContext& ctx); | 43 | void UnregisterService(HLERequestContext& ctx); |
| 44 | 44 | ||
| 45 | ResultVal<Kernel::KClientSession*> GetServiceImpl(Kernel::HLERequestContext& ctx); | 45 | ResultVal<Kernel::KClientSession*> GetServiceImpl(HLERequestContext& ctx); |
| 46 | 46 | ||
| 47 | ServiceManager& service_manager; | 47 | ServiceManager& service_manager; |
| 48 | Kernel::KernelCore& kernel; | 48 | Kernel::KernelCore& kernel; |
| @@ -53,12 +53,11 @@ public: | |||
| 53 | explicit ServiceManager(Kernel::KernelCore& kernel_); | 53 | explicit ServiceManager(Kernel::KernelCore& kernel_); |
| 54 | ~ServiceManager(); | 54 | ~ServiceManager(); |
| 55 | 55 | ||
| 56 | Result RegisterService(std::string name, u32 max_sessions, | 56 | Result RegisterService(std::string name, u32 max_sessions, SessionRequestHandlerPtr handler); |
| 57 | Kernel::SessionRequestHandlerPtr handler); | ||
| 58 | Result UnregisterService(const std::string& name); | 57 | Result UnregisterService(const std::string& name); |
| 59 | ResultVal<Kernel::KPort*> GetServicePort(const std::string& name); | 58 | ResultVal<Kernel::KPort*> GetServicePort(const std::string& name); |
| 60 | 59 | ||
| 61 | template <Common::DerivedFrom<Kernel::SessionRequestHandler> T> | 60 | template <Common::DerivedFrom<SessionRequestHandler> T> |
| 62 | std::shared_ptr<T> GetService(const std::string& service_name) const { | 61 | std::shared_ptr<T> GetService(const std::string& service_name) const { |
| 63 | auto service = registered_services.find(service_name); | 62 | auto service = registered_services.find(service_name); |
| 64 | if (service == registered_services.end()) { | 63 | if (service == registered_services.end()) { |
| @@ -68,7 +67,7 @@ public: | |||
| 68 | return std::static_pointer_cast<T>(service->second); | 67 | return std::static_pointer_cast<T>(service->second); |
| 69 | } | 68 | } |
| 70 | 69 | ||
| 71 | void InvokeControlRequest(Kernel::HLERequestContext& context); | 70 | void InvokeControlRequest(HLERequestContext& context); |
| 72 | 71 | ||
| 73 | void SetDeferralEvent(Kernel::KEvent* deferral_event_) { | 72 | void SetDeferralEvent(Kernel::KEvent* deferral_event_) { |
| 74 | deferral_event = deferral_event_; | 73 | deferral_event = deferral_event_; |
| @@ -80,7 +79,7 @@ private: | |||
| 80 | 79 | ||
| 81 | /// Map of registered services, retrieved using GetServicePort. | 80 | /// Map of registered services, retrieved using GetServicePort. |
| 82 | std::mutex lock; | 81 | std::mutex lock; |
| 83 | std::unordered_map<std::string, Kernel::SessionRequestHandlerPtr> registered_services; | 82 | std::unordered_map<std::string, SessionRequestHandlerPtr> registered_services; |
| 84 | std::unordered_map<std::string, Kernel::KPort*> service_ports; | 83 | std::unordered_map<std::string, Kernel::KPort*> service_ports; |
| 85 | 84 | ||
| 86 | /// Kernel context | 85 | /// Kernel context |
diff --git a/src/core/hle/service/sm/sm_controller.cpp b/src/core/hle/service/sm/sm_controller.cpp index f52522d1d..0111c8d7f 100644 --- a/src/core/hle/service/sm/sm_controller.cpp +++ b/src/core/hle/service/sm/sm_controller.cpp | |||
| @@ -4,18 +4,18 @@ | |||
| 4 | #include "common/assert.h" | 4 | #include "common/assert.h" |
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "core/core.h" | 6 | #include "core/core.h" |
| 7 | #include "core/hle/ipc_helpers.h" | ||
| 8 | #include "core/hle/kernel/k_client_port.h" | 7 | #include "core/hle/kernel/k_client_port.h" |
| 9 | #include "core/hle/kernel/k_port.h" | 8 | #include "core/hle/kernel/k_port.h" |
| 10 | #include "core/hle/kernel/k_scoped_resource_reservation.h" | 9 | #include "core/hle/kernel/k_scoped_resource_reservation.h" |
| 11 | #include "core/hle/kernel/k_server_session.h" | 10 | #include "core/hle/kernel/k_server_session.h" |
| 12 | #include "core/hle/kernel/k_session.h" | 11 | #include "core/hle/kernel/k_session.h" |
| 12 | #include "core/hle/service/ipc_helpers.h" | ||
| 13 | #include "core/hle/service/server_manager.h" | 13 | #include "core/hle/service/server_manager.h" |
| 14 | #include "core/hle/service/sm/sm_controller.h" | 14 | #include "core/hle/service/sm/sm_controller.h" |
| 15 | 15 | ||
| 16 | namespace Service::SM { | 16 | namespace Service::SM { |
| 17 | 17 | ||
| 18 | void Controller::ConvertCurrentObjectToDomain(Kernel::HLERequestContext& ctx) { | 18 | void Controller::ConvertCurrentObjectToDomain(HLERequestContext& ctx) { |
| 19 | ASSERT_MSG(!ctx.GetManager()->IsDomain(), "Session is already a domain"); | 19 | ASSERT_MSG(!ctx.GetManager()->IsDomain(), "Session is already a domain"); |
| 20 | LOG_DEBUG(Service, "called, server_session={}", ctx.Session()->GetId()); | 20 | LOG_DEBUG(Service, "called, server_session={}", ctx.Session()->GetId()); |
| 21 | ctx.GetManager()->ConvertToDomainOnRequestEnd(); | 21 | ctx.GetManager()->ConvertToDomainOnRequestEnd(); |
| @@ -25,7 +25,7 @@ void Controller::ConvertCurrentObjectToDomain(Kernel::HLERequestContext& ctx) { | |||
| 25 | rb.Push<u32>(1); // Converted sessions start with 1 request handler | 25 | rb.Push<u32>(1); // Converted sessions start with 1 request handler |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) { | 28 | void Controller::CloneCurrentObject(HLERequestContext& ctx) { |
| 29 | LOG_DEBUG(Service, "called"); | 29 | LOG_DEBUG(Service, "called"); |
| 30 | 30 | ||
| 31 | auto& process = *ctx.GetThread().GetOwnerProcess(); | 31 | auto& process = *ctx.GetThread().GetOwnerProcess(); |
| @@ -59,13 +59,13 @@ void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) { | |||
| 59 | rb.PushMoveObjects(session->GetClientSession()); | 59 | rb.PushMoveObjects(session->GetClientSession()); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | void Controller::CloneCurrentObjectEx(Kernel::HLERequestContext& ctx) { | 62 | void Controller::CloneCurrentObjectEx(HLERequestContext& ctx) { |
| 63 | LOG_DEBUG(Service, "called"); | 63 | LOG_DEBUG(Service, "called"); |
| 64 | 64 | ||
| 65 | CloneCurrentObject(ctx); | 65 | CloneCurrentObject(ctx); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) { | 68 | void Controller::QueryPointerBufferSize(HLERequestContext& ctx) { |
| 69 | LOG_WARNING(Service, "(STUBBED) called"); | 69 | LOG_WARNING(Service, "(STUBBED) called"); |
| 70 | 70 | ||
| 71 | IPC::ResponseBuilder rb{ctx, 3}; | 71 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/sm/sm_controller.h b/src/core/hle/service/sm/sm_controller.h index ed386f660..4e748b36d 100644 --- a/src/core/hle/service/sm/sm_controller.h +++ b/src/core/hle/service/sm/sm_controller.h | |||
| @@ -17,10 +17,10 @@ public: | |||
| 17 | ~Controller() override; | 17 | ~Controller() override; |
| 18 | 18 | ||
| 19 | private: | 19 | private: |
| 20 | void ConvertCurrentObjectToDomain(Kernel::HLERequestContext& ctx); | 20 | void ConvertCurrentObjectToDomain(HLERequestContext& ctx); |
| 21 | void CloneCurrentObject(Kernel::HLERequestContext& ctx); | 21 | void CloneCurrentObject(HLERequestContext& ctx); |
| 22 | void CloneCurrentObjectEx(Kernel::HLERequestContext& ctx); | 22 | void CloneCurrentObjectEx(HLERequestContext& ctx); |
| 23 | void QueryPointerBufferSize(Kernel::HLERequestContext& ctx); | 23 | void QueryPointerBufferSize(HLERequestContext& ctx); |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | } // namespace Service::SM | 26 | } // namespace Service::SM |
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 2789fa1ed..bce45d321 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | #include "common/microprofile.h" | 11 | #include "common/microprofile.h" |
| 12 | #include "common/socket_types.h" | 12 | #include "common/socket_types.h" |
| 13 | #include "core/core.h" | 13 | #include "core/core.h" |
| 14 | #include "core/hle/ipc_helpers.h" | ||
| 15 | #include "core/hle/kernel/k_thread.h" | 14 | #include "core/hle/kernel/k_thread.h" |
| 15 | #include "core/hle/service/ipc_helpers.h" | ||
| 16 | #include "core/hle/service/sockets/bsd.h" | 16 | #include "core/hle/service/sockets/bsd.h" |
| 17 | #include "core/hle/service/sockets/sockets_translate.h" | 17 | #include "core/hle/service/sockets/sockets_translate.h" |
| 18 | #include "core/internal_network/network.h" | 18 | #include "core/internal_network/network.h" |
| @@ -42,7 +42,7 @@ void BSD::PollWork::Execute(BSD* bsd) { | |||
| 42 | std::tie(ret, bsd_errno) = bsd->PollImpl(write_buffer, read_buffer, nfds, timeout); | 42 | std::tie(ret, bsd_errno) = bsd->PollImpl(write_buffer, read_buffer, nfds, timeout); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) { | 45 | void BSD::PollWork::Response(HLERequestContext& ctx) { |
| 46 | if (write_buffer.size() > 0) { | 46 | if (write_buffer.size() > 0) { |
| 47 | ctx.WriteBuffer(write_buffer); | 47 | ctx.WriteBuffer(write_buffer); |
| 48 | } | 48 | } |
| @@ -57,7 +57,7 @@ void BSD::AcceptWork::Execute(BSD* bsd) { | |||
| 57 | std::tie(ret, bsd_errno) = bsd->AcceptImpl(fd, write_buffer); | 57 | std::tie(ret, bsd_errno) = bsd->AcceptImpl(fd, write_buffer); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) { | 60 | void BSD::AcceptWork::Response(HLERequestContext& ctx) { |
| 61 | if (write_buffer.size() > 0) { | 61 | if (write_buffer.size() > 0) { |
| 62 | ctx.WriteBuffer(write_buffer); | 62 | ctx.WriteBuffer(write_buffer); |
| 63 | } | 63 | } |
| @@ -73,7 +73,7 @@ void BSD::ConnectWork::Execute(BSD* bsd) { | |||
| 73 | bsd_errno = bsd->ConnectImpl(fd, addr); | 73 | bsd_errno = bsd->ConnectImpl(fd, addr); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | void BSD::ConnectWork::Response(Kernel::HLERequestContext& ctx) { | 76 | void BSD::ConnectWork::Response(HLERequestContext& ctx) { |
| 77 | IPC::ResponseBuilder rb{ctx, 4}; | 77 | IPC::ResponseBuilder rb{ctx, 4}; |
| 78 | rb.Push(ResultSuccess); | 78 | rb.Push(ResultSuccess); |
| 79 | rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1); | 79 | rb.Push<s32>(bsd_errno == Errno::SUCCESS ? 0 : -1); |
| @@ -84,7 +84,7 @@ void BSD::RecvWork::Execute(BSD* bsd) { | |||
| 84 | std::tie(ret, bsd_errno) = bsd->RecvImpl(fd, flags, message); | 84 | std::tie(ret, bsd_errno) = bsd->RecvImpl(fd, flags, message); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void BSD::RecvWork::Response(Kernel::HLERequestContext& ctx) { | 87 | void BSD::RecvWork::Response(HLERequestContext& ctx) { |
| 88 | ctx.WriteBuffer(message); | 88 | ctx.WriteBuffer(message); |
| 89 | 89 | ||
| 90 | IPC::ResponseBuilder rb{ctx, 4}; | 90 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -97,7 +97,7 @@ void BSD::RecvFromWork::Execute(BSD* bsd) { | |||
| 97 | std::tie(ret, bsd_errno) = bsd->RecvFromImpl(fd, flags, message, addr); | 97 | std::tie(ret, bsd_errno) = bsd->RecvFromImpl(fd, flags, message, addr); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void BSD::RecvFromWork::Response(Kernel::HLERequestContext& ctx) { | 100 | void BSD::RecvFromWork::Response(HLERequestContext& ctx) { |
| 101 | ctx.WriteBuffer(message, 0); | 101 | ctx.WriteBuffer(message, 0); |
| 102 | if (!addr.empty()) { | 102 | if (!addr.empty()) { |
| 103 | ctx.WriteBuffer(addr, 1); | 103 | ctx.WriteBuffer(addr, 1); |
| @@ -114,7 +114,7 @@ void BSD::SendWork::Execute(BSD* bsd) { | |||
| 114 | std::tie(ret, bsd_errno) = bsd->SendImpl(fd, flags, message); | 114 | std::tie(ret, bsd_errno) = bsd->SendImpl(fd, flags, message); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | void BSD::SendWork::Response(Kernel::HLERequestContext& ctx) { | 117 | void BSD::SendWork::Response(HLERequestContext& ctx) { |
| 118 | IPC::ResponseBuilder rb{ctx, 4}; | 118 | IPC::ResponseBuilder rb{ctx, 4}; |
| 119 | rb.Push(ResultSuccess); | 119 | rb.Push(ResultSuccess); |
| 120 | rb.Push<s32>(ret); | 120 | rb.Push<s32>(ret); |
| @@ -125,14 +125,14 @@ void BSD::SendToWork::Execute(BSD* bsd) { | |||
| 125 | std::tie(ret, bsd_errno) = bsd->SendToImpl(fd, flags, message, addr); | 125 | std::tie(ret, bsd_errno) = bsd->SendToImpl(fd, flags, message, addr); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | void BSD::SendToWork::Response(Kernel::HLERequestContext& ctx) { | 128 | void BSD::SendToWork::Response(HLERequestContext& ctx) { |
| 129 | IPC::ResponseBuilder rb{ctx, 4}; | 129 | IPC::ResponseBuilder rb{ctx, 4}; |
| 130 | rb.Push(ResultSuccess); | 130 | rb.Push(ResultSuccess); |
| 131 | rb.Push<s32>(ret); | 131 | rb.Push<s32>(ret); |
| 132 | rb.PushEnum(bsd_errno); | 132 | rb.PushEnum(bsd_errno); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | void BSD::RegisterClient(Kernel::HLERequestContext& ctx) { | 135 | void BSD::RegisterClient(HLERequestContext& ctx) { |
| 136 | LOG_WARNING(Service, "(STUBBED) called"); | 136 | LOG_WARNING(Service, "(STUBBED) called"); |
| 137 | 137 | ||
| 138 | IPC::ResponseBuilder rb{ctx, 3}; | 138 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -141,7 +141,7 @@ void BSD::RegisterClient(Kernel::HLERequestContext& ctx) { | |||
| 141 | rb.Push<s32>(0); // bsd errno | 141 | rb.Push<s32>(0); // bsd errno |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) { | 144 | void BSD::StartMonitoring(HLERequestContext& ctx) { |
| 145 | LOG_WARNING(Service, "(STUBBED) called"); | 145 | LOG_WARNING(Service, "(STUBBED) called"); |
| 146 | 146 | ||
| 147 | IPC::ResponseBuilder rb{ctx, 2}; | 147 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -149,7 +149,7 @@ void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) { | |||
| 149 | rb.Push(ResultSuccess); | 149 | rb.Push(ResultSuccess); |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | void BSD::Socket(Kernel::HLERequestContext& ctx) { | 152 | void BSD::Socket(HLERequestContext& ctx) { |
| 153 | IPC::RequestParser rp{ctx}; | 153 | IPC::RequestParser rp{ctx}; |
| 154 | const u32 domain = rp.Pop<u32>(); | 154 | const u32 domain = rp.Pop<u32>(); |
| 155 | const u32 type = rp.Pop<u32>(); | 155 | const u32 type = rp.Pop<u32>(); |
| @@ -166,7 +166,7 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) { | |||
| 166 | rb.PushEnum(bsd_errno); | 166 | rb.PushEnum(bsd_errno); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | void BSD::Select(Kernel::HLERequestContext& ctx) { | 169 | void BSD::Select(HLERequestContext& ctx) { |
| 170 | LOG_WARNING(Service, "(STUBBED) called"); | 170 | LOG_WARNING(Service, "(STUBBED) called"); |
| 171 | 171 | ||
| 172 | IPC::ResponseBuilder rb{ctx, 4}; | 172 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -176,7 +176,7 @@ void BSD::Select(Kernel::HLERequestContext& ctx) { | |||
| 176 | rb.Push<u32>(0); // bsd errno | 176 | rb.Push<u32>(0); // bsd errno |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | void BSD::Poll(Kernel::HLERequestContext& ctx) { | 179 | void BSD::Poll(HLERequestContext& ctx) { |
| 180 | IPC::RequestParser rp{ctx}; | 180 | IPC::RequestParser rp{ctx}; |
| 181 | const s32 nfds = rp.Pop<s32>(); | 181 | const s32 nfds = rp.Pop<s32>(); |
| 182 | const s32 timeout = rp.Pop<s32>(); | 182 | const s32 timeout = rp.Pop<s32>(); |
| @@ -191,7 +191,7 @@ void BSD::Poll(Kernel::HLERequestContext& ctx) { | |||
| 191 | }); | 191 | }); |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | void BSD::Accept(Kernel::HLERequestContext& ctx) { | 194 | void BSD::Accept(HLERequestContext& ctx) { |
| 195 | IPC::RequestParser rp{ctx}; | 195 | IPC::RequestParser rp{ctx}; |
| 196 | const s32 fd = rp.Pop<s32>(); | 196 | const s32 fd = rp.Pop<s32>(); |
| 197 | 197 | ||
| @@ -203,7 +203,7 @@ void BSD::Accept(Kernel::HLERequestContext& ctx) { | |||
| 203 | }); | 203 | }); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | void BSD::Bind(Kernel::HLERequestContext& ctx) { | 206 | void BSD::Bind(HLERequestContext& ctx) { |
| 207 | IPC::RequestParser rp{ctx}; | 207 | IPC::RequestParser rp{ctx}; |
| 208 | const s32 fd = rp.Pop<s32>(); | 208 | const s32 fd = rp.Pop<s32>(); |
| 209 | 209 | ||
| @@ -211,7 +211,7 @@ void BSD::Bind(Kernel::HLERequestContext& ctx) { | |||
| 211 | BuildErrnoResponse(ctx, BindImpl(fd, ctx.ReadBuffer())); | 211 | BuildErrnoResponse(ctx, BindImpl(fd, ctx.ReadBuffer())); |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | void BSD::Connect(Kernel::HLERequestContext& ctx) { | 214 | void BSD::Connect(HLERequestContext& ctx) { |
| 215 | IPC::RequestParser rp{ctx}; | 215 | IPC::RequestParser rp{ctx}; |
| 216 | const s32 fd = rp.Pop<s32>(); | 216 | const s32 fd = rp.Pop<s32>(); |
| 217 | 217 | ||
| @@ -223,7 +223,7 @@ void BSD::Connect(Kernel::HLERequestContext& ctx) { | |||
| 223 | }); | 223 | }); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | void BSD::GetPeerName(Kernel::HLERequestContext& ctx) { | 226 | void BSD::GetPeerName(HLERequestContext& ctx) { |
| 227 | IPC::RequestParser rp{ctx}; | 227 | IPC::RequestParser rp{ctx}; |
| 228 | const s32 fd = rp.Pop<s32>(); | 228 | const s32 fd = rp.Pop<s32>(); |
| 229 | 229 | ||
| @@ -241,7 +241,7 @@ void BSD::GetPeerName(Kernel::HLERequestContext& ctx) { | |||
| 241 | rb.Push<u32>(static_cast<u32>(write_buffer.size())); | 241 | rb.Push<u32>(static_cast<u32>(write_buffer.size())); |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | void BSD::GetSockName(Kernel::HLERequestContext& ctx) { | 244 | void BSD::GetSockName(HLERequestContext& ctx) { |
| 245 | IPC::RequestParser rp{ctx}; | 245 | IPC::RequestParser rp{ctx}; |
| 246 | const s32 fd = rp.Pop<s32>(); | 246 | const s32 fd = rp.Pop<s32>(); |
| 247 | 247 | ||
| @@ -259,7 +259,7 @@ void BSD::GetSockName(Kernel::HLERequestContext& ctx) { | |||
| 259 | rb.Push<u32>(static_cast<u32>(write_buffer.size())); | 259 | rb.Push<u32>(static_cast<u32>(write_buffer.size())); |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) { | 262 | void BSD::GetSockOpt(HLERequestContext& ctx) { |
| 263 | IPC::RequestParser rp{ctx}; | 263 | IPC::RequestParser rp{ctx}; |
| 264 | const s32 fd = rp.Pop<s32>(); | 264 | const s32 fd = rp.Pop<s32>(); |
| 265 | const u32 level = rp.Pop<u32>(); | 265 | const u32 level = rp.Pop<u32>(); |
| @@ -278,7 +278,7 @@ void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) { | |||
| 278 | rb.Push<u32>(static_cast<u32>(optval.size())); | 278 | rb.Push<u32>(static_cast<u32>(optval.size())); |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | void BSD::Listen(Kernel::HLERequestContext& ctx) { | 281 | void BSD::Listen(HLERequestContext& ctx) { |
| 282 | IPC::RequestParser rp{ctx}; | 282 | IPC::RequestParser rp{ctx}; |
| 283 | const s32 fd = rp.Pop<s32>(); | 283 | const s32 fd = rp.Pop<s32>(); |
| 284 | const s32 backlog = rp.Pop<s32>(); | 284 | const s32 backlog = rp.Pop<s32>(); |
| @@ -288,7 +288,7 @@ void BSD::Listen(Kernel::HLERequestContext& ctx) { | |||
| 288 | BuildErrnoResponse(ctx, ListenImpl(fd, backlog)); | 288 | BuildErrnoResponse(ctx, ListenImpl(fd, backlog)); |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | void BSD::Fcntl(Kernel::HLERequestContext& ctx) { | 291 | void BSD::Fcntl(HLERequestContext& ctx) { |
| 292 | IPC::RequestParser rp{ctx}; | 292 | IPC::RequestParser rp{ctx}; |
| 293 | const s32 fd = rp.Pop<s32>(); | 293 | const s32 fd = rp.Pop<s32>(); |
| 294 | const s32 cmd = rp.Pop<s32>(); | 294 | const s32 cmd = rp.Pop<s32>(); |
| @@ -304,7 +304,7 @@ void BSD::Fcntl(Kernel::HLERequestContext& ctx) { | |||
| 304 | rb.PushEnum(bsd_errno); | 304 | rb.PushEnum(bsd_errno); |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | void BSD::SetSockOpt(Kernel::HLERequestContext& ctx) { | 307 | void BSD::SetSockOpt(HLERequestContext& ctx) { |
| 308 | IPC::RequestParser rp{ctx}; | 308 | IPC::RequestParser rp{ctx}; |
| 309 | 309 | ||
| 310 | const s32 fd = rp.Pop<s32>(); | 310 | const s32 fd = rp.Pop<s32>(); |
| @@ -328,7 +328,7 @@ void BSD::SetSockOpt(Kernel::HLERequestContext& ctx) { | |||
| 328 | BuildErrnoResponse(ctx, SetSockOptImpl(fd, level, optname, optlen, optval)); | 328 | BuildErrnoResponse(ctx, SetSockOptImpl(fd, level, optname, optlen, optval)); |
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | void BSD::Shutdown(Kernel::HLERequestContext& ctx) { | 331 | void BSD::Shutdown(HLERequestContext& ctx) { |
| 332 | IPC::RequestParser rp{ctx}; | 332 | IPC::RequestParser rp{ctx}; |
| 333 | 333 | ||
| 334 | const s32 fd = rp.Pop<s32>(); | 334 | const s32 fd = rp.Pop<s32>(); |
| @@ -339,7 +339,7 @@ void BSD::Shutdown(Kernel::HLERequestContext& ctx) { | |||
| 339 | BuildErrnoResponse(ctx, ShutdownImpl(fd, how)); | 339 | BuildErrnoResponse(ctx, ShutdownImpl(fd, how)); |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | void BSD::Recv(Kernel::HLERequestContext& ctx) { | 342 | void BSD::Recv(HLERequestContext& ctx) { |
| 343 | IPC::RequestParser rp{ctx}; | 343 | IPC::RequestParser rp{ctx}; |
| 344 | 344 | ||
| 345 | const s32 fd = rp.Pop<s32>(); | 345 | const s32 fd = rp.Pop<s32>(); |
| @@ -354,7 +354,7 @@ void BSD::Recv(Kernel::HLERequestContext& ctx) { | |||
| 354 | }); | 354 | }); |
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | void BSD::RecvFrom(Kernel::HLERequestContext& ctx) { | 357 | void BSD::RecvFrom(HLERequestContext& ctx) { |
| 358 | IPC::RequestParser rp{ctx}; | 358 | IPC::RequestParser rp{ctx}; |
| 359 | 359 | ||
| 360 | const s32 fd = rp.Pop<s32>(); | 360 | const s32 fd = rp.Pop<s32>(); |
| @@ -371,7 +371,7 @@ void BSD::RecvFrom(Kernel::HLERequestContext& ctx) { | |||
| 371 | }); | 371 | }); |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | void BSD::Send(Kernel::HLERequestContext& ctx) { | 374 | void BSD::Send(HLERequestContext& ctx) { |
| 375 | IPC::RequestParser rp{ctx}; | 375 | IPC::RequestParser rp{ctx}; |
| 376 | 376 | ||
| 377 | const s32 fd = rp.Pop<s32>(); | 377 | const s32 fd = rp.Pop<s32>(); |
| @@ -386,7 +386,7 @@ void BSD::Send(Kernel::HLERequestContext& ctx) { | |||
| 386 | }); | 386 | }); |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | void BSD::SendTo(Kernel::HLERequestContext& ctx) { | 389 | void BSD::SendTo(HLERequestContext& ctx) { |
| 390 | IPC::RequestParser rp{ctx}; | 390 | IPC::RequestParser rp{ctx}; |
| 391 | const s32 fd = rp.Pop<s32>(); | 391 | const s32 fd = rp.Pop<s32>(); |
| 392 | const u32 flags = rp.Pop<u32>(); | 392 | const u32 flags = rp.Pop<u32>(); |
| @@ -402,7 +402,7 @@ void BSD::SendTo(Kernel::HLERequestContext& ctx) { | |||
| 402 | }); | 402 | }); |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | void BSD::Write(Kernel::HLERequestContext& ctx) { | 405 | void BSD::Write(HLERequestContext& ctx) { |
| 406 | IPC::RequestParser rp{ctx}; | 406 | IPC::RequestParser rp{ctx}; |
| 407 | const s32 fd = rp.Pop<s32>(); | 407 | const s32 fd = rp.Pop<s32>(); |
| 408 | 408 | ||
| @@ -415,7 +415,7 @@ void BSD::Write(Kernel::HLERequestContext& ctx) { | |||
| 415 | }); | 415 | }); |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | void BSD::Read(Kernel::HLERequestContext& ctx) { | 418 | void BSD::Read(HLERequestContext& ctx) { |
| 419 | IPC::RequestParser rp{ctx}; | 419 | IPC::RequestParser rp{ctx}; |
| 420 | const s32 fd = rp.Pop<s32>(); | 420 | const s32 fd = rp.Pop<s32>(); |
| 421 | 421 | ||
| @@ -427,7 +427,7 @@ void BSD::Read(Kernel::HLERequestContext& ctx) { | |||
| 427 | rb.Push<u32>(0); // bsd errno | 427 | rb.Push<u32>(0); // bsd errno |
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | void BSD::Close(Kernel::HLERequestContext& ctx) { | 430 | void BSD::Close(HLERequestContext& ctx) { |
| 431 | IPC::RequestParser rp{ctx}; | 431 | IPC::RequestParser rp{ctx}; |
| 432 | const s32 fd = rp.Pop<s32>(); | 432 | const s32 fd = rp.Pop<s32>(); |
| 433 | 433 | ||
| @@ -436,7 +436,7 @@ void BSD::Close(Kernel::HLERequestContext& ctx) { | |||
| 436 | BuildErrnoResponse(ctx, CloseImpl(fd)); | 436 | BuildErrnoResponse(ctx, CloseImpl(fd)); |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | void BSD::EventFd(Kernel::HLERequestContext& ctx) { | 439 | void BSD::EventFd(HLERequestContext& ctx) { |
| 440 | IPC::RequestParser rp{ctx}; | 440 | IPC::RequestParser rp{ctx}; |
| 441 | const u64 initval = rp.Pop<u64>(); | 441 | const u64 initval = rp.Pop<u64>(); |
| 442 | const u32 flags = rp.Pop<u32>(); | 442 | const u32 flags = rp.Pop<u32>(); |
| @@ -447,7 +447,7 @@ void BSD::EventFd(Kernel::HLERequestContext& ctx) { | |||
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | template <typename Work> | 449 | template <typename Work> |
| 450 | void BSD::ExecuteWork(Kernel::HLERequestContext& ctx, Work work) { | 450 | void BSD::ExecuteWork(HLERequestContext& ctx, Work work) { |
| 451 | work.Execute(this); | 451 | work.Execute(this); |
| 452 | work.Response(ctx); | 452 | work.Response(ctx); |
| 453 | } | 453 | } |
| @@ -862,7 +862,7 @@ bool BSD::IsFileDescriptorValid(s32 fd) const noexcept { | |||
| 862 | return true; | 862 | return true; |
| 863 | } | 863 | } |
| 864 | 864 | ||
| 865 | void BSD::BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept { | 865 | void BSD::BuildErrnoResponse(HLERequestContext& ctx, Errno bsd_errno) const noexcept { |
| 866 | IPC::ResponseBuilder rb{ctx, 4}; | 866 | IPC::ResponseBuilder rb{ctx, 4}; |
| 867 | 867 | ||
| 868 | rb.Push(ResultSuccess); | 868 | rb.Push(ResultSuccess); |
diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index 56bb3f8b1..30ae9c140 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h | |||
| @@ -41,7 +41,7 @@ private: | |||
| 41 | 41 | ||
| 42 | struct PollWork { | 42 | struct PollWork { |
| 43 | void Execute(BSD* bsd); | 43 | void Execute(BSD* bsd); |
| 44 | void Response(Kernel::HLERequestContext& ctx); | 44 | void Response(HLERequestContext& ctx); |
| 45 | 45 | ||
| 46 | s32 nfds; | 46 | s32 nfds; |
| 47 | s32 timeout; | 47 | s32 timeout; |
| @@ -53,7 +53,7 @@ private: | |||
| 53 | 53 | ||
| 54 | struct AcceptWork { | 54 | struct AcceptWork { |
| 55 | void Execute(BSD* bsd); | 55 | void Execute(BSD* bsd); |
| 56 | void Response(Kernel::HLERequestContext& ctx); | 56 | void Response(HLERequestContext& ctx); |
| 57 | 57 | ||
| 58 | s32 fd; | 58 | s32 fd; |
| 59 | std::vector<u8> write_buffer; | 59 | std::vector<u8> write_buffer; |
| @@ -63,7 +63,7 @@ private: | |||
| 63 | 63 | ||
| 64 | struct ConnectWork { | 64 | struct ConnectWork { |
| 65 | void Execute(BSD* bsd); | 65 | void Execute(BSD* bsd); |
| 66 | void Response(Kernel::HLERequestContext& ctx); | 66 | void Response(HLERequestContext& ctx); |
| 67 | 67 | ||
| 68 | s32 fd; | 68 | s32 fd; |
| 69 | std::span<const u8> addr; | 69 | std::span<const u8> addr; |
| @@ -72,7 +72,7 @@ private: | |||
| 72 | 72 | ||
| 73 | struct RecvWork { | 73 | struct RecvWork { |
| 74 | void Execute(BSD* bsd); | 74 | void Execute(BSD* bsd); |
| 75 | void Response(Kernel::HLERequestContext& ctx); | 75 | void Response(HLERequestContext& ctx); |
| 76 | 76 | ||
| 77 | s32 fd; | 77 | s32 fd; |
| 78 | u32 flags; | 78 | u32 flags; |
| @@ -83,7 +83,7 @@ private: | |||
| 83 | 83 | ||
| 84 | struct RecvFromWork { | 84 | struct RecvFromWork { |
| 85 | void Execute(BSD* bsd); | 85 | void Execute(BSD* bsd); |
| 86 | void Response(Kernel::HLERequestContext& ctx); | 86 | void Response(HLERequestContext& ctx); |
| 87 | 87 | ||
| 88 | s32 fd; | 88 | s32 fd; |
| 89 | u32 flags; | 89 | u32 flags; |
| @@ -95,7 +95,7 @@ private: | |||
| 95 | 95 | ||
| 96 | struct SendWork { | 96 | struct SendWork { |
| 97 | void Execute(BSD* bsd); | 97 | void Execute(BSD* bsd); |
| 98 | void Response(Kernel::HLERequestContext& ctx); | 98 | void Response(HLERequestContext& ctx); |
| 99 | 99 | ||
| 100 | s32 fd; | 100 | s32 fd; |
| 101 | u32 flags; | 101 | u32 flags; |
| @@ -106,7 +106,7 @@ private: | |||
| 106 | 106 | ||
| 107 | struct SendToWork { | 107 | struct SendToWork { |
| 108 | void Execute(BSD* bsd); | 108 | void Execute(BSD* bsd); |
| 109 | void Response(Kernel::HLERequestContext& ctx); | 109 | void Response(HLERequestContext& ctx); |
| 110 | 110 | ||
| 111 | s32 fd; | 111 | s32 fd; |
| 112 | u32 flags; | 112 | u32 flags; |
| @@ -116,32 +116,32 @@ private: | |||
| 116 | Errno bsd_errno{}; | 116 | Errno bsd_errno{}; |
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| 119 | void RegisterClient(Kernel::HLERequestContext& ctx); | 119 | void RegisterClient(HLERequestContext& ctx); |
| 120 | void StartMonitoring(Kernel::HLERequestContext& ctx); | 120 | void StartMonitoring(HLERequestContext& ctx); |
| 121 | void Socket(Kernel::HLERequestContext& ctx); | 121 | void Socket(HLERequestContext& ctx); |
| 122 | void Select(Kernel::HLERequestContext& ctx); | 122 | void Select(HLERequestContext& ctx); |
| 123 | void Poll(Kernel::HLERequestContext& ctx); | 123 | void Poll(HLERequestContext& ctx); |
| 124 | void Accept(Kernel::HLERequestContext& ctx); | 124 | void Accept(HLERequestContext& ctx); |
| 125 | void Bind(Kernel::HLERequestContext& ctx); | 125 | void Bind(HLERequestContext& ctx); |
| 126 | void Connect(Kernel::HLERequestContext& ctx); | 126 | void Connect(HLERequestContext& ctx); |
| 127 | void GetPeerName(Kernel::HLERequestContext& ctx); | 127 | void GetPeerName(HLERequestContext& ctx); |
| 128 | void GetSockName(Kernel::HLERequestContext& ctx); | 128 | void GetSockName(HLERequestContext& ctx); |
| 129 | void GetSockOpt(Kernel::HLERequestContext& ctx); | 129 | void GetSockOpt(HLERequestContext& ctx); |
| 130 | void Listen(Kernel::HLERequestContext& ctx); | 130 | void Listen(HLERequestContext& ctx); |
| 131 | void Fcntl(Kernel::HLERequestContext& ctx); | 131 | void Fcntl(HLERequestContext& ctx); |
| 132 | void SetSockOpt(Kernel::HLERequestContext& ctx); | 132 | void SetSockOpt(HLERequestContext& ctx); |
| 133 | void Shutdown(Kernel::HLERequestContext& ctx); | 133 | void Shutdown(HLERequestContext& ctx); |
| 134 | void Recv(Kernel::HLERequestContext& ctx); | 134 | void Recv(HLERequestContext& ctx); |
| 135 | void RecvFrom(Kernel::HLERequestContext& ctx); | 135 | void RecvFrom(HLERequestContext& ctx); |
| 136 | void Send(Kernel::HLERequestContext& ctx); | 136 | void Send(HLERequestContext& ctx); |
| 137 | void SendTo(Kernel::HLERequestContext& ctx); | 137 | void SendTo(HLERequestContext& ctx); |
| 138 | void Write(Kernel::HLERequestContext& ctx); | 138 | void Write(HLERequestContext& ctx); |
| 139 | void Read(Kernel::HLERequestContext& ctx); | 139 | void Read(HLERequestContext& ctx); |
| 140 | void Close(Kernel::HLERequestContext& ctx); | 140 | void Close(HLERequestContext& ctx); |
| 141 | void EventFd(Kernel::HLERequestContext& ctx); | 141 | void EventFd(HLERequestContext& ctx); |
| 142 | 142 | ||
| 143 | template <typename Work> | 143 | template <typename Work> |
| 144 | void ExecuteWork(Kernel::HLERequestContext& ctx, Work work); | 144 | void ExecuteWork(HLERequestContext& ctx, Work work); |
| 145 | 145 | ||
| 146 | std::pair<s32, Errno> SocketImpl(Domain domain, Type type, Protocol protocol); | 146 | std::pair<s32, Errno> SocketImpl(Domain domain, Type type, Protocol protocol); |
| 147 | std::pair<s32, Errno> PollImpl(std::vector<u8>& write_buffer, std::span<const u8> read_buffer, | 147 | std::pair<s32, Errno> PollImpl(std::vector<u8>& write_buffer, std::span<const u8> read_buffer, |
| @@ -166,7 +166,7 @@ private: | |||
| 166 | s32 FindFreeFileDescriptorHandle() noexcept; | 166 | s32 FindFreeFileDescriptorHandle() noexcept; |
| 167 | bool IsFileDescriptorValid(s32 fd) const noexcept; | 167 | bool IsFileDescriptorValid(s32 fd) const noexcept; |
| 168 | 168 | ||
| 169 | void BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept; | 169 | void BuildErrnoResponse(HLERequestContext& ctx, Errno bsd_errno) const noexcept; |
| 170 | 170 | ||
| 171 | std::array<std::optional<FileDescriptor>, MAX_FD> file_descriptors; | 171 | std::array<std::optional<FileDescriptor>, MAX_FD> file_descriptors; |
| 172 | 172 | ||
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index e96eda7f3..132dd5797 100644 --- a/src/core/hle/service/sockets/sfdnsres.cpp +++ b/src/core/hle/service/sockets/sfdnsres.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include "common/string_util.h" | 8 | #include "common/string_util.h" |
| 9 | #include "common/swap.h" | 9 | #include "common/swap.h" |
| 10 | #include "core/core.h" | 10 | #include "core/core.h" |
| 11 | #include "core/hle/ipc_helpers.h" | 11 | #include "core/hle/service/ipc_helpers.h" |
| 12 | #include "core/hle/service/sockets/sfdnsres.h" | 12 | #include "core/hle/service/sockets/sfdnsres.h" |
| 13 | #include "core/memory.h" | 13 | #include "core/memory.h" |
| 14 | 14 | ||
| @@ -185,7 +185,7 @@ static std::vector<u8> SerializeAddrInfo(const addrinfo* addrinfo, s32 result_co | |||
| 185 | return data; | 185 | return data; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | static std::pair<u32, s32> GetAddrInfoRequestImpl(Kernel::HLERequestContext& ctx) { | 188 | static std::pair<u32, s32> GetAddrInfoRequestImpl(HLERequestContext& ctx) { |
| 189 | struct Parameters { | 189 | struct Parameters { |
| 190 | u8 use_nsd_resolve; | 190 | u8 use_nsd_resolve; |
| 191 | u32 unknown; | 191 | u32 unknown; |
| @@ -221,7 +221,7 @@ static std::pair<u32, s32> GetAddrInfoRequestImpl(Kernel::HLERequestContext& ctx | |||
| 221 | return std::make_pair(data_size, result_code); | 221 | return std::make_pair(data_size, result_code); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | void SFDNSRES::GetAddrInfoRequest(Kernel::HLERequestContext& ctx) { | 224 | void SFDNSRES::GetAddrInfoRequest(HLERequestContext& ctx) { |
| 225 | auto [data_size, result_code] = GetAddrInfoRequestImpl(ctx); | 225 | auto [data_size, result_code] = GetAddrInfoRequestImpl(ctx); |
| 226 | 226 | ||
| 227 | IPC::ResponseBuilder rb{ctx, 4}; | 227 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -231,7 +231,7 @@ void SFDNSRES::GetAddrInfoRequest(Kernel::HLERequestContext& ctx) { | |||
| 231 | rb.Push(data_size); // serialized size | 231 | rb.Push(data_size); // serialized size |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | void SFDNSRES::GetAddrInfoRequestWithOptions(Kernel::HLERequestContext& ctx) { | 234 | void SFDNSRES::GetAddrInfoRequestWithOptions(HLERequestContext& ctx) { |
| 235 | // Additional options are ignored | 235 | // Additional options are ignored |
| 236 | auto [data_size, result_code] = GetAddrInfoRequestImpl(ctx); | 236 | auto [data_size, result_code] = GetAddrInfoRequestImpl(ctx); |
| 237 | 237 | ||
diff --git a/src/core/hle/service/sockets/sfdnsres.h b/src/core/hle/service/sockets/sfdnsres.h index 96018ea77..18e3cd60c 100644 --- a/src/core/hle/service/sockets/sfdnsres.h +++ b/src/core/hle/service/sockets/sfdnsres.h | |||
| @@ -17,8 +17,8 @@ public: | |||
| 17 | ~SFDNSRES() override; | 17 | ~SFDNSRES() override; |
| 18 | 18 | ||
| 19 | private: | 19 | private: |
| 20 | void GetAddrInfoRequest(Kernel::HLERequestContext& ctx); | 20 | void GetAddrInfoRequest(HLERequestContext& ctx); |
| 21 | void GetAddrInfoRequestWithOptions(Kernel::HLERequestContext& ctx); | 21 | void GetAddrInfoRequestWithOptions(HLERequestContext& ctx); |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | } // namespace Service::Sockets | 24 | } // namespace Service::Sockets |
diff --git a/src/core/hle/service/spl/spl_module.cpp b/src/core/hle/service/spl/spl_module.cpp index 31679e1bb..0227d4393 100644 --- a/src/core/hle/service/spl/spl_module.cpp +++ b/src/core/hle/service/spl/spl_module.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "core/hle/api_version.h" | 10 | #include "core/hle/api_version.h" |
| 11 | #include "core/hle/ipc_helpers.h" | 11 | #include "core/hle/service/ipc_helpers.h" |
| 12 | #include "core/hle/service/server_manager.h" | 12 | #include "core/hle/service/server_manager.h" |
| 13 | #include "core/hle/service/spl/csrng.h" | 13 | #include "core/hle/service/spl/csrng.h" |
| 14 | #include "core/hle/service/spl/spl.h" | 14 | #include "core/hle/service/spl/spl.h" |
| @@ -23,7 +23,7 @@ Module::Interface::Interface(Core::System& system_, std::shared_ptr<Module> modu | |||
| 23 | 23 | ||
| 24 | Module::Interface::~Interface() = default; | 24 | Module::Interface::~Interface() = default; |
| 25 | 25 | ||
| 26 | void Module::Interface::GetConfig(Kernel::HLERequestContext& ctx) { | 26 | void Module::Interface::GetConfig(HLERequestContext& ctx) { |
| 27 | IPC::RequestParser rp{ctx}; | 27 | IPC::RequestParser rp{ctx}; |
| 28 | const auto config_item = rp.PopEnum<ConfigItem>(); | 28 | const auto config_item = rp.PopEnum<ConfigItem>(); |
| 29 | 29 | ||
| @@ -48,21 +48,21 @@ void Module::Interface::GetConfig(Kernel::HLERequestContext& ctx) { | |||
| 48 | rb.Push(*smc_result); | 48 | rb.Push(*smc_result); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void Module::Interface::ModularExponentiate(Kernel::HLERequestContext& ctx) { | 51 | void Module::Interface::ModularExponentiate(HLERequestContext& ctx) { |
| 52 | UNIMPLEMENTED_MSG("ModularExponentiate is not implemented!"); | 52 | UNIMPLEMENTED_MSG("ModularExponentiate is not implemented!"); |
| 53 | 53 | ||
| 54 | IPC::ResponseBuilder rb{ctx, 2}; | 54 | IPC::ResponseBuilder rb{ctx, 2}; |
| 55 | rb.Push(ResultSecureMonitorNotImplemented); | 55 | rb.Push(ResultSecureMonitorNotImplemented); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void Module::Interface::SetConfig(Kernel::HLERequestContext& ctx) { | 58 | void Module::Interface::SetConfig(HLERequestContext& ctx) { |
| 59 | UNIMPLEMENTED_MSG("SetConfig is not implemented!"); | 59 | UNIMPLEMENTED_MSG("SetConfig is not implemented!"); |
| 60 | 60 | ||
| 61 | IPC::ResponseBuilder rb{ctx, 2}; | 61 | IPC::ResponseBuilder rb{ctx, 2}; |
| 62 | rb.Push(ResultSecureMonitorNotImplemented); | 62 | rb.Push(ResultSecureMonitorNotImplemented); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | void Module::Interface::GenerateRandomBytes(Kernel::HLERequestContext& ctx) { | 65 | void Module::Interface::GenerateRandomBytes(HLERequestContext& ctx) { |
| 66 | LOG_DEBUG(Service_SPL, "called"); | 66 | LOG_DEBUG(Service_SPL, "called"); |
| 67 | 67 | ||
| 68 | const std::size_t size = ctx.GetWriteBufferSize(); | 68 | const std::size_t size = ctx.GetWriteBufferSize(); |
| @@ -77,21 +77,21 @@ void Module::Interface::GenerateRandomBytes(Kernel::HLERequestContext& ctx) { | |||
| 77 | rb.Push(ResultSuccess); | 77 | rb.Push(ResultSuccess); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void Module::Interface::IsDevelopment(Kernel::HLERequestContext& ctx) { | 80 | void Module::Interface::IsDevelopment(HLERequestContext& ctx) { |
| 81 | UNIMPLEMENTED_MSG("IsDevelopment is not implemented!"); | 81 | UNIMPLEMENTED_MSG("IsDevelopment is not implemented!"); |
| 82 | 82 | ||
| 83 | IPC::ResponseBuilder rb{ctx, 2}; | 83 | IPC::ResponseBuilder rb{ctx, 2}; |
| 84 | rb.Push(ResultSecureMonitorNotImplemented); | 84 | rb.Push(ResultSecureMonitorNotImplemented); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void Module::Interface::SetBootReason(Kernel::HLERequestContext& ctx) { | 87 | void Module::Interface::SetBootReason(HLERequestContext& ctx) { |
| 88 | UNIMPLEMENTED_MSG("SetBootReason is not implemented!"); | 88 | UNIMPLEMENTED_MSG("SetBootReason is not implemented!"); |
| 89 | 89 | ||
| 90 | IPC::ResponseBuilder rb{ctx, 2}; | 90 | IPC::ResponseBuilder rb{ctx, 2}; |
| 91 | rb.Push(ResultSecureMonitorNotImplemented); | 91 | rb.Push(ResultSecureMonitorNotImplemented); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | void Module::Interface::GetBootReason(Kernel::HLERequestContext& ctx) { | 94 | void Module::Interface::GetBootReason(HLERequestContext& ctx) { |
| 95 | UNIMPLEMENTED_MSG("GetBootReason is not implemented!"); | 95 | UNIMPLEMENTED_MSG("GetBootReason is not implemented!"); |
| 96 | 96 | ||
| 97 | IPC::ResponseBuilder rb{ctx, 2}; | 97 | IPC::ResponseBuilder rb{ctx, 2}; |
diff --git a/src/core/hle/service/spl/spl_module.h b/src/core/hle/service/spl/spl_module.h index baed9efd7..e074e115d 100644 --- a/src/core/hle/service/spl/spl_module.h +++ b/src/core/hle/service/spl/spl_module.h | |||
| @@ -23,13 +23,13 @@ public: | |||
| 23 | ~Interface() override; | 23 | ~Interface() override; |
| 24 | 24 | ||
| 25 | // General | 25 | // General |
| 26 | void GetConfig(Kernel::HLERequestContext& ctx); | 26 | void GetConfig(HLERequestContext& ctx); |
| 27 | void ModularExponentiate(Kernel::HLERequestContext& ctx); | 27 | void ModularExponentiate(HLERequestContext& ctx); |
| 28 | void SetConfig(Kernel::HLERequestContext& ctx); | 28 | void SetConfig(HLERequestContext& ctx); |
| 29 | void GenerateRandomBytes(Kernel::HLERequestContext& ctx); | 29 | void GenerateRandomBytes(HLERequestContext& ctx); |
| 30 | void IsDevelopment(Kernel::HLERequestContext& ctx); | 30 | void IsDevelopment(HLERequestContext& ctx); |
| 31 | void SetBootReason(Kernel::HLERequestContext& ctx); | 31 | void SetBootReason(HLERequestContext& ctx); |
| 32 | void GetBootReason(Kernel::HLERequestContext& ctx); | 32 | void GetBootReason(HLERequestContext& ctx); |
| 33 | 33 | ||
| 34 | protected: | 34 | protected: |
| 35 | std::shared_ptr<Module> module; | 35 | std::shared_ptr<Module> module; |
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index c1fd1a59b..b19bc1b3e 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/ipc_helpers.h" | 4 | #include "core/hle/service/ipc_helpers.h" |
| 5 | #include "core/hle/service/server_manager.h" | 5 | #include "core/hle/service/server_manager.h" |
| 6 | #include "core/hle/service/service.h" | 6 | #include "core/hle/service/service.h" |
| 7 | #include "core/hle/service/ssl/ssl.h" | 7 | #include "core/hle/service/ssl/ssl.h" |
| @@ -84,7 +84,7 @@ public: | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | private: | 86 | private: |
| 87 | void SetOption(Kernel::HLERequestContext& ctx) { | 87 | void SetOption(HLERequestContext& ctx) { |
| 88 | struct Parameters { | 88 | struct Parameters { |
| 89 | u8 enable; | 89 | u8 enable; |
| 90 | u32 option; | 90 | u32 option; |
| @@ -100,7 +100,7 @@ private: | |||
| 100 | rb.Push(ResultSuccess); | 100 | rb.Push(ResultSuccess); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void CreateConnection(Kernel::HLERequestContext& ctx) { | 103 | void CreateConnection(HLERequestContext& ctx) { |
| 104 | LOG_WARNING(Service_SSL, "(STUBBED) called"); | 104 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 105 | 105 | ||
| 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -108,7 +108,7 @@ private: | |||
| 108 | rb.PushIpcInterface<ISslConnection>(system); | 108 | rb.PushIpcInterface<ISslConnection>(system); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | void ImportServerPki(Kernel::HLERequestContext& ctx) { | 111 | void ImportServerPki(HLERequestContext& ctx) { |
| 112 | IPC::RequestParser rp{ctx}; | 112 | IPC::RequestParser rp{ctx}; |
| 113 | const auto certificate_format = rp.PopEnum<CertificateFormat>(); | 113 | const auto certificate_format = rp.PopEnum<CertificateFormat>(); |
| 114 | [[maybe_unused]] const auto pkcs_12_certificates = ctx.ReadBuffer(0); | 114 | [[maybe_unused]] const auto pkcs_12_certificates = ctx.ReadBuffer(0); |
| @@ -122,7 +122,7 @@ private: | |||
| 122 | rb.Push(server_id); | 122 | rb.Push(server_id); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void ImportClientPki(Kernel::HLERequestContext& ctx) { | 125 | void ImportClientPki(HLERequestContext& ctx) { |
| 126 | [[maybe_unused]] const auto pkcs_12_certificate = ctx.ReadBuffer(0); | 126 | [[maybe_unused]] const auto pkcs_12_certificate = ctx.ReadBuffer(0); |
| 127 | [[maybe_unused]] const auto ascii_password = [&ctx] { | 127 | [[maybe_unused]] const auto ascii_password = [&ctx] { |
| 128 | if (ctx.CanReadBuffer(1)) { | 128 | if (ctx.CanReadBuffer(1)) { |
| @@ -164,7 +164,7 @@ public: | |||
| 164 | 164 | ||
| 165 | private: | 165 | private: |
| 166 | u32 ssl_version{}; | 166 | u32 ssl_version{}; |
| 167 | void CreateContext(Kernel::HLERequestContext& ctx) { | 167 | void CreateContext(HLERequestContext& ctx) { |
| 168 | LOG_WARNING(Service_SSL, "(STUBBED) called"); | 168 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 169 | 169 | ||
| 170 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 170 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -172,7 +172,7 @@ private: | |||
| 172 | rb.PushIpcInterface<ISslContext>(system); | 172 | rb.PushIpcInterface<ISslContext>(system); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void SetInterfaceVersion(Kernel::HLERequestContext& ctx) { | 175 | void SetInterfaceVersion(HLERequestContext& ctx) { |
| 176 | LOG_DEBUG(Service_SSL, "called"); | 176 | LOG_DEBUG(Service_SSL, "called"); |
| 177 | 177 | ||
| 178 | IPC::RequestParser rp{ctx}; | 178 | IPC::RequestParser rp{ctx}; |
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 8020e407c..868be60c5 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | #include "core/core.h" | 5 | #include "core/core.h" |
| 6 | #include "core/core_timing.h" | 6 | #include "core/core_timing.h" |
| 7 | #include "core/hardware_properties.h" | 7 | #include "core/hardware_properties.h" |
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/kernel.h" | 8 | #include "core/hle/kernel/kernel.h" |
| 9 | #include "core/hle/service/ipc_helpers.h" | ||
| 10 | #include "core/hle/service/server_manager.h" | 10 | #include "core/hle/service/server_manager.h" |
| 11 | #include "core/hle/service/time/time.h" | 11 | #include "core/hle/service/time/time.h" |
| 12 | #include "core/hle/service/time/time_interface.h" | 12 | #include "core/hle/service/time/time_interface.h" |
| @@ -34,7 +34,7 @@ public: | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | private: | 36 | private: |
| 37 | void GetCurrentTime(Kernel::HLERequestContext& ctx) { | 37 | void GetCurrentTime(HLERequestContext& ctx) { |
| 38 | LOG_DEBUG(Service_Time, "called"); | 38 | LOG_DEBUG(Service_Time, "called"); |
| 39 | 39 | ||
| 40 | if (!clock_core.IsInitialized()) { | 40 | if (!clock_core.IsInitialized()) { |
| @@ -55,7 +55,7 @@ private: | |||
| 55 | rb.Push<s64>(posix_time); | 55 | rb.Push<s64>(posix_time); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void GetSystemClockContext(Kernel::HLERequestContext& ctx) { | 58 | void GetSystemClockContext(HLERequestContext& ctx) { |
| 59 | LOG_DEBUG(Service_Time, "called"); | 59 | LOG_DEBUG(Service_Time, "called"); |
| 60 | 60 | ||
| 61 | if (!clock_core.IsInitialized()) { | 61 | if (!clock_core.IsInitialized()) { |
| @@ -98,7 +98,7 @@ public: | |||
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | private: | 100 | private: |
| 101 | void GetCurrentTimePoint(Kernel::HLERequestContext& ctx) { | 101 | void GetCurrentTimePoint(HLERequestContext& ctx) { |
| 102 | LOG_DEBUG(Service_Time, "called"); | 102 | LOG_DEBUG(Service_Time, "called"); |
| 103 | 103 | ||
| 104 | if (!clock_core.IsInitialized()) { | 104 | if (!clock_core.IsInitialized()) { |
| @@ -178,7 +178,7 @@ Result Module::Interface::GetClockSnapshotFromSystemClockContextInternal( | |||
| 178 | return ResultSuccess; | 178 | return ResultSuccess; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ctx) { | 181 | void Module::Interface::GetStandardUserSystemClock(HLERequestContext& ctx) { |
| 182 | LOG_DEBUG(Service_Time, "called"); | 182 | LOG_DEBUG(Service_Time, "called"); |
| 183 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 183 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 184 | rb.Push(ResultSuccess); | 184 | rb.Push(ResultSuccess); |
| @@ -186,7 +186,7 @@ void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ct | |||
| 186 | system); | 186 | system); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) { | 189 | void Module::Interface::GetStandardNetworkSystemClock(HLERequestContext& ctx) { |
| 190 | LOG_DEBUG(Service_Time, "called"); | 190 | LOG_DEBUG(Service_Time, "called"); |
| 191 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 191 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 192 | rb.Push(ResultSuccess); | 192 | rb.Push(ResultSuccess); |
| @@ -194,14 +194,14 @@ void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& | |||
| 194 | system); | 194 | system); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) { | 197 | void Module::Interface::GetStandardSteadyClock(HLERequestContext& ctx) { |
| 198 | LOG_DEBUG(Service_Time, "called"); | 198 | LOG_DEBUG(Service_Time, "called"); |
| 199 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 199 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 200 | rb.Push(ResultSuccess); | 200 | rb.Push(ResultSuccess); |
| 201 | rb.PushIpcInterface<ISteadyClock>(system.GetTimeManager().GetStandardSteadyClockCore(), system); | 201 | rb.PushIpcInterface<ISteadyClock>(system.GetTimeManager().GetStandardSteadyClockCore(), system); |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { | 204 | void Module::Interface::GetTimeZoneService(HLERequestContext& ctx) { |
| 205 | LOG_DEBUG(Service_Time, "called"); | 205 | LOG_DEBUG(Service_Time, "called"); |
| 206 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 206 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 207 | rb.Push(ResultSuccess); | 207 | rb.Push(ResultSuccess); |
| @@ -209,7 +209,7 @@ void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { | |||
| 209 | system.GetTimeManager().GetTimeZoneContentManager()); | 209 | system.GetTimeManager().GetTimeZoneContentManager()); |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx) { | 212 | void Module::Interface::GetStandardLocalSystemClock(HLERequestContext& ctx) { |
| 213 | LOG_DEBUG(Service_Time, "called"); | 213 | LOG_DEBUG(Service_Time, "called"); |
| 214 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 214 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 215 | rb.Push(ResultSuccess); | 215 | rb.Push(ResultSuccess); |
| @@ -217,8 +217,7 @@ void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& c | |||
| 217 | system); | 217 | system); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | void Module::Interface::IsStandardNetworkSystemClockAccuracySufficient( | 220 | void Module::Interface::IsStandardNetworkSystemClockAccuracySufficient(HLERequestContext& ctx) { |
| 221 | Kernel::HLERequestContext& ctx) { | ||
| 222 | LOG_DEBUG(Service_Time, "called"); | 221 | LOG_DEBUG(Service_Time, "called"); |
| 223 | auto& clock_core{system.GetTimeManager().GetStandardNetworkSystemClockCore()}; | 222 | auto& clock_core{system.GetTimeManager().GetStandardNetworkSystemClockCore()}; |
| 224 | IPC::ResponseBuilder rb{ctx, 3}; | 223 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -226,7 +225,7 @@ void Module::Interface::IsStandardNetworkSystemClockAccuracySufficient( | |||
| 226 | rb.Push<u32>(clock_core.IsStandardNetworkSystemClockAccuracySufficient(system)); | 225 | rb.Push<u32>(clock_core.IsStandardNetworkSystemClockAccuracySufficient(system)); |
| 227 | } | 226 | } |
| 228 | 227 | ||
| 229 | void Module::Interface::CalculateMonotonicSystemClockBaseTimePoint(Kernel::HLERequestContext& ctx) { | 228 | void Module::Interface::CalculateMonotonicSystemClockBaseTimePoint(HLERequestContext& ctx) { |
| 230 | LOG_DEBUG(Service_Time, "called"); | 229 | LOG_DEBUG(Service_Time, "called"); |
| 231 | 230 | ||
| 232 | auto& steady_clock_core{system.GetTimeManager().GetStandardSteadyClockCore()}; | 231 | auto& steady_clock_core{system.GetTimeManager().GetStandardSteadyClockCore()}; |
| @@ -255,7 +254,7 @@ void Module::Interface::CalculateMonotonicSystemClockBaseTimePoint(Kernel::HLERe | |||
| 255 | rb.Push(ERROR_TIME_MISMATCH); | 254 | rb.Push(ERROR_TIME_MISMATCH); |
| 256 | } | 255 | } |
| 257 | 256 | ||
| 258 | void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { | 257 | void Module::Interface::GetClockSnapshot(HLERequestContext& ctx) { |
| 259 | IPC::RequestParser rp{ctx}; | 258 | IPC::RequestParser rp{ctx}; |
| 260 | const auto type{rp.PopEnum<Clock::TimeType>()}; | 259 | const auto type{rp.PopEnum<Clock::TimeType>()}; |
| 261 | 260 | ||
| @@ -296,7 +295,7 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { | |||
| 296 | rb.Push(ResultSuccess); | 295 | rb.Push(ResultSuccess); |
| 297 | } | 296 | } |
| 298 | 297 | ||
| 299 | void Module::Interface::GetClockSnapshotFromSystemClockContext(Kernel::HLERequestContext& ctx) { | 298 | void Module::Interface::GetClockSnapshotFromSystemClockContext(HLERequestContext& ctx) { |
| 300 | IPC::RequestParser rp{ctx}; | 299 | IPC::RequestParser rp{ctx}; |
| 301 | const auto type{rp.PopEnum<Clock::TimeType>()}; | 300 | const auto type{rp.PopEnum<Clock::TimeType>()}; |
| 302 | 301 | ||
| @@ -322,8 +321,7 @@ void Module::Interface::GetClockSnapshotFromSystemClockContext(Kernel::HLEReques | |||
| 322 | rb.Push(ResultSuccess); | 321 | rb.Push(ResultSuccess); |
| 323 | } | 322 | } |
| 324 | 323 | ||
| 325 | void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser( | 324 | void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser(HLERequestContext& ctx) { |
| 326 | Kernel::HLERequestContext& ctx) { | ||
| 327 | LOG_DEBUG(Service_Time, "called"); | 325 | LOG_DEBUG(Service_Time, "called"); |
| 328 | 326 | ||
| 329 | Clock::ClockSnapshot snapshot_a; | 327 | Clock::ClockSnapshot snapshot_a; |
| @@ -350,7 +348,7 @@ void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser( | |||
| 350 | rb.PushRaw(time_span_type.nanoseconds); | 348 | rb.PushRaw(time_span_type.nanoseconds); |
| 351 | } | 349 | } |
| 352 | 350 | ||
| 353 | void Module::Interface::CalculateSpanBetween(Kernel::HLERequestContext& ctx) { | 351 | void Module::Interface::CalculateSpanBetween(HLERequestContext& ctx) { |
| 354 | LOG_DEBUG(Service_Time, "called"); | 352 | LOG_DEBUG(Service_Time, "called"); |
| 355 | 353 | ||
| 356 | Clock::ClockSnapshot snapshot_a; | 354 | Clock::ClockSnapshot snapshot_a; |
| @@ -385,7 +383,7 @@ void Module::Interface::CalculateSpanBetween(Kernel::HLERequestContext& ctx) { | |||
| 385 | rb.PushRaw(time_span_type.nanoseconds); | 383 | rb.PushRaw(time_span_type.nanoseconds); |
| 386 | } | 384 | } |
| 387 | 385 | ||
| 388 | void Module::Interface::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | 386 | void Module::Interface::GetSharedMemoryNativeHandle(HLERequestContext& ctx) { |
| 389 | LOG_DEBUG(Service_Time, "called"); | 387 | LOG_DEBUG(Service_Time, "called"); |
| 390 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 388 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 391 | rb.Push(ResultSuccess); | 389 | rb.Push(ResultSuccess); |
diff --git a/src/core/hle/service/time/time.h b/src/core/hle/service/time/time.h index c9936c645..b2d754ef3 100644 --- a/src/core/hle/service/time/time.h +++ b/src/core/hle/service/time/time.h | |||
| @@ -22,18 +22,18 @@ public: | |||
| 22 | const char* name); | 22 | const char* name); |
| 23 | ~Interface() override; | 23 | ~Interface() override; |
| 24 | 24 | ||
| 25 | void GetStandardUserSystemClock(Kernel::HLERequestContext& ctx); | 25 | void GetStandardUserSystemClock(HLERequestContext& ctx); |
| 26 | void GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx); | 26 | void GetStandardNetworkSystemClock(HLERequestContext& ctx); |
| 27 | void GetStandardSteadyClock(Kernel::HLERequestContext& ctx); | 27 | void GetStandardSteadyClock(HLERequestContext& ctx); |
| 28 | void GetTimeZoneService(Kernel::HLERequestContext& ctx); | 28 | void GetTimeZoneService(HLERequestContext& ctx); |
| 29 | void GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx); | 29 | void GetStandardLocalSystemClock(HLERequestContext& ctx); |
| 30 | void IsStandardNetworkSystemClockAccuracySufficient(Kernel::HLERequestContext& ctx); | 30 | void IsStandardNetworkSystemClockAccuracySufficient(HLERequestContext& ctx); |
| 31 | void CalculateMonotonicSystemClockBaseTimePoint(Kernel::HLERequestContext& ctx); | 31 | void CalculateMonotonicSystemClockBaseTimePoint(HLERequestContext& ctx); |
| 32 | void GetClockSnapshot(Kernel::HLERequestContext& ctx); | 32 | void GetClockSnapshot(HLERequestContext& ctx); |
| 33 | void GetClockSnapshotFromSystemClockContext(Kernel::HLERequestContext& ctx); | 33 | void GetClockSnapshotFromSystemClockContext(HLERequestContext& ctx); |
| 34 | void CalculateStandardUserSystemClockDifferenceByUser(Kernel::HLERequestContext& ctx); | 34 | void CalculateStandardUserSystemClockDifferenceByUser(HLERequestContext& ctx); |
| 35 | void CalculateSpanBetween(Kernel::HLERequestContext& ctx); | 35 | void CalculateSpanBetween(HLERequestContext& ctx); |
| 36 | void GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx); | 36 | void GetSharedMemoryNativeHandle(HLERequestContext& ctx); |
| 37 | 37 | ||
| 38 | private: | 38 | private: |
| 39 | Result GetClockSnapshotFromSystemClockContextInternal( | 39 | Result GetClockSnapshotFromSystemClockContextInternal( |
diff --git a/src/core/hle/service/time/time_zone_service.cpp b/src/core/hle/service/time/time_zone_service.cpp index 961040bfc..cda8d8343 100644 --- a/src/core/hle/service/time/time_zone_service.cpp +++ b/src/core/hle/service/time/time_zone_service.cpp | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | 4 | #include "common/logging/log.h" |
| 5 | #include "core/hle/ipc_helpers.h" | 5 | #include "core/hle/service/ipc_helpers.h" |
| 6 | #include "core/hle/service/time/time_zone_content_manager.h" | 6 | #include "core/hle/service/time/time_zone_content_manager.h" |
| 7 | #include "core/hle/service/time/time_zone_service.h" | 7 | #include "core/hle/service/time/time_zone_service.h" |
| 8 | #include "core/hle/service/time/time_zone_types.h" | 8 | #include "core/hle/service/time/time_zone_types.h" |
| @@ -28,7 +28,7 @@ ITimeZoneService::ITimeZoneService(Core::System& system_, | |||
| 28 | RegisterHandlers(functions); | 28 | RegisterHandlers(functions); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | void ITimeZoneService::GetDeviceLocationName(Kernel::HLERequestContext& ctx) { | 31 | void ITimeZoneService::GetDeviceLocationName(HLERequestContext& ctx) { |
| 32 | LOG_DEBUG(Service_Time, "called"); | 32 | LOG_DEBUG(Service_Time, "called"); |
| 33 | 33 | ||
| 34 | TimeZone::LocationName location_name{}; | 34 | TimeZone::LocationName location_name{}; |
| @@ -45,7 +45,7 @@ void ITimeZoneService::GetDeviceLocationName(Kernel::HLERequestContext& ctx) { | |||
| 45 | rb.PushRaw(location_name); | 45 | rb.PushRaw(location_name); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | void ITimeZoneService::LoadTimeZoneRule(Kernel::HLERequestContext& ctx) { | 48 | void ITimeZoneService::LoadTimeZoneRule(HLERequestContext& ctx) { |
| 49 | IPC::RequestParser rp{ctx}; | 49 | IPC::RequestParser rp{ctx}; |
| 50 | const auto raw_location_name{rp.PopRaw<std::array<u8, 0x24>>()}; | 50 | const auto raw_location_name{rp.PopRaw<std::array<u8, 0x24>>()}; |
| 51 | 51 | ||
| @@ -77,7 +77,7 @@ void ITimeZoneService::LoadTimeZoneRule(Kernel::HLERequestContext& ctx) { | |||
| 77 | rb.Push(ResultSuccess); | 77 | rb.Push(ResultSuccess); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void ITimeZoneService::ToCalendarTime(Kernel::HLERequestContext& ctx) { | 80 | void ITimeZoneService::ToCalendarTime(HLERequestContext& ctx) { |
| 81 | IPC::RequestParser rp{ctx}; | 81 | IPC::RequestParser rp{ctx}; |
| 82 | const auto posix_time{rp.Pop<s64>()}; | 82 | const auto posix_time{rp.Pop<s64>()}; |
| 83 | 83 | ||
| @@ -101,7 +101,7 @@ void ITimeZoneService::ToCalendarTime(Kernel::HLERequestContext& ctx) { | |||
| 101 | rb.PushRaw(calendar_info); | 101 | rb.PushRaw(calendar_info); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | void ITimeZoneService::ToCalendarTimeWithMyRule(Kernel::HLERequestContext& ctx) { | 104 | void ITimeZoneService::ToCalendarTimeWithMyRule(HLERequestContext& ctx) { |
| 105 | IPC::RequestParser rp{ctx}; | 105 | IPC::RequestParser rp{ctx}; |
| 106 | const auto posix_time{rp.Pop<s64>()}; | 106 | const auto posix_time{rp.Pop<s64>()}; |
| 107 | 107 | ||
| @@ -122,7 +122,7 @@ void ITimeZoneService::ToCalendarTimeWithMyRule(Kernel::HLERequestContext& ctx) | |||
| 122 | rb.PushRaw(calendar_info); | 122 | rb.PushRaw(calendar_info); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void ITimeZoneService::ToPosixTime(Kernel::HLERequestContext& ctx) { | 125 | void ITimeZoneService::ToPosixTime(HLERequestContext& ctx) { |
| 126 | LOG_DEBUG(Service_Time, "called"); | 126 | LOG_DEBUG(Service_Time, "called"); |
| 127 | 127 | ||
| 128 | IPC::RequestParser rp{ctx}; | 128 | IPC::RequestParser rp{ctx}; |
| @@ -147,7 +147,7 @@ void ITimeZoneService::ToPosixTime(Kernel::HLERequestContext& ctx) { | |||
| 147 | rb.PushRaw<u32>(1); // Number of times we're returning | 147 | rb.PushRaw<u32>(1); // Number of times we're returning |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | void ITimeZoneService::ToPosixTimeWithMyRule(Kernel::HLERequestContext& ctx) { | 150 | void ITimeZoneService::ToPosixTimeWithMyRule(HLERequestContext& ctx) { |
| 151 | LOG_DEBUG(Service_Time, "called"); | 151 | LOG_DEBUG(Service_Time, "called"); |
| 152 | 152 | ||
| 153 | IPC::RequestParser rp{ctx}; | 153 | IPC::RequestParser rp{ctx}; |
diff --git a/src/core/hle/service/time/time_zone_service.h b/src/core/hle/service/time/time_zone_service.h index f151f4b56..ea83b5714 100644 --- a/src/core/hle/service/time/time_zone_service.h +++ b/src/core/hle/service/time/time_zone_service.h | |||
| @@ -21,12 +21,12 @@ public: | |||
| 21 | TimeZone::TimeZoneContentManager& time_zone_manager_); | 21 | TimeZone::TimeZoneContentManager& time_zone_manager_); |
| 22 | 22 | ||
| 23 | private: | 23 | private: |
| 24 | void GetDeviceLocationName(Kernel::HLERequestContext& ctx); | 24 | void GetDeviceLocationName(HLERequestContext& ctx); |
| 25 | void LoadTimeZoneRule(Kernel::HLERequestContext& ctx); | 25 | void LoadTimeZoneRule(HLERequestContext& ctx); |
| 26 | void ToCalendarTime(Kernel::HLERequestContext& ctx); | 26 | void ToCalendarTime(HLERequestContext& ctx); |
| 27 | void ToCalendarTimeWithMyRule(Kernel::HLERequestContext& ctx); | 27 | void ToCalendarTimeWithMyRule(HLERequestContext& ctx); |
| 28 | void ToPosixTime(Kernel::HLERequestContext& ctx); | 28 | void ToPosixTime(HLERequestContext& ctx); |
| 29 | void ToPosixTimeWithMyRule(Kernel::HLERequestContext& ctx); | 29 | void ToPosixTimeWithMyRule(HLERequestContext& ctx); |
| 30 | 30 | ||
| 31 | private: | 31 | private: |
| 32 | TimeZone::TimeZoneContentManager& time_zone_content_manager; | 32 | TimeZone::TimeZoneContentManager& time_zone_content_manager; |
diff --git a/src/core/hle/service/usb/usb.cpp b/src/core/hle/service/usb/usb.cpp index ddb73f394..a2855e783 100644 --- a/src/core/hle/service/usb/usb.cpp +++ b/src/core/hle/service/usb/usb.cpp | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/service/ipc_helpers.h" |
| 8 | #include "core/hle/service/server_manager.h" | 8 | #include "core/hle/service/server_manager.h" |
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 10 | #include "core/hle/service/usb/usb.h" | 10 | #include "core/hle/service/usb/usb.h" |
| @@ -147,7 +147,7 @@ public: | |||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | private: | 149 | private: |
| 150 | void GetPdSession(Kernel::HLERequestContext& ctx) { | 150 | void GetPdSession(HLERequestContext& ctx) { |
| 151 | LOG_DEBUG(Service_USB, "called"); | 151 | LOG_DEBUG(Service_USB, "called"); |
| 152 | 152 | ||
| 153 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 153 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -191,7 +191,7 @@ public: | |||
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | private: | 193 | private: |
| 194 | void GetPdCradleSession(Kernel::HLERequestContext& ctx) { | 194 | void GetPdCradleSession(HLERequestContext& ctx) { |
| 195 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 195 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 196 | rb.Push(ResultSuccess); | 196 | rb.Push(ResultSuccess); |
| 197 | rb.PushIpcInterface<IPdCradleSession>(system); | 197 | rb.PushIpcInterface<IPdCradleSession>(system); |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index d9cfebd70..fca076d7a 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -17,9 +17,9 @@ | |||
| 17 | #include "common/settings.h" | 17 | #include "common/settings.h" |
| 18 | #include "common/swap.h" | 18 | #include "common/swap.h" |
| 19 | #include "core/core_timing.h" | 19 | #include "core/core_timing.h" |
| 20 | #include "core/hle/ipc_helpers.h" | ||
| 21 | #include "core/hle/kernel/k_readable_event.h" | 20 | #include "core/hle/kernel/k_readable_event.h" |
| 22 | #include "core/hle/kernel/k_thread.h" | 21 | #include "core/hle/kernel/k_thread.h" |
| 22 | #include "core/hle/service/ipc_helpers.h" | ||
| 23 | #include "core/hle/service/nvdrv/nvdata.h" | 23 | #include "core/hle/service/nvdrv/nvdata.h" |
| 24 | #include "core/hle/service/nvflinger/binder.h" | 24 | #include "core/hle/service/nvflinger/binder.h" |
| 25 | #include "core/hle/service/nvflinger/buffer_queue_producer.h" | 25 | #include "core/hle/service/nvflinger/buffer_queue_producer.h" |
| @@ -85,7 +85,7 @@ public: | |||
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | private: | 87 | private: |
| 88 | void TransactParcel(Kernel::HLERequestContext& ctx) { | 88 | void TransactParcel(HLERequestContext& ctx) { |
| 89 | IPC::RequestParser rp{ctx}; | 89 | IPC::RequestParser rp{ctx}; |
| 90 | const u32 id = rp.Pop<u32>(); | 90 | const u32 id = rp.Pop<u32>(); |
| 91 | const auto transaction = static_cast<android::TransactionId>(rp.Pop<u32>()); | 91 | const auto transaction = static_cast<android::TransactionId>(rp.Pop<u32>()); |
| @@ -100,7 +100,7 @@ private: | |||
| 100 | rb.Push(ResultSuccess); | 100 | rb.Push(ResultSuccess); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void AdjustRefcount(Kernel::HLERequestContext& ctx) { | 103 | void AdjustRefcount(HLERequestContext& ctx) { |
| 104 | IPC::RequestParser rp{ctx}; | 104 | IPC::RequestParser rp{ctx}; |
| 105 | const u32 id = rp.Pop<u32>(); | 105 | const u32 id = rp.Pop<u32>(); |
| 106 | const s32 addval = rp.PopRaw<s32>(); | 106 | const s32 addval = rp.PopRaw<s32>(); |
| @@ -113,7 +113,7 @@ private: | |||
| 113 | rb.Push(ResultSuccess); | 113 | rb.Push(ResultSuccess); |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | void GetNativeHandle(Kernel::HLERequestContext& ctx) { | 116 | void GetNativeHandle(HLERequestContext& ctx) { |
| 117 | IPC::RequestParser rp{ctx}; | 117 | IPC::RequestParser rp{ctx}; |
| 118 | const u32 id = rp.Pop<u32>(); | 118 | const u32 id = rp.Pop<u32>(); |
| 119 | const u32 unknown = rp.Pop<u32>(); | 119 | const u32 unknown = rp.Pop<u32>(); |
| @@ -186,7 +186,7 @@ public: | |||
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | private: | 188 | private: |
| 189 | void SetLayerZ(Kernel::HLERequestContext& ctx) { | 189 | void SetLayerZ(HLERequestContext& ctx) { |
| 190 | IPC::RequestParser rp{ctx}; | 190 | IPC::RequestParser rp{ctx}; |
| 191 | const u64 layer_id = rp.Pop<u64>(); | 191 | const u64 layer_id = rp.Pop<u64>(); |
| 192 | const u64 z_value = rp.Pop<u64>(); | 192 | const u64 z_value = rp.Pop<u64>(); |
| @@ -200,7 +200,7 @@ private: | |||
| 200 | 200 | ||
| 201 | // This function currently does nothing but return a success error code in | 201 | // This function currently does nothing but return a success error code in |
| 202 | // the vi library itself, so do the same thing, but log out the passed in values. | 202 | // the vi library itself, so do the same thing, but log out the passed in values. |
| 203 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { | 203 | void SetLayerVisibility(HLERequestContext& ctx) { |
| 204 | IPC::RequestParser rp{ctx}; | 204 | IPC::RequestParser rp{ctx}; |
| 205 | const u64 layer_id = rp.Pop<u64>(); | 205 | const u64 layer_id = rp.Pop<u64>(); |
| 206 | const bool visibility = rp.Pop<bool>(); | 206 | const bool visibility = rp.Pop<bool>(); |
| @@ -211,7 +211,7 @@ private: | |||
| 211 | rb.Push(ResultSuccess); | 211 | rb.Push(ResultSuccess); |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | void GetDisplayMode(Kernel::HLERequestContext& ctx) { | 214 | void GetDisplayMode(HLERequestContext& ctx) { |
| 215 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 215 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 216 | 216 | ||
| 217 | IPC::ResponseBuilder rb{ctx, 6}; | 217 | IPC::ResponseBuilder rb{ctx, 6}; |
| @@ -325,7 +325,7 @@ public: | |||
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | private: | 327 | private: |
| 328 | void CloseDisplay(Kernel::HLERequestContext& ctx) { | 328 | void CloseDisplay(HLERequestContext& ctx) { |
| 329 | IPC::RequestParser rp{ctx}; | 329 | IPC::RequestParser rp{ctx}; |
| 330 | const u64 display = rp.Pop<u64>(); | 330 | const u64 display = rp.Pop<u64>(); |
| 331 | 331 | ||
| @@ -335,7 +335,7 @@ private: | |||
| 335 | rb.Push(rc); | 335 | rb.Push(rc); |
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | void CreateManagedLayer(Kernel::HLERequestContext& ctx) { | 338 | void CreateManagedLayer(HLERequestContext& ctx) { |
| 339 | IPC::RequestParser rp{ctx}; | 339 | IPC::RequestParser rp{ctx}; |
| 340 | const u32 unknown = rp.Pop<u32>(); | 340 | const u32 unknown = rp.Pop<u32>(); |
| 341 | rp.Skip(1, false); | 341 | rp.Skip(1, false); |
| @@ -359,7 +359,7 @@ private: | |||
| 359 | rb.Push(*layer_id); | 359 | rb.Push(*layer_id); |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | void AddToLayerStack(Kernel::HLERequestContext& ctx) { | 362 | void AddToLayerStack(HLERequestContext& ctx) { |
| 363 | IPC::RequestParser rp{ctx}; | 363 | IPC::RequestParser rp{ctx}; |
| 364 | const u32 stack = rp.Pop<u32>(); | 364 | const u32 stack = rp.Pop<u32>(); |
| 365 | const u64 layer_id = rp.Pop<u64>(); | 365 | const u64 layer_id = rp.Pop<u64>(); |
| @@ -371,7 +371,7 @@ private: | |||
| 371 | rb.Push(ResultSuccess); | 371 | rb.Push(ResultSuccess); |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { | 374 | void SetLayerVisibility(HLERequestContext& ctx) { |
| 375 | IPC::RequestParser rp{ctx}; | 375 | IPC::RequestParser rp{ctx}; |
| 376 | const u64 layer_id = rp.Pop<u64>(); | 376 | const u64 layer_id = rp.Pop<u64>(); |
| 377 | const bool visibility = rp.Pop<bool>(); | 377 | const bool visibility = rp.Pop<bool>(); |
| @@ -440,7 +440,7 @@ private: | |||
| 440 | PreserveAspectRatio = 4, | 440 | PreserveAspectRatio = 4, |
| 441 | }; | 441 | }; |
| 442 | 442 | ||
| 443 | void GetRelayService(Kernel::HLERequestContext& ctx) { | 443 | void GetRelayService(HLERequestContext& ctx) { |
| 444 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 444 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 445 | 445 | ||
| 446 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 446 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -448,7 +448,7 @@ private: | |||
| 448 | rb.PushIpcInterface<IHOSBinderDriver>(system, hos_binder_driver_server); | 448 | rb.PushIpcInterface<IHOSBinderDriver>(system, hos_binder_driver_server); |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | void GetSystemDisplayService(Kernel::HLERequestContext& ctx) { | 451 | void GetSystemDisplayService(HLERequestContext& ctx) { |
| 452 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 452 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 453 | 453 | ||
| 454 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 454 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -456,7 +456,7 @@ private: | |||
| 456 | rb.PushIpcInterface<ISystemDisplayService>(system); | 456 | rb.PushIpcInterface<ISystemDisplayService>(system); |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | void GetManagerDisplayService(Kernel::HLERequestContext& ctx) { | 459 | void GetManagerDisplayService(HLERequestContext& ctx) { |
| 460 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 460 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 461 | 461 | ||
| 462 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 462 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -464,7 +464,7 @@ private: | |||
| 464 | rb.PushIpcInterface<IManagerDisplayService>(system, nv_flinger); | 464 | rb.PushIpcInterface<IManagerDisplayService>(system, nv_flinger); |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | void GetIndirectDisplayTransactionService(Kernel::HLERequestContext& ctx) { | 467 | void GetIndirectDisplayTransactionService(HLERequestContext& ctx) { |
| 468 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 468 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 469 | 469 | ||
| 470 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 470 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -472,7 +472,7 @@ private: | |||
| 472 | rb.PushIpcInterface<IHOSBinderDriver>(system, hos_binder_driver_server); | 472 | rb.PushIpcInterface<IHOSBinderDriver>(system, hos_binder_driver_server); |
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | void OpenDisplay(Kernel::HLERequestContext& ctx) { | 475 | void OpenDisplay(HLERequestContext& ctx) { |
| 476 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 476 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 477 | 477 | ||
| 478 | IPC::RequestParser rp{ctx}; | 478 | IPC::RequestParser rp{ctx}; |
| @@ -481,13 +481,13 @@ private: | |||
| 481 | OpenDisplayImpl(ctx, std::string_view{name_buf.data(), name_buf.size()}); | 481 | OpenDisplayImpl(ctx, std::string_view{name_buf.data(), name_buf.size()}); |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | void OpenDefaultDisplay(Kernel::HLERequestContext& ctx) { | 484 | void OpenDefaultDisplay(HLERequestContext& ctx) { |
| 485 | LOG_DEBUG(Service_VI, "called"); | 485 | LOG_DEBUG(Service_VI, "called"); |
| 486 | 486 | ||
| 487 | OpenDisplayImpl(ctx, "Default"); | 487 | OpenDisplayImpl(ctx, "Default"); |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | void OpenDisplayImpl(Kernel::HLERequestContext& ctx, std::string_view name) { | 490 | void OpenDisplayImpl(HLERequestContext& ctx, std::string_view name) { |
| 491 | const auto trim_pos = name.find('\0'); | 491 | const auto trim_pos = name.find('\0'); |
| 492 | 492 | ||
| 493 | if (trim_pos != std::string_view::npos) { | 493 | if (trim_pos != std::string_view::npos) { |
| @@ -509,7 +509,7 @@ private: | |||
| 509 | rb.Push<u64>(*display_id); | 509 | rb.Push<u64>(*display_id); |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | void CloseDisplay(Kernel::HLERequestContext& ctx) { | 512 | void CloseDisplay(HLERequestContext& ctx) { |
| 513 | IPC::RequestParser rp{ctx}; | 513 | IPC::RequestParser rp{ctx}; |
| 514 | const u64 display_id = rp.Pop<u64>(); | 514 | const u64 display_id = rp.Pop<u64>(); |
| 515 | 515 | ||
| @@ -521,14 +521,14 @@ private: | |||
| 521 | 521 | ||
| 522 | // This literally does nothing internally in the actual service itself, | 522 | // This literally does nothing internally in the actual service itself, |
| 523 | // and just returns a successful result code regardless of the input. | 523 | // and just returns a successful result code regardless of the input. |
| 524 | void SetDisplayEnabled(Kernel::HLERequestContext& ctx) { | 524 | void SetDisplayEnabled(HLERequestContext& ctx) { |
| 525 | LOG_DEBUG(Service_VI, "called."); | 525 | LOG_DEBUG(Service_VI, "called."); |
| 526 | 526 | ||
| 527 | IPC::ResponseBuilder rb{ctx, 2}; | 527 | IPC::ResponseBuilder rb{ctx, 2}; |
| 528 | rb.Push(ResultSuccess); | 528 | rb.Push(ResultSuccess); |
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | void GetDisplayResolution(Kernel::HLERequestContext& ctx) { | 531 | void GetDisplayResolution(HLERequestContext& ctx) { |
| 532 | IPC::RequestParser rp{ctx}; | 532 | IPC::RequestParser rp{ctx}; |
| 533 | const u64 display_id = rp.Pop<u64>(); | 533 | const u64 display_id = rp.Pop<u64>(); |
| 534 | 534 | ||
| @@ -544,7 +544,7 @@ private: | |||
| 544 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight)); | 544 | rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight)); |
| 545 | } | 545 | } |
| 546 | 546 | ||
| 547 | void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { | 547 | void SetLayerScalingMode(HLERequestContext& ctx) { |
| 548 | IPC::RequestParser rp{ctx}; | 548 | IPC::RequestParser rp{ctx}; |
| 549 | const auto scaling_mode = rp.PopEnum<NintendoScaleMode>(); | 549 | const auto scaling_mode = rp.PopEnum<NintendoScaleMode>(); |
| 550 | const u64 unknown = rp.Pop<u64>(); | 550 | const u64 unknown = rp.Pop<u64>(); |
| @@ -570,7 +570,7 @@ private: | |||
| 570 | rb.Push(ResultSuccess); | 570 | rb.Push(ResultSuccess); |
| 571 | } | 571 | } |
| 572 | 572 | ||
| 573 | void ListDisplays(Kernel::HLERequestContext& ctx) { | 573 | void ListDisplays(HLERequestContext& ctx) { |
| 574 | LOG_WARNING(Service_VI, "(STUBBED) called"); | 574 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 575 | 575 | ||
| 576 | const DisplayInfo display_info; | 576 | const DisplayInfo display_info; |
| @@ -580,7 +580,7 @@ private: | |||
| 580 | rb.Push<u64>(1); | 580 | rb.Push<u64>(1); |
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | void OpenLayer(Kernel::HLERequestContext& ctx) { | 583 | void OpenLayer(HLERequestContext& ctx) { |
| 584 | IPC::RequestParser rp{ctx}; | 584 | IPC::RequestParser rp{ctx}; |
| 585 | const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); | 585 | const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); |
| 586 | const auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); | 586 | const auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); |
| @@ -616,7 +616,7 @@ private: | |||
| 616 | rb.Push<u64>(buffer_size); | 616 | rb.Push<u64>(buffer_size); |
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | void CloseLayer(Kernel::HLERequestContext& ctx) { | 619 | void CloseLayer(HLERequestContext& ctx) { |
| 620 | IPC::RequestParser rp{ctx}; | 620 | IPC::RequestParser rp{ctx}; |
| 621 | const auto layer_id{rp.Pop<u64>()}; | 621 | const auto layer_id{rp.Pop<u64>()}; |
| 622 | 622 | ||
| @@ -628,7 +628,7 @@ private: | |||
| 628 | rb.Push(ResultSuccess); | 628 | rb.Push(ResultSuccess); |
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | void CreateStrayLayer(Kernel::HLERequestContext& ctx) { | 631 | void CreateStrayLayer(HLERequestContext& ctx) { |
| 632 | IPC::RequestParser rp{ctx}; | 632 | IPC::RequestParser rp{ctx}; |
| 633 | const u32 flags = rp.Pop<u32>(); | 633 | const u32 flags = rp.Pop<u32>(); |
| 634 | rp.Pop<u32>(); // padding | 634 | rp.Pop<u32>(); // padding |
| @@ -663,7 +663,7 @@ private: | |||
| 663 | rb.Push<u64>(buffer_size); | 663 | rb.Push<u64>(buffer_size); |
| 664 | } | 664 | } |
| 665 | 665 | ||
| 666 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { | 666 | void DestroyStrayLayer(HLERequestContext& ctx) { |
| 667 | IPC::RequestParser rp{ctx}; | 667 | IPC::RequestParser rp{ctx}; |
| 668 | const u64 layer_id = rp.Pop<u64>(); | 668 | const u64 layer_id = rp.Pop<u64>(); |
| 669 | 669 | ||
| @@ -673,7 +673,7 @@ private: | |||
| 673 | rb.Push(ResultSuccess); | 673 | rb.Push(ResultSuccess); |
| 674 | } | 674 | } |
| 675 | 675 | ||
| 676 | void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { | 676 | void GetDisplayVsyncEvent(HLERequestContext& ctx) { |
| 677 | IPC::RequestParser rp{ctx}; | 677 | IPC::RequestParser rp{ctx}; |
| 678 | const u64 display_id = rp.Pop<u64>(); | 678 | const u64 display_id = rp.Pop<u64>(); |
| 679 | 679 | ||
| @@ -696,7 +696,7 @@ private: | |||
| 696 | rb.PushCopyObjects(*vsync_event); | 696 | rb.PushCopyObjects(*vsync_event); |
| 697 | } | 697 | } |
| 698 | 698 | ||
| 699 | void ConvertScalingMode(Kernel::HLERequestContext& ctx) { | 699 | void ConvertScalingMode(HLERequestContext& ctx) { |
| 700 | IPC::RequestParser rp{ctx}; | 700 | IPC::RequestParser rp{ctx}; |
| 701 | const auto mode = rp.PopEnum<NintendoScaleMode>(); | 701 | const auto mode = rp.PopEnum<NintendoScaleMode>(); |
| 702 | LOG_DEBUG(Service_VI, "called mode={}", mode); | 702 | LOG_DEBUG(Service_VI, "called mode={}", mode); |
| @@ -713,7 +713,7 @@ private: | |||
| 713 | } | 713 | } |
| 714 | } | 714 | } |
| 715 | 715 | ||
| 716 | void GetIndirectLayerImageMap(Kernel::HLERequestContext& ctx) { | 716 | void GetIndirectLayerImageMap(HLERequestContext& ctx) { |
| 717 | IPC::RequestParser rp{ctx}; | 717 | IPC::RequestParser rp{ctx}; |
| 718 | const auto width = rp.Pop<s64>(); | 718 | const auto width = rp.Pop<s64>(); |
| 719 | const auto height = rp.Pop<s64>(); | 719 | const auto height = rp.Pop<s64>(); |
| @@ -739,7 +739,7 @@ private: | |||
| 739 | rb.Push(ResultSuccess); | 739 | rb.Push(ResultSuccess); |
| 740 | } | 740 | } |
| 741 | 741 | ||
| 742 | void GetIndirectLayerImageRequiredMemoryInfo(Kernel::HLERequestContext& ctx) { | 742 | void GetIndirectLayerImageRequiredMemoryInfo(HLERequestContext& ctx) { |
| 743 | IPC::RequestParser rp{ctx}; | 743 | IPC::RequestParser rp{ctx}; |
| 744 | const auto width = rp.Pop<u64>(); | 744 | const auto width = rp.Pop<u64>(); |
| 745 | const auto height = rp.Pop<u64>(); | 745 | const auto height = rp.Pop<u64>(); |
| @@ -790,7 +790,7 @@ static bool IsValidServiceAccess(Permission permission, Policy policy) { | |||
| 790 | return false; | 790 | return false; |
| 791 | } | 791 | } |
| 792 | 792 | ||
| 793 | void detail::GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system, | 793 | void detail::GetDisplayServiceImpl(HLERequestContext& ctx, Core::System& system, |
| 794 | NVFlinger::NVFlinger& nv_flinger, | 794 | NVFlinger::NVFlinger& nv_flinger, |
| 795 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server, | 795 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server, |
| 796 | Permission permission) { | 796 | Permission permission) { |
diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h index 4ed7aaf2b..48b2f30aa 100644 --- a/src/core/hle/service/vi/vi.h +++ b/src/core/hle/service/vi/vi.h | |||
| @@ -9,7 +9,7 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | 12 | namespace Service { |
| 13 | class HLERequestContext; | 13 | class HLERequestContext; |
| 14 | } | 14 | } |
| 15 | 15 | ||
| @@ -42,7 +42,7 @@ enum class Policy { | |||
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | namespace detail { | 44 | namespace detail { |
| 45 | void GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system, | 45 | void GetDisplayServiceImpl(HLERequestContext& ctx, Core::System& system, |
| 46 | NVFlinger::NVFlinger& nv_flinger, | 46 | NVFlinger::NVFlinger& nv_flinger, |
| 47 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server, | 47 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server, |
| 48 | Permission permission); | 48 | Permission permission); |
diff --git a/src/core/hle/service/vi/vi_m.cpp b/src/core/hle/service/vi/vi_m.cpp index 7ca44354b..019e55811 100644 --- a/src/core/hle/service/vi/vi_m.cpp +++ b/src/core/hle/service/vi/vi_m.cpp | |||
| @@ -24,7 +24,7 @@ VI_M::VI_M(Core::System& system_, NVFlinger::NVFlinger& nv_flinger_, | |||
| 24 | 24 | ||
| 25 | VI_M::~VI_M() = default; | 25 | VI_M::~VI_M() = default; |
| 26 | 26 | ||
| 27 | void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) { | 27 | void VI_M::GetDisplayService(HLERequestContext& ctx) { |
| 28 | LOG_DEBUG(Service_VI, "called"); | 28 | LOG_DEBUG(Service_VI, "called"); |
| 29 | 29 | ||
| 30 | detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, | 30 | detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, |
diff --git a/src/core/hle/service/vi/vi_m.h b/src/core/hle/service/vi/vi_m.h index 3bf76d439..392da04a3 100644 --- a/src/core/hle/service/vi/vi_m.h +++ b/src/core/hle/service/vi/vi_m.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::NVFlinger { | 12 | namespace Service::NVFlinger { |
| 17 | class HosBinderDriverServer; | 13 | class HosBinderDriverServer; |
| 18 | class NVFlinger; | 14 | class NVFlinger; |
| @@ -27,7 +23,7 @@ public: | |||
| 27 | ~VI_M() override; | 23 | ~VI_M() override; |
| 28 | 24 | ||
| 29 | private: | 25 | private: |
| 30 | void GetDisplayService(Kernel::HLERequestContext& ctx); | 26 | void GetDisplayService(HLERequestContext& ctx); |
| 31 | 27 | ||
| 32 | NVFlinger::NVFlinger& nv_flinger; | 28 | NVFlinger::NVFlinger& nv_flinger; |
| 33 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server; | 29 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server; |
diff --git a/src/core/hle/service/vi/vi_s.cpp b/src/core/hle/service/vi/vi_s.cpp index fd799dac1..901c5988e 100644 --- a/src/core/hle/service/vi/vi_s.cpp +++ b/src/core/hle/service/vi/vi_s.cpp | |||
| @@ -20,7 +20,7 @@ VI_S::VI_S(Core::System& system_, NVFlinger::NVFlinger& nv_flinger_, | |||
| 20 | 20 | ||
| 21 | VI_S::~VI_S() = default; | 21 | VI_S::~VI_S() = default; |
| 22 | 22 | ||
| 23 | void VI_S::GetDisplayService(Kernel::HLERequestContext& ctx) { | 23 | void VI_S::GetDisplayService(HLERequestContext& ctx) { |
| 24 | LOG_DEBUG(Service_VI, "called"); | 24 | LOG_DEBUG(Service_VI, "called"); |
| 25 | 25 | ||
| 26 | detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, | 26 | detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, |
diff --git a/src/core/hle/service/vi/vi_s.h b/src/core/hle/service/vi/vi_s.h index 97503ac7f..34282fcfd 100644 --- a/src/core/hle/service/vi/vi_s.h +++ b/src/core/hle/service/vi/vi_s.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::NVFlinger { | 12 | namespace Service::NVFlinger { |
| 17 | class HosBinderDriverServer; | 13 | class HosBinderDriverServer; |
| 18 | class NVFlinger; | 14 | class NVFlinger; |
| @@ -27,7 +23,7 @@ public: | |||
| 27 | ~VI_S() override; | 23 | ~VI_S() override; |
| 28 | 24 | ||
| 29 | private: | 25 | private: |
| 30 | void GetDisplayService(Kernel::HLERequestContext& ctx); | 26 | void GetDisplayService(HLERequestContext& ctx); |
| 31 | 27 | ||
| 32 | NVFlinger::NVFlinger& nv_flinger; | 28 | NVFlinger::NVFlinger& nv_flinger; |
| 33 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server; | 29 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server; |
diff --git a/src/core/hle/service/vi/vi_u.cpp b/src/core/hle/service/vi/vi_u.cpp index 6cc54bd13..08c5cf486 100644 --- a/src/core/hle/service/vi/vi_u.cpp +++ b/src/core/hle/service/vi/vi_u.cpp | |||
| @@ -20,7 +20,7 @@ VI_U::VI_U(Core::System& system_, NVFlinger::NVFlinger& nv_flinger_, | |||
| 20 | 20 | ||
| 21 | VI_U::~VI_U() = default; | 21 | VI_U::~VI_U() = default; |
| 22 | 22 | ||
| 23 | void VI_U::GetDisplayService(Kernel::HLERequestContext& ctx) { | 23 | void VI_U::GetDisplayService(HLERequestContext& ctx) { |
| 24 | LOG_DEBUG(Service_VI, "called"); | 24 | LOG_DEBUG(Service_VI, "called"); |
| 25 | 25 | ||
| 26 | detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, | 26 | detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, |
diff --git a/src/core/hle/service/vi/vi_u.h b/src/core/hle/service/vi/vi_u.h index 797941bd7..8b0a8dd02 100644 --- a/src/core/hle/service/vi/vi_u.h +++ b/src/core/hle/service/vi/vi_u.h | |||
| @@ -9,10 +9,6 @@ namespace Core { | |||
| 9 | class System; | 9 | class System; |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | namespace Kernel { | ||
| 13 | class HLERequestContext; | ||
| 14 | } | ||
| 15 | |||
| 16 | namespace Service::NVFlinger { | 12 | namespace Service::NVFlinger { |
| 17 | class HosBinderDriverServer; | 13 | class HosBinderDriverServer; |
| 18 | class NVFlinger; | 14 | class NVFlinger; |
| @@ -27,7 +23,7 @@ public: | |||
| 27 | ~VI_U() override; | 23 | ~VI_U() override; |
| 28 | 24 | ||
| 29 | private: | 25 | private: |
| 30 | void GetDisplayService(Kernel::HLERequestContext& ctx); | 26 | void GetDisplayService(HLERequestContext& ctx); |
| 31 | 27 | ||
| 32 | NVFlinger::NVFlinger& nv_flinger; | 28 | NVFlinger::NVFlinger& nv_flinger; |
| 33 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server; | 29 | NVFlinger::HosBinderDriverServer& hos_binder_driver_server; |
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index 708ae17aa..004f2e57a 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp | |||
| @@ -17,10 +17,10 @@ | |||
| 17 | #include "common/settings.h" | 17 | #include "common/settings.h" |
| 18 | #include "core/arm/arm_interface.h" | 18 | #include "core/arm/arm_interface.h" |
| 19 | #include "core/core.h" | 19 | #include "core/core.h" |
| 20 | #include "core/hle/kernel/hle_ipc.h" | ||
| 21 | #include "core/hle/kernel/k_page_table.h" | 20 | #include "core/hle/kernel/k_page_table.h" |
| 22 | #include "core/hle/kernel/k_process.h" | 21 | #include "core/hle/kernel/k_process.h" |
| 23 | #include "core/hle/result.h" | 22 | #include "core/hle/result.h" |
| 23 | #include "core/hle/service/hle_ipc.h" | ||
| 24 | #include "core/memory.h" | 24 | #include "core/memory.h" |
| 25 | #include "core/reporter.h" | 25 | #include "core/reporter.h" |
| 26 | 26 | ||
| @@ -170,7 +170,7 @@ json GetHLEBufferDescriptorData(const std::vector<DescriptorType>& buffer, | |||
| 170 | return buffer_out; | 170 | return buffer_out; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | json GetHLERequestContextData(Kernel::HLERequestContext& ctx, Core::Memory::Memory& memory) { | 173 | json GetHLERequestContextData(Service::HLERequestContext& ctx, Core::Memory::Memory& memory) { |
| 174 | json out; | 174 | json out; |
| 175 | 175 | ||
| 176 | auto cmd_buf = json::array(); | 176 | auto cmd_buf = json::array(); |
| @@ -253,7 +253,7 @@ void Reporter::SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 | |||
| 253 | SaveToFile(out, GetPath("svc_break_report", title_id, timestamp)); | 253 | SaveToFile(out, GetPath("svc_break_report", title_id, timestamp)); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | void Reporter::SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id, | 256 | void Reporter::SaveUnimplementedFunctionReport(Service::HLERequestContext& ctx, u32 command_id, |
| 257 | const std::string& name, | 257 | const std::string& name, |
| 258 | const std::string& service_name) const { | 258 | const std::string& service_name) const { |
| 259 | if (!IsReportingEnabled()) { | 259 | if (!IsReportingEnabled()) { |
diff --git a/src/core/reporter.h b/src/core/reporter.h index bb11f8e7c..db1ca3ba0 100644 --- a/src/core/reporter.h +++ b/src/core/reporter.h | |||
| @@ -12,9 +12,9 @@ | |||
| 12 | 12 | ||
| 13 | union Result; | 13 | union Result; |
| 14 | 14 | ||
| 15 | namespace Kernel { | 15 | namespace Service { |
| 16 | class HLERequestContext; | 16 | class HLERequestContext; |
| 17 | } // namespace Kernel | 17 | } // namespace Service |
| 18 | 18 | ||
| 19 | namespace Service::LM { | 19 | namespace Service::LM { |
| 20 | struct LogMessage; | 20 | struct LogMessage; |
| @@ -40,7 +40,7 @@ public: | |||
| 40 | const std::optional<std::vector<u8>>& resolved_buffer = {}) const; | 40 | const std::optional<std::vector<u8>>& resolved_buffer = {}) const; |
| 41 | 41 | ||
| 42 | // Used by HLE service handler | 42 | // Used by HLE service handler |
| 43 | void SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id, | 43 | void SaveUnimplementedFunctionReport(Service::HLERequestContext& ctx, u32 command_id, |
| 44 | const std::string& name, | 44 | const std::string& name, |
| 45 | const std::string& service_name) const; | 45 | const std::string& service_name) const; |
| 46 | 46 | ||