diff --git a/stratosphere/boot/source/boot_main.cpp b/stratosphere/boot/source/boot_main.cpp index 25c2b9f8b..86f81bae6 100644 --- a/stratosphere/boot/source/boot_main.cpp +++ b/stratosphere/boot/source/boot_main.cpp @@ -66,83 +66,83 @@ void __appExit(void) { } static const std::tuple g_gpio_map[] = { - std::make_tuple(0xFFFFFFFF, false, false), /* Invalid */ - std::make_tuple(0x000000CC, true, false), /* Port Z, Pin 4 */ - std::make_tuple(0x00000024, true, false), /* Port E, Pin 4 */ - std::make_tuple(0x0000003C, true, false), /* Port H, Pin 4 */ - std::make_tuple(0x000000DA, false, true), /* Port BB, Pin 2 */ - std::make_tuple(0x000000DB, true, false), /* Port BB, Pin 3 */ - std::make_tuple(0x000000DC, false, false), /* Port BB, Pin 4 */ - std::make_tuple(0x00000025, true, false), /* Port E, Pin 5 */ - std::make_tuple(0x00000090, false, false), /* Port S, Pin 0 */ - std::make_tuple(0x00000091, false, false), /* Port S, Pin 1 */ - std::make_tuple(0x00000096, true, false), /* Port S, Pin 6 */ - std::make_tuple(0x00000097, false, true), /* Port S, Pin 7 */ - std::make_tuple(0x00000026, false, false), /* Port E, Pin 6 */ - std::make_tuple(0x00000005, true, false), /* Port A, Pin 5 */ - std::make_tuple(0x00000078, false, false), /* Port P, Pin 0 */ - std::make_tuple(0x00000093, false, true), /* Port S, Pin 3 */ - std::make_tuple(0x0000007D, false, false), /* Port P, Pin 5 */ - std::make_tuple(0x0000007C, false, false), /* Port P, Pin 4 */ - std::make_tuple(0x0000007B, false, false), /* Port P, Pin 3 */ - std::make_tuple(0x0000007A, false, false), /* Port P, Pin 2 */ - std::make_tuple(0x000000BC, false, true), /* Port X, Pin 4 */ - std::make_tuple(0x000000AE, false, false), /* Port V, Pin 6 */ - std::make_tuple(0x000000BA, false, false), /* Port X, Pin 2 */ - std::make_tuple(0x000000B9, false, true), /* Port X, Pin 1 */ - std::make_tuple(0x000000BD, false, false), /* Port X, Pin 5 */ - std::make_tuple(0x000000BE, false, true), /* Port X, Pin 6 */ - std::make_tuple(0x000000BF, false, true), /* Port X, Pin 7 */ - std::make_tuple(0x000000C0, false, true), /* Port Y, Pin 0 */ - std::make_tuple(0x000000C1, false, false), /* Port Y, Pin 1 */ - std::make_tuple(0x000000A9, true, false), /* Port V, Pin 1 */ - std::make_tuple(0x000000AA, true, false), /* Port V, Pin 2 */ - std::make_tuple(0x00000055, true, false), /* Port K, Pin 5 */ - std::make_tuple(0x000000AD, true, false), /* Port V, Pin 5 */ - std::make_tuple(0x000000C8, false, true), /* Port Z, Pin 0 */ - std::make_tuple(0x000000CA, false, false), /* Port Z, Pin 2 */ - std::make_tuple(0x000000CB, false, true), /* Port Z, Pin 3 */ - std::make_tuple(0x0000004F, true, false), /* Port J, Pin 7 */ - std::make_tuple(0x00000050, false, false), /* Port K, Pin 0 */ - std::make_tuple(0x00000051, false, false), /* Port K, Pin 1 */ - std::make_tuple(0x00000052, false, false), /* Port K, Pin 2 */ - std::make_tuple(0x00000054, false, true), /* Port K, Pin 4 */ - std::make_tuple(0x00000056, false, true), /* Port K, Pin 6 */ - std::make_tuple(0x00000057, false, true), /* Port K, Pin 7 */ - std::make_tuple(0x00000053, true, false), /* Port K, Pin 3 */ - std::make_tuple(0x000000E3, true, false), /* Port CC, Pin 3 */ - std::make_tuple(0x00000038, true, false), /* Port H, Pin 0 */ - std::make_tuple(0x00000039, true, false), /* Port H, Pin 1 */ - std::make_tuple(0x0000003B, true, false), /* Port H, Pin 3 */ - std::make_tuple(0x0000003D, false, false), /* Port H, Pin 5 */ - std::make_tuple(0x0000003F, true, false), /* Port H, Pin 7 */ - std::make_tuple(0x00000040, true, false), /* Port I, Pin 0 */ - std::make_tuple(0x00000041, true, false), /* Port I, Pin 1 */ - std::make_tuple(0x0000003E, false, false), /* Port H, Pin 6 */ - std::make_tuple(0x000000E2, false, true), /* Port CC, Pin 2 */ - std::make_tuple(0x000000E4, true, false), /* Port CC, Pin 4 */ - std::make_tuple(0x0000003A, false, false), /* Port H, Pin 2 */ - std::make_tuple(0x000000C9, false, true), /* Port Z, Pin 1 */ - std::make_tuple(0x0000004D, true, false), /* Port J, Pin 5 */ - std::make_tuple(0x00000058, true, false), /* Port L, Pin 0 */ - std::make_tuple(0x0000003E, false, false), /* Port H, Pin 6 */ - std::make_tuple(0x00000026, false, false), /* Port E, Pin 6 */ - std::make_tuple(0xFFFFFFFF, false, false), /* Invalid */ - std::make_tuple(0x00000033, false, false), /* Port G, Pin 3 */ - std::make_tuple(0x0000001C, false, false), /* Port D, Pin 4 */ - std::make_tuple(0x000000D9, false, false), /* Port BB, Pin 1 */ - std::make_tuple(0x0000000C, false, false), /* Port B, Pin 4 */ - std::make_tuple(0x0000000D, false, false), /* Port B, Pin 5 */ - std::make_tuple(0x00000021, false, false), /* Port E, Pin 1 */ - std::make_tuple(0x00000027, false, false), /* Port E, Pin 7 */ - std::make_tuple(0x00000092, false, false), /* Port S, Pin 2 */ - std::make_tuple(0x00000095, false, false), /* Port S, Pin 5 */ - std::make_tuple(0x00000098, false, false), /* Port T, Pin 0 */ - std::make_tuple(0x00000010, false, false), /* Port C, Pin 0 */ - std::make_tuple(0x00000011, false, false), /* Port C, Pin 1 */ - std::make_tuple(0x00000012, false, false), /* Port C, Pin 2 */ - std::make_tuple(0x00000042, false, false), /* Port I, Pin 2 */ - std::make_tuple(0x000000E6, false, false), /* Port CC, Pin 6 */ + {0xFFFFFFFF, false, false}, /* Invalid */ + {0x000000CC, true, false}, /* Port Z, Pin 4 */ + {0x00000024, true, false}, /* Port E, Pin 4 */ + {0x0000003C, true, false}, /* Port H, Pin 4 */ + {0x000000DA, false, true}, /* Port BB, Pin 2 */ + {0x000000DB, true, false}, /* Port BB, Pin 3 */ + {0x000000DC, false, false}, /* Port BB, Pin 4 */ + {0x00000025, true, false}, /* Port E, Pin 5 */ + {0x00000090, false, false}, /* Port S, Pin 0 */ + {0x00000091, false, false}, /* Port S, Pin 1 */ + {0x00000096, true, false}, /* Port S, Pin 6 */ + {0x00000097, false, true}, /* Port S, Pin 7 */ + {0x00000026, false, false}, /* Port E, Pin 6 */ + {0x00000005, true, false}, /* Port A, Pin 5 */ + {0x00000078, false, false}, /* Port P, Pin 0 */ + {0x00000093, false, true}, /* Port S, Pin 3 */ + {0x0000007D, false, false}, /* Port P, Pin 5 */ + {0x0000007C, false, false}, /* Port P, Pin 4 */ + {0x0000007B, false, false}, /* Port P, Pin 3 */ + {0x0000007A, false, false}, /* Port P, Pin 2 */ + {0x000000BC, false, true}, /* Port X, Pin 4 */ + {0x000000AE, false, false}, /* Port V, Pin 6 */ + {0x000000BA, false, false}, /* Port X, Pin 2 */ + {0x000000B9, false, true}, /* Port X, Pin 1 */ + {0x000000BD, false, false}, /* Port X, Pin 5 */ + {0x000000BE, false, true}, /* Port X, Pin 6 */ + {0x000000BF, false, true}, /* Port X, Pin 7 */ + {0x000000C0, false, true}, /* Port Y, Pin 0 */ + {0x000000C1, false, false}, /* Port Y, Pin 1 */ + {0x000000A9, true, false}, /* Port V, Pin 1 */ + {0x000000AA, true, false}, /* Port V, Pin 2 */ + {0x00000055, true, false}, /* Port K, Pin 5 */ + {0x000000AD, true, false}, /* Port V, Pin 5 */ + {0x000000C8, false, true}, /* Port Z, Pin 0 */ + {0x000000CA, false, false}, /* Port Z, Pin 2 */ + {0x000000CB, false, true}, /* Port Z, Pin 3 */ + {0x0000004F, true, false}, /* Port J, Pin 7 */ + {0x00000050, false, false}, /* Port K, Pin 0 */ + {0x00000051, false, false}, /* Port K, Pin 1 */ + {0x00000052, false, false}, /* Port K, Pin 2 */ + {0x00000054, false, true}, /* Port K, Pin 4 */ + {0x00000056, false, true}, /* Port K, Pin 6 */ + {0x00000057, false, true}, /* Port K, Pin 7 */ + {0x00000053, true, false}, /* Port K, Pin 3 */ + {0x000000E3, true, false}, /* Port CC, Pin 3 */ + {0x00000038, true, false}, /* Port H, Pin 0 */ + {0x00000039, true, false}, /* Port H, Pin 1 */ + {0x0000003B, true, false}, /* Port H, Pin 3 */ + {0x0000003D, false, false}, /* Port H, Pin 5 */ + {0x0000003F, true, false}, /* Port H, Pin 7 */ + {0x00000040, true, false}, /* Port I, Pin 0 */ + {0x00000041, true, false}, /* Port I, Pin 1 */ + {0x0000003E, false, false}, /* Port H, Pin 6 */ + {0x000000E2, false, true}, /* Port CC, Pin 2 */ + {0x000000E4, true, false}, /* Port CC, Pin 4 */ + {0x0000003A, false, false}, /* Port H, Pin 2 */ + {0x000000C9, false, true}, /* Port Z, Pin 1 */ + {0x0000004D, true, false}, /* Port J, Pin 5 */ + {0x00000058, true, false}, /* Port L, Pin 0 */ + {0x0000003E, false, false}, /* Port H, Pin 6 */ + {0x00000026, false, false}, /* Port E, Pin 6 */ + {0xFFFFFFFF, false, false}, /* Invalid */ + {0x00000033, false, false}, /* Port G, Pin 3 */ + {0x0000001C, false, false}, /* Port D, Pin 4 */ + {0x000000D9, false, false}, /* Port BB, Pin 1 */ + {0x0000000C, false, false}, /* Port B, Pin 4 */ + {0x0000000D, false, false}, /* Port B, Pin 5 */ + {0x00000021, false, false}, /* Port E, Pin 1 */ + {0x00000027, false, false}, /* Port E, Pin 7 */ + {0x00000092, false, false}, /* Port S, Pin 2 */ + {0x00000095, false, false}, /* Port S, Pin 5 */ + {0x00000098, false, false}, /* Port T, Pin 0 */ + {0x00000010, false, false}, /* Port C, Pin 0 */ + {0x00000011, false, false}, /* Port C, Pin 1 */ + {0x00000012, false, false}, /* Port C, Pin 2 */ + {0x00000042, false, false}, /* Port I, Pin 2 */ + {0x000000E6, false, false}, /* Port CC, Pin 6 */ }; int gpio_configure(unsigned int gpio_pad_name) { diff --git a/stratosphere/libstratosphere/include/stratosphere/ipc_templating.hpp b/stratosphere/libstratosphere/include/stratosphere/ipc_templating.hpp index 98c0490b1..5d4f8ec5a 100644 --- a/stratosphere/libstratosphere/include/stratosphere/ipc_templating.hpp +++ b/stratosphere/libstratosphere/include/stratosphere/ipc_templating.hpp @@ -451,4 +451,4 @@ Result WrapStaticIpcCommandImpl(IpcParsedCommand& r, IpcCommand &out_command, u8 auto result = std::apply(IpcCommandImpl, args); return std::apply(Encoder{out_command}, result); -} \ No newline at end of file +} diff --git a/stratosphere/libstratosphere/include/stratosphere/servicesession.hpp b/stratosphere/libstratosphere/include/stratosphere/servicesession.hpp index e730849d6..09ed83a99 100644 --- a/stratosphere/libstratosphere/include/stratosphere/servicesession.hpp +++ b/stratosphere/libstratosphere/include/stratosphere/servicesession.hpp @@ -158,22 +158,22 @@ class ServiceSession : public IWaitable { /* Control commands. */ std::tuple ConvertCurrentObjectToDomain() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } std::tuple CopyFromCurrentDomain() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } std::tuple CloneCurrentObject() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } std::tuple QueryPointerBufferSize() { - return std::make_tuple(0x0, (u32)sizeof(this->pointer_buffer)); + return {0x0, (u32)sizeof(this->pointer_buffer)}; } std::tuple CloneCurrentObjectEx() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } Result dispatch_control_command(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id) { @@ -202,4 +202,4 @@ class ServiceSession : public IWaitable { return rc; } -}; \ No newline at end of file +}; diff --git a/stratosphere/loader/source/ldr_debug_monitor.cpp b/stratosphere/loader/source/ldr_debug_monitor.cpp index 954b01168..905eef1fc 100644 --- a/stratosphere/loader/source/ldr_debug_monitor.cpp +++ b/stratosphere/loader/source/ldr_debug_monitor.cpp @@ -27,13 +27,13 @@ Result DebugMonitorService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 std::tuple DebugMonitorService::add_title_to_launch_queue(u64 tid, InPointer args) { fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements); - return std::make_tuple(LaunchQueue::add(tid, args.pointer, args.num_elements)); + return {LaunchQueue::add(tid, args.pointer, args.num_elements)}; } std::tuple DebugMonitorService::clear_launch_queue(u64 dat) { fprintf(stderr, "Clear launch queue: %lx\n", dat); LaunchQueue::clear(); - return std::make_tuple(0); + return {0}; } std::tuple DebugMonitorService::get_nso_info(u64 pid, OutPointerWithClientSize out) { @@ -43,5 +43,5 @@ std::tuple DebugMonitorService::get_nso_info(u64 pid, OutPointerWit Result rc = Registration::GetNsoInfosForProcessId(out.pointer, out.num_elements, pid, &out_num_nsos); - return std::make_tuple(rc, out_num_nsos); -} \ No newline at end of file + return {rc, out_num_nsos}; +} diff --git a/stratosphere/loader/source/ldr_process_manager.cpp b/stratosphere/loader/source/ldr_process_manager.cpp index e743051b7..2b34b873d 100644 --- a/stratosphere/loader/source/ldr_process_manager.cpp +++ b/stratosphere/loader/source/ldr_process_manager.cpp @@ -39,12 +39,12 @@ std::tuple ProcessManagerService::create_process(u64 flags, rc = Registration::GetRegisteredTidSid(index, &tid_sid); if (R_FAILED(rc)) { - std::make_tuple(rc, MovedHandle{process_h}); + return {rc, MovedHandle{process_h}}; } rc = ContentManagement::GetContentPathForTidSid(nca_path, &tid_sid); if (R_FAILED(rc)) { - std::make_tuple(rc, MovedHandle{process_h}); + return {rc, MovedHandle{process_h}}; } launch_item = LaunchQueue::get_item(tid_sid.title_id); @@ -55,7 +55,7 @@ std::tuple ProcessManagerService::create_process(u64 flags, ContentManagement::SetCreatedTitle(tid_sid.title_id); } - return std::make_tuple(rc, MovedHandle{process_h}); + return {rc, MovedHandle{process_h}}; } std::tuple ProcessManagerService::get_program_info(Registration::TidSid tid_sid, OutPointerWithServerSize out_program_info) { @@ -67,40 +67,40 @@ std::tuple ProcessManagerService::get_program_info(Registration::TidSid rc = populate_program_info_buffer(out_program_info.pointer, &tid_sid); if (R_FAILED(rc)) { - return std::make_tuple(rc); + return {rc}; } if (tid_sid.title_id != out_program_info.pointer->title_id) { rc = ContentManagement::GetContentPathForTidSid(nca_path, &tid_sid); if (R_FAILED(rc)) { - return std::make_tuple(rc); + return {rc}; } rc = ContentManagement::SetContentPath(nca_path, out_program_info.pointer->title_id, tid_sid.storage_id); if (R_FAILED(rc)) { - return std::make_tuple(rc); + return {rc}; } rc = LaunchQueue::add_copy(tid_sid.title_id, out_program_info.pointer->title_id); } - return std::make_tuple(rc); + return {rc}; } std::tuple ProcessManagerService::register_title(Registration::TidSid tid_sid) { u64 out_index = 0; if (Registration::RegisterTidSid(&tid_sid, &out_index)) { - return std::make_tuple(0, out_index); + return {0, out_index}; } else { - return std::make_tuple(0xE09, out_index); + return {0xE09, out_index}; } } std::tuple ProcessManagerService::unregister_title(u64 index) { if (Registration::UnregisterIndex(index)) { - return std::make_tuple(0); + return {0}; } else { - return std::make_tuple(0x1009); + return {0x1009}; } } @@ -161,4 +161,4 @@ Result ProcessManagerService::populate_program_info_buffer(ProcessManagerService return rc; -} \ No newline at end of file +} diff --git a/stratosphere/loader/source/ldr_ro_service.cpp b/stratosphere/loader/source/ldr_ro_service.cpp index 1ee023b5c..941899712 100644 --- a/stratosphere/loader/source/ldr_ro_service.cpp +++ b/stratosphere/loader/source/ldr_ro_service.cpp @@ -68,7 +68,7 @@ std::tuple RelocatableObjectsService::load_nro(PidDescriptor pid_de rc = NroUtils::LoadNro(target_proc, this->process_handle, nro_address, nro_size, bss_address, bss_size, &out_address); LOAD_NRO_END: - return std::make_tuple(rc, out_address); + return {rc, out_address}; } std::tuple RelocatableObjectsService::unload_nro(PidDescriptor pid_desc, u64 nro_address) { @@ -133,7 +133,7 @@ LOAD_NRR_END: nrr_info.Close(); } } - return std::make_tuple(rc); + return {rc}; } std::tuple RelocatableObjectsService::unload_nrr(PidDescriptor pid_desc, u64 nrr_address) { @@ -166,5 +166,5 @@ std::tuple RelocatableObjectsService::initialize(PidDescriptor pid_desc, this->has_initialized = true; rc = 0; } - return std::make_tuple(rc); + return {rc}; } diff --git a/stratosphere/loader/source/ldr_shell.cpp b/stratosphere/loader/source/ldr_shell.cpp index a182a48d3..2b48bcb97 100644 --- a/stratosphere/loader/source/ldr_shell.cpp +++ b/stratosphere/loader/source/ldr_shell.cpp @@ -21,11 +21,11 @@ Result ShellService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id std::tuple ShellService::add_title_to_launch_queue(u64 tid, InPointer args) { fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements); - return std::make_tuple(LaunchQueue::add(tid, args.pointer, args.num_elements)); + return {LaunchQueue::add(tid, args.pointer, args.num_elements)}; } std::tuple ShellService::clear_launch_queue(u64 dat) { fprintf(stderr, "Clear launch queue: %lx\n", dat); LaunchQueue::clear(); - return std::make_tuple(0); -} \ No newline at end of file + return {0}; +} diff --git a/stratosphere/pm/source/pm_boot_mode.cpp b/stratosphere/pm/source/pm_boot_mode.cpp index cad3f933f..e0c382534 100644 --- a/stratosphere/pm/source/pm_boot_mode.cpp +++ b/stratosphere/pm/source/pm_boot_mode.cpp @@ -24,10 +24,10 @@ Result BootModeService::handle_deferred() { } std::tuple BootModeService::get_boot_mode() { - return std::make_tuple(0, g_is_maintenance_boot); + return {0, g_is_maintenance_boot}; } std::tuple BootModeService::set_maintenance_boot() { g_is_maintenance_boot = true; - return std::make_tuple(0); -} \ No newline at end of file + return {0}; +} diff --git a/stratosphere/sm/source/sm_manager_service.cpp b/stratosphere/sm/source/sm_manager_service.cpp index 49247ec5c..446b917bb 100644 --- a/stratosphere/sm/source/sm_manager_service.cpp +++ b/stratosphere/sm/source/sm_manager_service.cpp @@ -24,9 +24,9 @@ Result ManagerService::handle_deferred() { std::tuple ManagerService::register_process(u64 pid, InBuffer acid_sac, InBuffer aci0_sac) { - return std::make_tuple(Registration::RegisterProcess(pid, acid_sac.buffer, acid_sac.num_elements, aci0_sac.buffer, aci0_sac.num_elements)); + return {Registration::RegisterProcess(pid, acid_sac.buffer, acid_sac.num_elements, aci0_sac.buffer, aci0_sac.num_elements)}; } std::tuple ManagerService::unregister_process(u64 pid) { - return std::make_tuple(Registration::UnregisterProcess(pid)); -} \ No newline at end of file + return {Registration::UnregisterProcess(pid)}; +} diff --git a/stratosphere/sm/source/sm_user_service.cpp b/stratosphere/sm/source/sm_user_service.cpp index 50d2ad055..b445a5ab3 100644 --- a/stratosphere/sm/source/sm_user_service.cpp +++ b/stratosphere/sm/source/sm_user_service.cpp @@ -33,7 +33,7 @@ Result UserService::handle_deferred() { std::tuple UserService::initialize(PidDescriptor pid) { this->pid = pid.pid; this->has_initialized = true; - return std::make_tuple(0); + return {0}; } std::tuple UserService::get_service(u64 service) { @@ -51,13 +51,13 @@ std::tuple UserService::get_service(u64 service) { if (rc == RESULT_DEFER_SESSION) { this->deferred_service = service; } - return std::make_tuple(rc, MovedHandle{session_h}); + return {rc, MovedHandle{session_h}}; } std::tuple UserService::deferred_get_service(u64 service) { Handle session_h = 0; Result rc = Registration::GetServiceHandle(service, &session_h); - return std::make_tuple(rc, MovedHandle{session_h}); + return {rc, MovedHandle{session_h}}; } std::tuple UserService::register_service(u64 service, u8 is_light, u32 max_sessions) { @@ -71,7 +71,7 @@ std::tuple UserService::register_service(u64 service, u8 is if (this->has_initialized) { rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, is_light != 0, &service_h); } - return std::make_tuple(rc, MovedHandle{service_h}); + return {rc, MovedHandle{service_h}}; } std::tuple UserService::unregister_service(u64 service) { @@ -84,5 +84,5 @@ std::tuple UserService::unregister_service(u64 service) { if (this->has_initialized) { rc = Registration::UnregisterServiceForPid(this->pid, service); } - return std::make_tuple(rc); + return {rc}; }