diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/memory/address_space_info.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/memory/address_space_info.h | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/memory/memory_block.h | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/memory/page_heap.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/memory/page_heap.h | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/memory/slab_heap.h | 4 | ||||
-rw-r--r-- | src/core/hle/service/acc/acc.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/service/am/am.cpp | 16 | ||||
-rw-r--r-- | src/core/hle/service/am/am.h | 6 | ||||
-rw-r--r-- | src/core/hle/service/am/applet_ae.cpp | 2 |
10 files changed, 40 insertions, 21 deletions
diff --git a/src/core/hle/kernel/memory/address_space_info.cpp b/src/core/hle/kernel/memory/address_space_info.cpp index ca226e885..a523a2502 100644 --- a/src/core/hle/kernel/memory/address_space_info.cpp +++ b/src/core/hle/kernel/memory/address_space_info.cpp @@ -2,8 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphère, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphère-NX. +// This file references various implementation details from Atmosphere, an open-source firmware for +// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. #include <array> diff --git a/src/core/hle/kernel/memory/address_space_info.h b/src/core/hle/kernel/memory/address_space_info.h index 6c5e1aab4..c479890be 100644 --- a/src/core/hle/kernel/memory/address_space_info.h +++ b/src/core/hle/kernel/memory/address_space_info.h @@ -2,8 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphère, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphère-NX. +// This file references various implementation details from Atmosphere, an open-source firmware for +// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. #pragma once diff --git a/src/core/hle/kernel/memory/memory_block.h b/src/core/hle/kernel/memory/memory_block.h index 9db1f7b39..9d7839d08 100644 --- a/src/core/hle/kernel/memory/memory_block.h +++ b/src/core/hle/kernel/memory/memory_block.h @@ -2,8 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphère, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphère-NX. +// This file references various implementation details from Atmosphere, an open-source firmware for +// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. #pragma once diff --git a/src/core/hle/kernel/memory/page_heap.cpp b/src/core/hle/kernel/memory/page_heap.cpp index efcbb3cad..0ab1f7205 100644 --- a/src/core/hle/kernel/memory/page_heap.cpp +++ b/src/core/hle/kernel/memory/page_heap.cpp @@ -2,8 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphère, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphère-NX. +// This file references various implementation details from Atmosphere, an open-source firmware for +// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. #include "core/core.h" #include "core/hle/kernel/memory/page_heap.h" diff --git a/src/core/hle/kernel/memory/page_heap.h b/src/core/hle/kernel/memory/page_heap.h index 380c3f5a1..22b0de860 100644 --- a/src/core/hle/kernel/memory/page_heap.h +++ b/src/core/hle/kernel/memory/page_heap.h @@ -2,8 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphère, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphère-NX. +// This file references various implementation details from Atmosphere, an open-source firmware for +// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. #pragma once diff --git a/src/core/hle/kernel/memory/slab_heap.h b/src/core/hle/kernel/memory/slab_heap.h index a0244025f..465eaddb3 100644 --- a/src/core/hle/kernel/memory/slab_heap.h +++ b/src/core/hle/kernel/memory/slab_heap.h @@ -2,8 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphère, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphère-NX. +// This file references various implementation details from Atmosphere, an open-source firmware for +// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. #pragma once diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 9a7992f58..630a8b048 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -228,7 +228,8 @@ public: class IManagerForApplication final : public ServiceFramework<IManagerForApplication> { public: - IManagerForApplication() : ServiceFramework("IManagerForApplication") { + explicit IManagerForApplication(Common::UUID user_id) + : ServiceFramework("IManagerForApplication"), user_id(user_id) { // clang-format off static const FunctionInfo functions[] = { {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, @@ -254,12 +255,14 @@ private: } void GetAccountId(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - // Should return a nintendo account ID + LOG_DEBUG(Service_ACC, "called"); + IPC::ResponseBuilder rb{ctx, 4}; rb.Push(RESULT_SUCCESS); - rb.PushRaw<u64>(1); + rb.PushRaw<u64>(user_id.GetNintendoID()); } + + Common::UUID user_id; }; void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) { @@ -382,7 +385,7 @@ void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestCo LOG_DEBUG(Service_ACC, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface<IManagerForApplication>(); + rb.PushIpcInterface<IManagerForApplication>(profile_manager->GetLastOpenedUser()); } void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx) { diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index a967e6ef7..4df74c4f9 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1525,14 +1525,15 @@ void InstallInterfaces(SM::ServiceManager& service_manager, std::make_shared<TCAP>()->InstallAsService(service_manager); } -IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions") { +IHomeMenuFunctions::IHomeMenuFunctions(Kernel::KernelCore& kernel) + : ServiceFramework("IHomeMenuFunctions"), kernel(kernel) { // clang-format off static const FunctionInfo functions[] = { {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"}, {11, nullptr, "LockForeground"}, {12, nullptr, "UnlockForeground"}, {20, nullptr, "PopFromGeneralChannel"}, - {21, nullptr, "GetPopFromGeneralChannelEvent"}, + {21, &IHomeMenuFunctions::GetPopFromGeneralChannelEvent, "GetPopFromGeneralChannelEvent"}, {30, nullptr, "GetHomeButtonWriterLockAccessor"}, {31, nullptr, "GetWriterLockAccessorEx"}, {100, nullptr, "PopRequestLaunchApplicationForDebug"}, @@ -1542,6 +1543,9 @@ IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions" // clang-format on RegisterHandlers(functions); + + pop_from_general_channel_event = Kernel::WritableEvent::CreateEventPair( + kernel, "IHomeMenuFunctions:PopFromGeneralChannelEvent"); } IHomeMenuFunctions::~IHomeMenuFunctions() = default; @@ -1553,6 +1557,14 @@ void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) rb.Push(RESULT_SUCCESS); } +void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushCopyObjects(pop_from_general_channel_event.readable); +} + IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { // clang-format off static const FunctionInfo functions[] = { diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index dfa701d73..469f7f814 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -292,11 +292,15 @@ private: class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> { public: - IHomeMenuFunctions(); + explicit IHomeMenuFunctions(Kernel::KernelCore& kernel); ~IHomeMenuFunctions() override; private: void RequestToGetForeground(Kernel::HLERequestContext& ctx); + void GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx); + + Kernel::EventPair pop_from_general_channel_event; + Kernel::KernelCore& kernel; }; class IGlobalStateController final : public ServiceFramework<IGlobalStateController> { diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index e454b77d8..9df286d17 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp @@ -202,7 +202,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface<IHomeMenuFunctions>(); + rb.PushIpcInterface<IHomeMenuFunctions>(system.Kernel()); } void GetGlobalStateController(Kernel::HLERequestContext& ctx) { |