diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 5c656f284d..14eb331d24 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project # SPDX-License-Identifier: GPL-3.0-or-later # SPDX-FileCopyrightText: 2018 yuzu Emulator Project @@ -928,6 +928,8 @@ add_library(core STATIC hle/service/olsc/olsc.h hle/service/olsc/remote_storage_controller.cpp hle/service/olsc/remote_storage_controller.h + hle/service/olsc/stopper_object.cpp + hle/service/olsc/stopper_object.h hle/service/olsc/transfer_task_list_controller.cpp hle/service/olsc/transfer_task_list_controller.h hle/service/omm/omm.cpp diff --git a/src/core/hle/kernel/svc/svc_event.cpp b/src/core/hle/kernel/svc/svc_event.cpp index 807e604d2f..586cb2b14e 100644 --- a/src/core/hle/kernel/svc/svc_event.cpp +++ b/src/core/hle/kernel/svc/svc_event.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -9,7 +9,6 @@ #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_scoped_resource_reservation.h" -#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc.h" namespace Kernel::Svc { @@ -20,6 +19,20 @@ Result SignalEvent(Core::System& system, Handle event_handle) { // Get the current handle table. const KHandleTable& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); + // Fail-safe for system applets + const auto program_id = GetCurrentProcess(system.Kernel()).GetProgramId(); + if ((program_id & 0xFFFFFFFFFFFFFF00ull) == 0x0100000000001000ull) { + KScopedAutoObject event = handle_table.GetObject(event_handle); + if (event.IsNotNull()) { + event->Signal(); + } else { + LOG_WARNING(Kernel_SVC, "SignalEvent best-effort unknown handle=0x{:08X} (ignored)", + event_handle); + } + R_SUCCEED(); + } + + // Get the event. KScopedAutoObject event = handle_table.GetObject(event_handle); R_UNLESS(event.IsNotNull(), ResultInvalidHandle); diff --git a/src/core/hle/service/am/service/home_menu_functions.cpp b/src/core/hle/service/am/service/home_menu_functions.cpp index a0b05f6f36..f9d402ca99 100644 --- a/src/core/hle/service/am/service/home_menu_functions.cpp +++ b/src/core/hle/service/am/service/home_menu_functions.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -27,7 +27,7 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_, std::shared_ptr, "GetPopFromGeneralChannelEvent"}, {30, nullptr, "GetHomeButtonWriterLockAccessor"}, {31, nullptr, "GetWriterLockAccessorEx"}, - {40, nullptr, "IsSleepEnabled"}, + {40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"}, {41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"}, {50, nullptr, "LaunchSystemApplet"}, {51, nullptr, "LaunchStarter"}, @@ -80,6 +80,12 @@ Result IHomeMenuFunctions::GetPopFromGeneralChannelEvent( R_SUCCEED(); } +Result IHomeMenuFunctions::IsSleepEnabled(Out out_is_sleep_enbaled) { + LOG_INFO(Service_AM, "called"); + *out_is_sleep_enbaled = false; + R_SUCCEED(); +} + Result IHomeMenuFunctions::IsRebootEnabled(Out out_is_reboot_enbaled) { LOG_INFO(Service_AM, "called"); *out_is_reboot_enbaled = true; diff --git a/src/core/hle/service/am/service/home_menu_functions.h b/src/core/hle/service/am/service/home_menu_functions.h index 140071a74e..2c3ef54375 100644 --- a/src/core/hle/service/am/service/home_menu_functions.h +++ b/src/core/hle/service/am/service/home_menu_functions.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -29,6 +29,7 @@ private: Result UnlockForeground(); Result PopFromGeneralChannel(Out> out_storage); Result GetPopFromGeneralChannelEvent(OutCopyHandle out_event); + Result IsSleepEnabled(Out out_is_sleep_enbaled); Result IsRebootEnabled(Out out_is_reboot_enbaled); Result IsForceTerminateApplicationDisabledForDebug( Out out_is_force_terminate_application_disabled_for_debug); diff --git a/src/core/hle/service/bcat/news/builtin_news.cpp b/src/core/hle/service/bcat/news/builtin_news.cpp index 27ab301fca..2c93da71e0 100644 --- a/src/core/hle/service/bcat/news/builtin_news.cpp +++ b/src/core/hle/service/bcat/news/builtin_news.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include "core/hle/service/bcat/news/builtin_news.h" @@ -108,8 +108,8 @@ std::vector DownloadImage(const std::string& url_path, const std::filesystem try { httplib::Client cli("https://eden-emu.dev"); cli.set_follow_location(true); - cli.set_connection_timeout(std::chrono::seconds(10)); - cli.set_read_timeout(std::chrono::seconds(30)); + cli.set_connection_timeout(std::chrono::seconds(2)); + cli.set_read_timeout(std::chrono::seconds(2)); #ifdef YUZU_BUNDLED_OPENSSL cli.load_ca_cert_store(kCert, sizeof(kCert)); diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp index 45d452cee1..b0f74bef06 100644 --- a/src/core/hle/service/npns/npns.cpp +++ b/src/core/hle/service/npns/npns.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project @@ -18,7 +18,8 @@ namespace Service::NPNS { class INpnsSystem final : public ServiceFramework { public: explicit INpnsSystem(Core::System& system_) - : ServiceFramework{system_, "npns:s"}, service_context{system, "npns:s"} { + : ServiceFramework{system_, "npns:s"}, service_context{system, "npns:s"}, + get_receive_event{service_context}, get_request_change_state_cancel_event{service_context} { // clang-format off static const FunctionInfo functions[] = { {1, nullptr, "ListenAll"}, @@ -91,16 +92,9 @@ public: // clang-format on RegisterHandlers(functions); - - get_receive_event = service_context.CreateEvent("npns:s:GetReceiveEvent"); - get_request_change_state_cancel_event = - service_context.CreateEvent("npns:s:GetRequestChangeStateCancelEvent"); } - ~INpnsSystem() override { - service_context.CloseEvent(get_receive_event); - service_context.CloseEvent(get_request_change_state_cancel_event); - } + ~INpnsSystem() override = default; private: Result ListenTo(u32 program_id) { @@ -111,7 +105,7 @@ private: Result GetReceiveEvent(OutCopyHandle out_event) { LOG_WARNING(Service_NPNS, "(STUBBED) called"); - *out_event = &get_receive_event->GetReadableEvent(); + *out_event = get_receive_event.GetHandle(); R_SUCCEED(); } @@ -141,20 +135,20 @@ private: // TODO (jarrodnorwell) - *out_event = &get_request_change_state_cancel_event->GetReadableEvent(); + *out_event = get_request_change_state_cancel_event.GetHandle(); R_SUCCEED(); } KernelHelpers::ServiceContext service_context; - Kernel::KEvent* get_receive_event; - Kernel::KEvent* get_request_change_state_cancel_event; + Event get_receive_event; + Event get_request_change_state_cancel_event; }; class INpnsUser final : public ServiceFramework { public: explicit INpnsUser(Core::System& system_) - : ServiceFramework{system_, "npns:u"}, service_context{system, "npns:u"} { + : ServiceFramework{system_, "npns:u"}, service_context{system, "npns:u"}, get_receive_event{service_context} { // clang-format off static const FunctionInfo functions[] = { {1, nullptr, "ListenAll"}, @@ -182,12 +176,6 @@ public: // clang-format on RegisterHandlers(functions); - - get_receive_event = service_context.CreateEvent("npns:u:GetReceiveEvent"); - } - - ~INpnsUser() override { - service_context.CloseEvent(get_receive_event); } private: @@ -203,12 +191,12 @@ private: Result GetReceiveEvent(OutCopyHandle out_event) { LOG_DEBUG(Service_NPNS, "called"); - *out_event = &get_receive_event->GetReadableEvent(); + *out_event = get_receive_event.GetHandle(); R_SUCCEED(); } KernelHelpers::ServiceContext service_context; - Kernel::KEvent* get_receive_event; + Event get_receive_event; }; void LoopProcess(Core::System& system) { diff --git a/src/core/hle/service/olsc/daemon_controller.cpp b/src/core/hle/service/olsc/daemon_controller.cpp index 7a75196a1f..c449c6ff31 100644 --- a/src/core/hle/service/olsc/daemon_controller.cpp +++ b/src/core/hle/service/olsc/daemon_controller.cpp @@ -21,7 +21,7 @@ IDaemonController::IDaemonController(Core::System& system_) {5, D<&IDaemonController::GetGlobalAutoDownloadSetting>, "GetGlobalAutoDownloadSetting"}, // 11.0.0+ {6, D<&IDaemonController::SetGlobalAutoDownloadSetting>, "SetGlobalAutoDownloadSetting"}, // 11.0.0+ {10, nullptr, "CreateForbiddenSaveDataInidication"}, - {11, nullptr, "StopAutonomyTaskExecution"}, + {11, D<&IDaemonController::StopAutonomyTaskExecution>, "StopAutonomyTaskExecution"}, {12, D<&IDaemonController::GetAutonomyTaskStatus>, "GetAutonomyTaskStatus"}, {13, nullptr, "Unknown13_20_0_0_Plus"}, // 20.0.0+ }; @@ -92,6 +92,13 @@ Result IDaemonController::SetGlobalAutoDownloadSetting(bool is_enabled, Common:: R_SUCCEED(); } +Result IDaemonController::StopAutonomyTaskExecution(Out> out_stopper) { + LOG_WARNING(Service_OLSC, "(STUBBED) called"); + + *out_stopper = std::make_shared(system); + R_SUCCEED(); +} + Result IDaemonController::GetAutonomyTaskStatus(Out out_status, Common::UUID user_id) { LOG_INFO(Service_OLSC, "called, user_id={}", user_id.FormattedString()); diff --git a/src/core/hle/service/olsc/daemon_controller.h b/src/core/hle/service/olsc/daemon_controller.h index 38a743461a..4a4b89317b 100644 --- a/src/core/hle/service/olsc/daemon_controller.h +++ b/src/core/hle/service/olsc/daemon_controller.h @@ -1,4 +1,3 @@ -#pragma once // SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later @@ -9,6 +8,7 @@ #include "common/uuid.h" #include "core/hle/service/cmif_types.h" +#include "core/hle/service/olsc/stopper_object.h" #include "core/hle/service/service.h" namespace Service::OLSC { @@ -32,6 +32,8 @@ private: Result GetGlobalAutoDownloadSetting(Out out_is_enabled, Common::UUID user_id); Result SetGlobalAutoDownloadSetting(bool is_enabled, Common::UUID user_id); + Result StopAutonomyTaskExecution(Out> out_stopper); + Result GetAutonomyTaskStatus(Out out_status, Common::UUID user_id); // Internal in-memory state to back the above APIs diff --git a/src/core/hle/service/olsc/native_handle_holder.cpp b/src/core/hle/service/olsc/native_handle_holder.cpp index 3cb5d7b114..d381714bc3 100644 --- a/src/core/hle/service/olsc/native_handle_holder.cpp +++ b/src/core/hle/service/olsc/native_handle_holder.cpp @@ -1,13 +1,20 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/cmif_serialization.h" #include "core/hle/service/olsc/native_handle_holder.h" +#include "core/hle/kernel/k_event.h" +#include "core/hle/kernel/k_readable_event.h" + namespace Service::OLSC { INativeHandleHolder::INativeHandleHolder(Core::System& system_) - : ServiceFramework{system_, "INativeHandleHolder"} { + : ServiceFramework{system_, "INativeHandleHolder"}, service_context{system_, "OLSC"} { + event = service_context.CreateEvent("OLSC::INativeHandleHolder"); // clang-format off static const FunctionInfo functions[] = { {0, D<&INativeHandleHolder::GetNativeHandle>, "GetNativeHandle"}, @@ -17,11 +24,19 @@ INativeHandleHolder::INativeHandleHolder(Core::System& system_) RegisterHandlers(functions); } -INativeHandleHolder::~INativeHandleHolder() = default; +INativeHandleHolder::~INativeHandleHolder() { + service_context.CloseEvent(event); + event = nullptr; +} Result INativeHandleHolder::GetNativeHandle(OutCopyHandle out_event) { LOG_WARNING(Service_OLSC, "(STUBBED) called"); - *out_event = nullptr; + if (event) { + event->Signal(); + *out_event = std::addressof(event->GetReadableEvent()); + } else { + *out_event = nullptr; + } R_SUCCEED(); } diff --git a/src/core/hle/service/olsc/native_handle_holder.h b/src/core/hle/service/olsc/native_handle_holder.h index a44754c201..985c60d1cb 100644 --- a/src/core/hle/service/olsc/native_handle_holder.h +++ b/src/core/hle/service/olsc/native_handle_holder.h @@ -1,11 +1,17 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/cmif_types.h" #include "core/hle/service/service.h" +#include "core/hle/service/kernel_helpers.h" + namespace Kernel { class KReadableEvent; +class KEvent; } namespace Service::OLSC { @@ -17,6 +23,9 @@ public: private: Result GetNativeHandle(OutCopyHandle out_event); + + Service::KernelHelpers::ServiceContext service_context; + Kernel::KEvent* event{}; }; } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.cpp b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp index 98b4a52118..245bbd5c6b 100644 --- a/src/core/hle/service/olsc/olsc_service_for_system_service.cpp +++ b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -28,7 +28,7 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_ {102, nullptr, "RemoveLastErrorInfoOld"}, {103, nullptr, "GetLastErrorInfo"}, {104, nullptr, "GetLastErrorEventHolder"}, - {105, nullptr, "GetLastTransferTaskErrorInfo"}, + {105, D<&IOlscServiceForSystemService::GetTransferTaskErrorInfo>, "GetTransferTaskErrorInfo"}, {200, D<&IOlscServiceForSystemService::GetDataTransferPolicy>, "GetDataTransferPolicy"}, {201, nullptr, "DeleteDataTransferPolicyCache"}, {202, nullptr, "Unknown202"}, @@ -116,6 +116,24 @@ Result IOlscServiceForSystemService::GetDataTransferPolicy( R_SUCCEED(); } +Result IOlscServiceForSystemService::GetTransferTaskErrorInfo(Out out_info, + Common::UUID uuid, u64 application_id) { + LOG_WARNING(Service_OLSC, "(STUBBED) called, uuid={} application_id={:016X}", + uuid.FormattedString(), application_id); + + TransferTaskErrorInfo info{}; + info.uid = uuid; + info.application_id = application_id; + info.unknown_0x18 = 0; + info.reserved_0x19.fill(0); + info.unknown_0x20 = 0; + info.error_code = 0; + info.reserved_0x2C = 0; + + *out_info = info; + R_SUCCEED(); +} + Result IOlscServiceForSystemService::GetOlscServiceForSystemService( Out> out_interface) { LOG_INFO(Service_OLSC, "called"); diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.h b/src/core/hle/service/olsc/olsc_service_for_system_service.h index 97f791b74a..447e37005e 100644 --- a/src/core/hle/service/olsc/olsc_service_for_system_service.h +++ b/src/core/hle/service/olsc/olsc_service_for_system_service.h @@ -1,9 +1,12 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include + +#include "common/uuid.h" #include "core/hle/service/cmif_types.h" #include "core/hle/service/service.h" @@ -18,6 +21,17 @@ struct DataTransferPolicy { u8 download_policy; }; +struct TransferTaskErrorInfo { + Common::UUID uid; + u64 application_id; + u8 unknown_0x18; + std::array reserved_0x19; + u64 unknown_0x20; + u32 error_code; + u32 reserved_0x2C; +}; +static_assert(sizeof(TransferTaskErrorInfo) == 0x30, "TransferTaskErrorInfo has incorrect size."); + class IOlscServiceForSystemService final : public ServiceFramework { public: explicit IOlscServiceForSystemService(Core::System& system_); @@ -29,7 +43,9 @@ private: Result GetRemoteStorageController(Out> out_interface); Result GetDaemonController(Out> out_interface); Result GetDataTransferPolicy(Out out_policy, u64 application_id); - Result GetOlscServiceForSystemService(Out> out_interface); + Result GetTransferTaskErrorInfo(Out out_info, Common::UUID uid, u64 application_id); + Result GetOlscServiceForSystemService( + Out> out_interface); }; } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/remote_storage_controller.cpp b/src/core/hle/service/olsc/remote_storage_controller.cpp index 7e04b7c042..46536f9ff1 100644 --- a/src/core/hle/service/olsc/remote_storage_controller.cpp +++ b/src/core/hle/service/olsc/remote_storage_controller.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -24,7 +24,7 @@ IRemoteStorageController::IRemoteStorageController(Core::System& system_) {11, nullptr, "CreateDeleteDataTask"}, {12, nullptr, "DeleteSeriesInfo"}, {13, nullptr, "CreateRegisterNotificationTokenTask"}, - {14, nullptr, "UpdateSeriesInfo"}, + {14, D<&IRemoteStorageController::GetDataNewnessByApplicationId>, "GetDataNewnessByApplicationId"}, {15, nullptr, "RegisterUploadSaveDataTransferTaskForAutonomyRegistration"}, {16, nullptr, "CreateCleanupToDeleteSaveDataArchiveInfoTask"}, {17, nullptr, "ListDataInfo"}, @@ -37,7 +37,7 @@ IRemoteStorageController::IRemoteStorageController(Core::System& system_) {24, nullptr, "GetSecondarySaveDataInfo"}, {25, nullptr, "RegisterDownloadSaveDataTransferTaskForAutonomyRegistration"}, {26, nullptr, "Unknown26"}, //20.0.0+ - {27, nullptr, "Unknown27"}, //20.0.0+ + {27, D<&IRemoteStorageController::Unknown27>, "Unknown27"}, //20.0.0+ {28, nullptr, "Unknown28"}, //20.0.0+ {29, nullptr, "Unknown29"}, //21.0.0+ {800, nullptr, "Unknown800"}, //20.0.0+ @@ -60,4 +60,17 @@ Result IRemoteStorageController::GetSecondarySave(Out out_has_secondary_sa R_SUCCEED(); } +Result IRemoteStorageController::GetDataNewnessByApplicationId(Out out_newness, + u64 application_id) { + LOG_WARNING(Service_OLSC, "(STUBBED) called, application_id={:016X}", application_id); + *out_newness = 0; + R_SUCCEED(); +} + +Result IRemoteStorageController::Unknown27(Out> out_data, u64 application_id) { + LOG_WARNING(Service_OLSC, "(STUBBED) called, application_id={:016X}", application_id); + out_data->fill(0); + R_SUCCEED(); +} + } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/remote_storage_controller.h b/src/core/hle/service/olsc/remote_storage_controller.h index e7a0b52442..85f681dfae 100644 --- a/src/core/hle/service/olsc/remote_storage_controller.h +++ b/src/core/hle/service/olsc/remote_storage_controller.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -14,6 +17,8 @@ public: private: Result GetSecondarySave(Out out_has_secondary_save, Out> out_unknown, u64 application_id); + Result GetDataNewnessByApplicationId(Out out_newness, u64 application_id); + Result Unknown27(Out> out_data, u64 application_id); }; } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/stopper_object.cpp b/src/core/hle/service/olsc/stopper_object.cpp new file mode 100644 index 0000000000..b4baf1236b --- /dev/null +++ b/src/core/hle/service/olsc/stopper_object.cpp @@ -0,0 +1,15 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "core/hle/service/cmif_serialization.h" +#include "core/hle/service/olsc/stopper_object.h" + +namespace Service::OLSC { + +IStopperObject::IStopperObject(Core::System& system_) : ServiceFramework{system_, "IStopperObject"} { + // TODO(Maufeat): If ever needed, add cmds +} + +IStopperObject::~IStopperObject() = default; + +} // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/stopper_object.h b/src/core/hle/service/olsc/stopper_object.h new file mode 100644 index 0000000000..3a23f6bdda --- /dev/null +++ b/src/core/hle/service/olsc/stopper_object.h @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/service.h" + +namespace Service::OLSC { + +class IStopperObject final : public ServiceFramework { +public: + explicit IStopperObject(Core::System& system_); + ~IStopperObject() override; +}; + +} // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.cpp b/src/core/hle/service/olsc/transfer_task_list_controller.cpp index 093bf36c0e..0f9042bf01 100644 --- a/src/core/hle/service/olsc/transfer_task_list_controller.cpp +++ b/src/core/hle/service/olsc/transfer_task_list_controller.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -6,6 +6,7 @@ #include "core/hle/service/cmif_serialization.h" #include "core/hle/service/olsc/native_handle_holder.h" +#include "core/hle/service/olsc/stopper_object.h" #include "core/hle/service/olsc/transfer_task_list_controller.h" namespace Service::OLSC { @@ -22,7 +23,7 @@ ITransferTaskListController::ITransferTaskListController(Core::System& system_) {5, D<&ITransferTaskListController::GetTransferTaskEndEventNativeHandleHolder>, "GetTransferTaskEndEventNativeHandleHolder"}, {6, nullptr, "GetTransferTaskProgressForOcean"}, {7, nullptr, "GetTransferTaskLastResultForOcean"}, - {8, nullptr, "StopNextTransferTaskExecution"}, + {8, D<&ITransferTaskListController::StopNextTransferTaskExecution>, "StopNextTransferTaskExecution"}, {9, D<&ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder>, "GetTransferTaskStartEventNativeHandleHolder"}, {10, nullptr, "SuspendTransferTaskForOcean"}, {11, nullptr, "GetCurrentTransferTaskInfoForOcean"}, @@ -30,7 +31,7 @@ ITransferTaskListController::ITransferTaskListController(Core::System& system_) {13, nullptr, "CancelCurrentRepairTransferTask"}, {14, nullptr, "GetRepairTransferTaskProgress"}, {15, nullptr, "EnsureExecutableForRepairTransferTask"}, - {16, nullptr, "GetTransferTaskCount"}, + {16, D<&ITransferTaskListController::GetTransferTaskCount>, "GetTransferTaskCount"}, {17, nullptr, "GetTransferTaskInfo"}, {18, nullptr, "ListTransferTaskInfo"}, {19, nullptr, "DeleteTransferTask"}, @@ -38,8 +39,8 @@ ITransferTaskListController::ITransferTaskListController(Core::System& system_) {21, nullptr, "GetTransferTaskProgress"}, {22, nullptr, "GetTransferTaskLastResult"}, {23, nullptr, "SuspendTransferTask"}, - {24, nullptr, "GetCurrentTransferTaskInfo"}, - {25, nullptr, "Unknown25"}, //20.1.0+ + {24, D<&ITransferTaskListController::GetCurrentTransferTaskInfo>, "GetCurrentTransferTaskInfo"}, + {25, D<&ITransferTaskListController::FindTransferTaskInfo>, "FindTransferTaskInfo"}, {26, nullptr, "Unknown26"}, //20.1.0+ {27, nullptr, "Unknown27"}, //20.1.0+ {28, nullptr, "Unknown28"}, //20.1.0+ @@ -60,6 +61,13 @@ Result ITransferTaskListController::GetTransferTaskEndEventNativeHandleHolder( R_SUCCEED(); } +Result ITransferTaskListController::StopNextTransferTaskExecution( + Out> out_stopper) { + LOG_WARNING(Service_OLSC, "(STUBBED) called"); + *out_stopper = std::make_shared(system); + R_SUCCEED(); +} + Result ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder( Out> out_holder) { LOG_WARNING(Service_OLSC, "(STUBBED) called"); @@ -67,4 +75,24 @@ Result ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder( R_SUCCEED(); } +Result ITransferTaskListController::GetCurrentTransferTaskInfo(Out> out_info, + u8 unknown) { + LOG_WARNING(Service_OLSC, "(STUBBED) called, unknown={:#x}", unknown); + out_info->fill(0); + R_SUCCEED(); +} + +Result ITransferTaskListController::FindTransferTaskInfo(Out> out_info, + InBuffer in) { + LOG_WARNING(Service_OLSC, "(STUBBED) called, in_size={}", in.size()); + out_info->fill(0); + R_SUCCEED(); +} + +Result ITransferTaskListController::GetTransferTaskCount(Out out_count, u8 unknown) { + LOG_WARNING(Service_OLSC, "(STUBBED) called, unknown={:#x}", unknown); + *out_count = 0; + R_SUCCEED(); +} + } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.h b/src/core/hle/service/olsc/transfer_task_list_controller.h index e6864e5d6f..72dbf610d8 100644 --- a/src/core/hle/service/olsc/transfer_task_list_controller.h +++ b/src/core/hle/service/olsc/transfer_task_list_controller.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -10,6 +10,7 @@ namespace Service::OLSC { class INativeHandleHolder; +class IStopperObject; class ITransferTaskListController final : public ServiceFramework { public: @@ -19,6 +20,10 @@ public: private: Result GetTransferTaskEndEventNativeHandleHolder(Out> out_holder); Result GetTransferTaskStartEventNativeHandleHolder(Out> out_holder); + Result StopNextTransferTaskExecution(Out> out_stopper); + Result GetTransferTaskCount(Out out_count, u8 unknown); + Result GetCurrentTransferTaskInfo(Out> out_info, u8 unknown); + Result FindTransferTaskInfo(Out> out_info, InBuffer in); }; } // namespace Service::OLSC diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index c7357e0566..2f968f2b01 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -172,7 +172,6 @@ - @@ -508,14 +507,6 @@ &Home Menu - - - &Setup - - - QAction::MenuRole::TextHeuristicRole - - &Desktop diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index d44cc6f731..62e410e3c5 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -1630,9 +1630,6 @@ void MainWindow::ConnectMenuEvents() { connect_menu(ui->action_Launch_QLaunch, [this]{ LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::QLaunch), std::nullopt); }); - connect_menu(ui->action_Launch_Setup, [this]{ - LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::Starter), std::nullopt); - }); // Tools (cabinet) connect_menu(ui->action_Launch_Cabinet_Nickname_Owner, [this]{ LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::Cabinet), {Service::NFP::CabinetMode::StartNicknameAndOwnerSettings});