diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom.cpp | 5 | ||||
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 8 | ||||
-rw-r--r-- | src/core/core.cpp | 5 | ||||
-rw-r--r-- | src/core/file_sys/archive_extsavedata.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/archive_romfs.cpp | 3 | ||||
-rw-r--r-- | src/core/file_sys/archive_savedata.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/archive_savedatacheck.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/archive_systemsavedata.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/disk_archive.cpp | 8 | ||||
-rw-r--r-- | src/core/file_sys/ivfc_archive.cpp | 5 | ||||
-rw-r--r-- | src/core/hle/kernel/process.cpp | 3 | ||||
-rw-r--r-- | src/core/hle/service/frd/frd.cpp | 91 | ||||
-rw-r--r-- | src/core/hle/service/frd/frd.h | 88 | ||||
-rw-r--r-- | src/core/hle/service/frd/frd_u.cpp | 107 | ||||
-rw-r--r-- | src/core/hle/service/fs/archive.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/service/service.cpp | 3 | ||||
-rw-r--r-- | src/core/loader/loader.cpp | 5 | ||||
-rw-r--r-- | src/core/loader/ncch.cpp | 1 |
19 files changed, 267 insertions, 98 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp index f3be2c857..947f5094b 100644 --- a/src/core/arm/dyncom/arm_dyncom.cpp +++ b/src/core/arm/dyncom/arm_dyncom.cpp @@ -3,8 +3,7 @@ // Refer to the license.txt file included. #include <cstring> - -#include "common/make_unique.h" +#include <memory> #include "core/arm/skyeye_common/armstate.h" #include "core/arm/skyeye_common/armsupp.h" @@ -18,7 +17,7 @@ #include "core/core_timing.h" ARM_DynCom::ARM_DynCom(PrivilegeMode initial_mode) { - state = Common::make_unique<ARMul_State>(initial_mode); + state = std::make_unique<ARMul_State>(initial_mode); } ARM_DynCom::~ARM_DynCom() { diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 9ed61947e..a6faf42b9 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp @@ -3955,9 +3955,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { add_inst* const inst_cream = (add_inst*)inst_base->component; - u32 rn_val = RN; - if (inst_cream->Rn == 15) - rn_val += 2 * cpu->GetInstructionSize(); + u32 rn_val = CHECK_READ_REG15_WA(cpu, inst_cream->Rn); bool carry; bool overflow; @@ -6167,9 +6165,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) { if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) { sub_inst* const inst_cream = (sub_inst*)inst_base->component; - u32 rn_val = RN; - if (inst_cream->Rn == 15) - rn_val += 2 * cpu->GetInstructionSize(); + u32 rn_val = CHECK_READ_REG15_WA(cpu, inst_cream->Rn); bool carry; bool overflow; diff --git a/src/core/core.cpp b/src/core/core.cpp index 84d6c392e..3bb843aab 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -4,7 +4,6 @@ #include <memory> -#include "common/make_unique.h" #include "common/logging/log.h" #include "core/core.h" @@ -74,8 +73,8 @@ void Stop() { /// Initialize the core void Init() { - g_sys_core = Common::make_unique<ARM_DynCom>(USER32MODE); - g_app_core = Common::make_unique<ARM_DynCom>(USER32MODE); + g_sys_core = std::make_unique<ARM_DynCom>(USER32MODE); + g_app_core = std::make_unique<ARM_DynCom>(USER32MODE); LOG_DEBUG(Core, "Initialized OK"); } diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp index 961264fe5..1d9eaefcb 100644 --- a/src/core/file_sys/archive_extsavedata.cpp +++ b/src/core/file_sys/archive_extsavedata.cpp @@ -3,12 +3,12 @@ // Refer to the license.txt file included. #include <algorithm> +#include <memory> #include <vector> #include "common/common_types.h" #include "common/file_util.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "common/string_util.h" #include "core/file_sys/archive_extsavedata.h" @@ -84,7 +84,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_ExtSaveData::Open(cons ErrorSummary::InvalidState, ErrorLevel::Status); } } - auto archive = Common::make_unique<DiskArchive>(fullpath); + auto archive = std::make_unique<DiskArchive>(fullpath); return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } diff --git a/src/core/file_sys/archive_romfs.cpp b/src/core/file_sys/archive_romfs.cpp index a9a29ebde..38828b546 100644 --- a/src/core/file_sys/archive_romfs.cpp +++ b/src/core/file_sys/archive_romfs.cpp @@ -7,7 +7,6 @@ #include "common/common_types.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "core/file_sys/archive_romfs.h" #include "core/file_sys/ivfc_archive.h" @@ -25,7 +24,7 @@ ArchiveFactory_RomFS::ArchiveFactory_RomFS(Loader::AppLoader& app_loader) { } ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_RomFS::Open(const Path& path) { - auto archive = Common::make_unique<IVFCArchive>(romfs_file, data_offset, data_size); + auto archive = std::make_unique<IVFCArchive>(romfs_file, data_offset, data_size); return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } diff --git a/src/core/file_sys/archive_savedata.cpp b/src/core/file_sys/archive_savedata.cpp index fe020d21c..fd5711e14 100644 --- a/src/core/file_sys/archive_savedata.cpp +++ b/src/core/file_sys/archive_savedata.cpp @@ -3,11 +3,11 @@ // Refer to the license.txt file included. #include <algorithm> +#include <memory> #include "common/common_types.h" #include "common/file_util.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "common/string_util.h" #include "core/file_sys/archive_savedata.h" @@ -53,7 +53,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveData::Open(const P ErrorSummary::InvalidState, ErrorLevel::Status); } - auto archive = Common::make_unique<DiskArchive>(std::move(concrete_mount_point)); + auto archive = std::make_unique<DiskArchive>(std::move(concrete_mount_point)); return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } diff --git a/src/core/file_sys/archive_savedatacheck.cpp b/src/core/file_sys/archive_savedatacheck.cpp index 3db11c500..9f65e5455 100644 --- a/src/core/file_sys/archive_savedatacheck.cpp +++ b/src/core/file_sys/archive_savedatacheck.cpp @@ -3,12 +3,12 @@ // Refer to the license.txt file included. #include <algorithm> +#include <memory> #include <vector> #include "common/common_types.h" #include "common/file_util.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "common/string_util.h" #include "core/file_sys/archive_savedatacheck.h" @@ -44,7 +44,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(co } auto size = file->GetSize(); - auto archive = Common::make_unique<IVFCArchive>(file, 0, size); + auto archive = std::make_unique<IVFCArchive>(file, 0, size); return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index 657221cbf..9b218af58 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp @@ -3,10 +3,10 @@ // Refer to the license.txt file included. #include <algorithm> +#include <memory> #include "common/file_util.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "core/file_sys/archive_sdmc.h" #include "core/file_sys/disk_archive.h" @@ -36,7 +36,7 @@ bool ArchiveFactory_SDMC::Initialize() { } ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SDMC::Open(const Path& path) { - auto archive = Common::make_unique<DiskArchive>(sdmc_directory); + auto archive = std::make_unique<DiskArchive>(sdmc_directory); return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } diff --git a/src/core/file_sys/archive_systemsavedata.cpp b/src/core/file_sys/archive_systemsavedata.cpp index e1780de2f..1bcc228a1 100644 --- a/src/core/file_sys/archive_systemsavedata.cpp +++ b/src/core/file_sys/archive_systemsavedata.cpp @@ -3,11 +3,11 @@ // Refer to the license.txt file included. #include <algorithm> +#include <memory> #include <vector> #include "common/common_types.h" #include "common/file_util.h" -#include "common/make_unique.h" #include "common/string_util.h" #include "core/file_sys/archive_systemsavedata.h" @@ -59,7 +59,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SystemSaveData::Open(c return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, ErrorSummary::InvalidState, ErrorLevel::Status); } - auto archive = Common::make_unique<DiskArchive>(fullpath); + auto archive = std::make_unique<DiskArchive>(fullpath); return MakeResult<std::unique_ptr<ArchiveBackend>>(std::move(archive)); } diff --git a/src/core/file_sys/disk_archive.cpp b/src/core/file_sys/disk_archive.cpp index 8e4ea01c5..489cc96fb 100644 --- a/src/core/file_sys/disk_archive.cpp +++ b/src/core/file_sys/disk_archive.cpp @@ -4,11 +4,11 @@ #include <algorithm> #include <cstdio> +#include <memory> #include "common/common_types.h" #include "common/file_util.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "core/file_sys/disk_archive.h" @@ -19,7 +19,7 @@ namespace FileSys { ResultVal<std::unique_ptr<FileBackend>> DiskArchive::OpenFile(const Path& path, const Mode mode) const { LOG_DEBUG(Service_FS, "called path=%s mode=%01X", path.DebugStr().c_str(), mode.hex); - auto file = Common::make_unique<DiskFile>(*this, path, mode); + auto file = std::make_unique<DiskFile>(*this, path, mode); ResultCode result = file->Open(); if (result.IsError()) return result; @@ -83,7 +83,7 @@ bool DiskArchive::RenameDirectory(const Path& src_path, const Path& dest_path) c std::unique_ptr<DirectoryBackend> DiskArchive::OpenDirectory(const Path& path) const { LOG_DEBUG(Service_FS, "called path=%s", path.DebugStr().c_str()); - auto directory = Common::make_unique<DiskDirectory>(*this, path); + auto directory = std::make_unique<DiskDirectory>(*this, path); if (!directory->Open()) return nullptr; return std::move(directory); @@ -132,7 +132,7 @@ ResultCode DiskFile::Open() { // Open the file in binary mode, to avoid problems with CR/LF on Windows systems mode_string += "b"; - file = Common::make_unique<FileUtil::IOFile>(path, mode_string.c_str()); + file = std::make_unique<FileUtil::IOFile>(path, mode_string.c_str()); if (file->IsOpen()) return RESULT_SUCCESS; return ResultCode(ErrorDescription::FS_NotFound, ErrorModule::FS, ErrorSummary::NotFound, ErrorLevel::Status); diff --git a/src/core/file_sys/ivfc_archive.cpp b/src/core/file_sys/ivfc_archive.cpp index a8e9a72ef..c61791ef7 100644 --- a/src/core/file_sys/ivfc_archive.cpp +++ b/src/core/file_sys/ivfc_archive.cpp @@ -7,7 +7,6 @@ #include "common/common_types.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "core/file_sys/ivfc_archive.h" @@ -21,7 +20,7 @@ std::string IVFCArchive::GetName() const { } ResultVal<std::unique_ptr<FileBackend>> IVFCArchive::OpenFile(const Path& path, const Mode mode) const { - return MakeResult<std::unique_ptr<FileBackend>>(Common::make_unique<IVFCFile>(romfs_file, data_offset, data_size)); + return MakeResult<std::unique_ptr<FileBackend>>(std::make_unique<IVFCFile>(romfs_file, data_offset, data_size)); } ResultCode IVFCArchive::DeleteFile(const Path& path) const { @@ -58,7 +57,7 @@ bool IVFCArchive::RenameDirectory(const Path& src_path, const Path& dest_path) c } std::unique_ptr<DirectoryBackend> IVFCArchive::OpenDirectory(const Path& path) const { - return Common::make_unique<IVFCDirectory>(); + return std::make_unique<IVFCDirectory>(); } u64 IVFCArchive::GetFreeBytes() const { diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 24b266eae..0546f6e16 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -2,10 +2,11 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <memory> + #include "common/assert.h" #include "common/common_funcs.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "core/hle/kernel/memory.h" #include "core/hle/kernel/process.h" diff --git a/src/core/hle/service/frd/frd.cpp b/src/core/hle/service/frd/frd.cpp index c13ffd9d2..15d604bb6 100644 --- a/src/core/hle/service/frd/frd.cpp +++ b/src/core/hle/service/frd/frd.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "common/string_util.h" + #include "core/hle/service/service.h" #include "core/hle/service/frd/frd.h" #include "core/hle/service/frd/frd_a.h" @@ -10,6 +12,95 @@ namespace Service { namespace FRD { +static FriendKey my_friend_key = {0, 0, 0ull}; +static MyPresence my_presence = {}; + +void GetMyPresence(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + u32 shifted_out_size = cmd_buff[64]; + u32 my_presence_addr = cmd_buff[65]; + + ASSERT(shifted_out_size == ((sizeof(MyPresence) << 14) | 2)); + + Memory::WriteBlock(my_presence_addr, reinterpret_cast<const u8*>(&my_presence), sizeof(MyPresence)); + + cmd_buff[1] = RESULT_SUCCESS.raw; // No error + + LOG_WARNING(Service_FRD, "(STUBBED) called"); +} + +void GetFriendKeyList(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + u32 unknown = cmd_buff[1]; + u32 frd_count = cmd_buff[2]; + u32 frd_key_addr = cmd_buff[65]; + + FriendKey zero_key = {}; + for (u32 i = 0; i < frd_count; ++i) { + Memory::WriteBlock(frd_key_addr + i * sizeof(FriendKey), + reinterpret_cast<const u8*>(&zero_key), sizeof(FriendKey)); + } + + cmd_buff[1] = RESULT_SUCCESS.raw; // No error + cmd_buff[2] = 0; // 0 friends + LOG_WARNING(Service_FRD, "(STUBBED) called, unknown=%d, frd_count=%d, frd_key_addr=0x%08X", + unknown, frd_count, frd_key_addr); +} + +void GetFriendProfile(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + u32 count = cmd_buff[1]; + u32 frd_key_addr = cmd_buff[3]; + u32 profiles_addr = cmd_buff[65]; + + Profile zero_profile = {}; + for (u32 i = 0; i < count; ++i) { + Memory::WriteBlock(profiles_addr + i * sizeof(Profile), + reinterpret_cast<const u8*>(&zero_profile), sizeof(Profile)); + } + + cmd_buff[1] = RESULT_SUCCESS.raw; // No error + LOG_WARNING(Service_FRD, "(STUBBED) called, count=%d, frd_key_addr=0x%08X, profiles_addr=0x%08X", + count, frd_key_addr, profiles_addr); +} + +void GetFriendAttributeFlags(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + u32 count = cmd_buff[1]; + u32 frd_key_addr = cmd_buff[3]; + u32 attr_flags_addr = cmd_buff[65]; + + for (u32 i = 0; i < count; ++i) { + //TODO:(mailwl) figure out AttributeFlag size and zero all buffer. Assume 1 byte + Memory::Write8(attr_flags_addr + i, 0); + } + + cmd_buff[1] = RESULT_SUCCESS.raw; // No error + LOG_WARNING(Service_FRD, "(STUBBED) called, count=%d, frd_key_addr=0x%08X, attr_flags_addr=0x%08X", + count, frd_key_addr, attr_flags_addr); +} + +void GetMyFriendKey(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + cmd_buff[1] = RESULT_SUCCESS.raw; // No error + Memory::WriteBlock(cmd_buff[2], reinterpret_cast<const u8*>(&my_friend_key), sizeof(FriendKey)); + LOG_WARNING(Service_FRD, "(STUBBED) called"); +} + +void GetMyScreenName(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + + cmd_buff[1] = RESULT_SUCCESS.raw; // No error + // TODO: (mailwl) get the name from config + Common::UTF8ToUTF16("Citra").copy(reinterpret_cast<char16_t*>(&cmd_buff[2]), 11); + LOG_WARNING(Service_FRD, "(STUBBED) called"); +} + void Init() { using namespace Kernel; diff --git a/src/core/hle/service/frd/frd.h b/src/core/hle/service/frd/frd.h index f9f88b444..c8283a7f3 100644 --- a/src/core/hle/service/frd/frd.h +++ b/src/core/hle/service/frd/frd.h @@ -4,9 +4,97 @@ #pragma once +#include "common/common_types.h" + namespace Service { + +class Interface; + namespace FRD { +struct FriendKey { + u32 friend_id; + u32 unknown; + u64 friend_code; +}; + +struct MyPresence { + u8 unknown[0x12C]; +}; + +struct Profile { + u8 region; + u8 country; + u8 area; + u8 language; + u32 unknown; +}; + +/** + * FRD::GetMyPresence service function + * Inputs: + * 64 : sizeof (MyPresence) << 14 | 2 + * 65 : Address of MyPresence structure + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + */ +void GetMyPresence(Service::Interface* self); + +/** + * FRD::GetFriendKeyList service function + * Inputs: + * 1 : Unknown + * 2 : Max friends count + * 65 : Address of FriendKey List + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + * 2 : FriendKey count filled + */ +void GetFriendKeyList(Service::Interface* self); + +/** + * FRD::GetFriendProfile service function + * Inputs: + * 1 : Friends count + * 2 : Friends count << 18 | 2 + * 3 : Address of FriendKey List + * 64 : (count * sizeof (Profile)) << 10 | 2 + * 65 : Address of Profiles List + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + */ +void GetFriendProfile(Service::Interface* self); + +/** + * FRD::GetFriendAttributeFlags service function + * Inputs: + * 1 : Friends count + * 2 : Friends count << 18 | 2 + * 3 : Address of FriendKey List + * 65 : Address of AttributeFlags + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + */ +void GetFriendAttributeFlags(Service::Interface* self); + +/** + * FRD::GetMyFriendKey service function + * Inputs: + * none + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + * 2-5 : FriendKey + */ +void GetMyFriendKey(Service::Interface* self); + +/** + * FRD::GetMyScreenName service function + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + * 2 : UTF16 encoded name (max 11 symbols) + */ +void GetMyScreenName(Service::Interface* self); + /// Initialize FRD service(s) void Init(); diff --git a/src/core/hle/service/frd/frd_u.cpp b/src/core/hle/service/frd/frd_u.cpp index 2c6885377..db8666416 100644 --- a/src/core/hle/service/frd/frd_u.cpp +++ b/src/core/hle/service/frd/frd_u.cpp @@ -2,65 +2,66 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "core/hle/service/frd/frd.h" #include "core/hle/service/frd/frd_u.h" namespace Service { namespace FRD { const Interface::FunctionInfo FunctionTable[] = { - {0x00010000, nullptr, "HasLoggedIn"}, - {0x00020000, nullptr, "IsOnline"}, - {0x00030000, nullptr, "Login"}, - {0x00040000, nullptr, "Logout"}, - {0x00050000, nullptr, "GetMyFriendKey"}, - {0x00060000, nullptr, "GetMyPreference"}, - {0x00070000, nullptr, "GetMyProfile"}, - {0x00080000, nullptr, "GetMyPresence"}, - {0x00090000, nullptr, "GetMyScreenName"}, - {0x000A0000, nullptr, "GetMyMii"}, - {0x000B0000, nullptr, "GetMyLocalAccountId"}, - {0x000C0000, nullptr, "GetMyPlayingGame"}, - {0x000D0000, nullptr, "GetMyFavoriteGame"}, - {0x000E0000, nullptr, "GetMyNcPrincipalId"}, - {0x000F0000, nullptr, "GetMyComment"}, - {0x00100040, nullptr, "GetMyPassword"}, - {0x00110080, nullptr, "GetFriendKeyList"}, - {0x00120042, nullptr, "GetFriendPresence"}, - {0x00130142, nullptr, "GetFriendScreenName"}, - {0x00140044, nullptr, "GetFriendMii"}, - {0x00150042, nullptr, "GetFriendProfile"}, - {0x00160042, nullptr, "GetFriendRelationship"}, - {0x00170042, nullptr, "GetFriendAttributeFlags"}, - {0x00180044, nullptr, "GetFriendPlayingGame"}, - {0x00190042, nullptr, "GetFriendFavoriteGame"}, - {0x001A00C4, nullptr, "GetFriendInfo"}, - {0x001B0080, nullptr, "IsIncludedInFriendList"}, - {0x001C0042, nullptr, "UnscrambleLocalFriendCode"}, - {0x001D0002, nullptr, "UpdateGameModeDescription"}, - {0x001E02C2, nullptr, "UpdateGameMode"}, - {0x001F0042, nullptr, "SendInvitation"}, - {0x00200002, nullptr, "AttachToEventNotification"}, - {0x00210040, nullptr, "SetNotificationMask"}, - {0x00220040, nullptr, "GetEventNotification"}, - {0x00230000, nullptr, "GetLastResponseResult"}, - {0x00240040, nullptr, "PrincipalIdToFriendCode"}, - {0x00250080, nullptr, "FriendCodeToPrincipalId"}, - {0x00260080, nullptr, "IsValidFriendCode"}, - {0x00270040, nullptr, "ResultToErrorCode"}, - {0x00280244, nullptr, "RequestGameAuthentication"}, - {0x00290000, nullptr, "GetGameAuthenticationData"}, - {0x002A0204, nullptr, "RequestServiceLocator"}, - {0x002B0000, nullptr, "GetServiceLocatorData"}, - {0x002C0002, nullptr, "DetectNatProperties"}, - {0x002D0000, nullptr, "GetNatProperties"}, - {0x002E0000, nullptr, "GetServerTimeInterval"}, - {0x002F0040, nullptr, "AllowHalfAwake"}, - {0x00300000, nullptr, "GetServerTypes"}, - {0x00310082, nullptr, "GetFriendComment"}, - {0x00320042, nullptr, "SetClientSdkVersion"}, - {0x00330000, nullptr, "GetMyApproachContext"}, - {0x00340046, nullptr, "AddFriendWithApproach"}, - {0x00350082, nullptr, "DecryptApproachContext"}, + {0x00010000, nullptr, "HasLoggedIn"}, + {0x00020000, nullptr, "IsOnline"}, + {0x00030000, nullptr, "Login"}, + {0x00040000, nullptr, "Logout"}, + {0x00050000, GetMyFriendKey, "GetMyFriendKey"}, + {0x00060000, nullptr, "GetMyPreference"}, + {0x00070000, nullptr, "GetMyProfile"}, + {0x00080000, GetMyPresence, "GetMyPresence"}, + {0x00090000, GetMyScreenName, "GetMyScreenName"}, + {0x000A0000, nullptr, "GetMyMii"}, + {0x000B0000, nullptr, "GetMyLocalAccountId"}, + {0x000C0000, nullptr, "GetMyPlayingGame"}, + {0x000D0000, nullptr, "GetMyFavoriteGame"}, + {0x000E0000, nullptr, "GetMyNcPrincipalId"}, + {0x000F0000, nullptr, "GetMyComment"}, + {0x00100040, nullptr, "GetMyPassword"}, + {0x00110080, GetFriendKeyList, "GetFriendKeyList"}, + {0x00120042, nullptr, "GetFriendPresence"}, + {0x00130142, nullptr, "GetFriendScreenName"}, + {0x00140044, nullptr, "GetFriendMii"}, + {0x00150042, GetFriendProfile, "GetFriendProfile"}, + {0x00160042, nullptr, "GetFriendRelationship"}, + {0x00170042, GetFriendAttributeFlags, "GetFriendAttributeFlags"}, + {0x00180044, nullptr, "GetFriendPlayingGame"}, + {0x00190042, nullptr, "GetFriendFavoriteGame"}, + {0x001A00C4, nullptr, "GetFriendInfo"}, + {0x001B0080, nullptr, "IsIncludedInFriendList"}, + {0x001C0042, nullptr, "UnscrambleLocalFriendCode"}, + {0x001D0002, nullptr, "UpdateGameModeDescription"}, + {0x001E02C2, nullptr, "UpdateGameMode"}, + {0x001F0042, nullptr, "SendInvitation"}, + {0x00200002, nullptr, "AttachToEventNotification"}, + {0x00210040, nullptr, "SetNotificationMask"}, + {0x00220040, nullptr, "GetEventNotification"}, + {0x00230000, nullptr, "GetLastResponseResult"}, + {0x00240040, nullptr, "PrincipalIdToFriendCode"}, + {0x00250080, nullptr, "FriendCodeToPrincipalId"}, + {0x00260080, nullptr, "IsValidFriendCode"}, + {0x00270040, nullptr, "ResultToErrorCode"}, + {0x00280244, nullptr, "RequestGameAuthentication"}, + {0x00290000, nullptr, "GetGameAuthenticationData"}, + {0x002A0204, nullptr, "RequestServiceLocator"}, + {0x002B0000, nullptr, "GetServiceLocatorData"}, + {0x002C0002, nullptr, "DetectNatProperties"}, + {0x002D0000, nullptr, "GetNatProperties"}, + {0x002E0000, nullptr, "GetServerTimeInterval"}, + {0x002F0040, nullptr, "AllowHalfAwake"}, + {0x00300000, nullptr, "GetServerTypes"}, + {0x00310082, nullptr, "GetFriendComment"}, + {0x00320042, nullptr, "SetClientSdkVersion"}, + {0x00330000, nullptr, "GetMyApproachContext"}, + {0x00340046, nullptr, "AddFriendWithApproach"}, + {0x00350082, nullptr, "DecryptApproachContext"}, }; FRD_U_Interface::FRD_U_Interface() { diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 590697e76..e9588cb72 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp @@ -15,7 +15,6 @@ #include "common/common_types.h" #include "common/file_util.h" #include "common/logging/log.h" -#include "common/make_unique.h" #include "core/file_sys/archive_backend.h" #include "core/file_sys/archive_extsavedata.h" @@ -521,23 +520,23 @@ void ArchiveInit() { std::string sdmc_directory = FileUtil::GetUserPath(D_SDMC_IDX); std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX); - auto sdmc_factory = Common::make_unique<FileSys::ArchiveFactory_SDMC>(sdmc_directory); + auto sdmc_factory = std::make_unique<FileSys::ArchiveFactory_SDMC>(sdmc_directory); if (sdmc_factory->Initialize()) RegisterArchiveType(std::move(sdmc_factory), ArchiveIdCode::SDMC); else LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s", sdmc_directory.c_str()); // Create the SaveData archive - auto savedata_factory = Common::make_unique<FileSys::ArchiveFactory_SaveData>(sdmc_directory); + auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sdmc_directory); RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData); - auto extsavedata_factory = Common::make_unique<FileSys::ArchiveFactory_ExtSaveData>(sdmc_directory, false); + auto extsavedata_factory = std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(sdmc_directory, false); if (extsavedata_factory->Initialize()) RegisterArchiveType(std::move(extsavedata_factory), ArchiveIdCode::ExtSaveData); else LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path %s", extsavedata_factory->GetMountPoint().c_str()); - auto sharedextsavedata_factory = Common::make_unique<FileSys::ArchiveFactory_ExtSaveData>(nand_directory, true); + auto sharedextsavedata_factory = std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(nand_directory, true); if (sharedextsavedata_factory->Initialize()) RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData); else @@ -545,10 +544,10 @@ void ArchiveInit() { sharedextsavedata_factory->GetMountPoint().c_str()); // Create the SaveDataCheck archive, basically a small variation of the RomFS archive - auto savedatacheck_factory = Common::make_unique<FileSys::ArchiveFactory_SaveDataCheck>(nand_directory); + auto savedatacheck_factory = std::make_unique<FileSys::ArchiveFactory_SaveDataCheck>(nand_directory); RegisterArchiveType(std::move(savedatacheck_factory), ArchiveIdCode::SaveDataCheck); - auto systemsavedata_factory = Common::make_unique<FileSys::ArchiveFactory_SystemSaveData>(nand_directory); + auto systemsavedata_factory = std::make_unique<FileSys::ArchiveFactory_SystemSaveData>(nand_directory); RegisterArchiveType(std::move(systemsavedata_factory), ArchiveIdCode::SystemSaveData); } diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 7844d2330..0fe3a4d7a 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -71,9 +71,8 @@ ResultVal<bool> Interface::SyncRequest() { // TODO(bunnei): Hack - ignore error cmd_buff[1] = 0; return MakeResult<bool>(false); - } else { - LOG_TRACE(Service, "%s", MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff).c_str()); } + LOG_TRACE(Service, "%s", MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff).c_str()); itr->second.func(this); diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index b1907cd55..886501c41 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -6,7 +6,6 @@ #include <string> #include "common/logging/log.h" -#include "common/make_unique.h" #include "common/string_util.h" #include "core/file_sys/archive_romfs.h" @@ -120,7 +119,7 @@ ResultStatus LoadFile(const std::string& filename) { AppLoader_THREEDSX app_loader(std::move(file), filename_filename, filename); // Load application and RomFS if (ResultStatus::Success == app_loader.Load()) { - Service::FS::RegisterArchiveType(Common::make_unique<FileSys::ArchiveFactory_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); + Service::FS::RegisterArchiveType(std::make_unique<FileSys::ArchiveFactory_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); return ResultStatus::Success; } break; @@ -139,7 +138,7 @@ ResultStatus LoadFile(const std::string& filename) { // Load application and RomFS ResultStatus result = app_loader.Load(); if (ResultStatus::Success == result) { - Service::FS::RegisterArchiveType(Common::make_unique<FileSys::ArchiveFactory_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); + Service::FS::RegisterArchiveType(std::make_unique<FileSys::ArchiveFactory_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); } return result; } diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index 93f21bec2..e63cab33f 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp @@ -7,7 +7,6 @@ #include <memory> #include "common/logging/log.h" -#include "common/make_unique.h" #include "common/string_util.h" #include "common/swap.h" |