mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 15:39:02 -05:00 
			
		
		
		
	Manually tweak source formatting and then re-run clang-format
This commit is contained in:
		| @@ -15,8 +15,7 @@ struct ThreadContext; | ||||
| /// Generic ARM11 CPU interface | ||||
| class ARM_Interface : NonCopyable { | ||||
| public: | ||||
|     virtual ~ARM_Interface() { | ||||
|     } | ||||
|     virtual ~ARM_Interface() {} | ||||
|  | ||||
|     /** | ||||
|      * Runs the CPU for the given number of instructions | ||||
|   | ||||
| @@ -21,8 +21,7 @@ ARM_DynCom::ARM_DynCom(PrivilegeMode initial_mode) { | ||||
|     state = std::make_unique<ARMul_State>(initial_mode); | ||||
| } | ||||
|  | ||||
| ARM_DynCom::~ARM_DynCom() { | ||||
| } | ||||
| ARM_DynCom::~ARM_DynCom() {} | ||||
|  | ||||
| void ARM_DynCom::ClearInstructionCache() { | ||||
|     state->instruction_cache.clear(); | ||||
|   | ||||
| @@ -1883,6 +1883,7 @@ const transop_fp_t arm_instruction_trans[] = { | ||||
|     // All the thumb instructions should be placed the end of table | ||||
|     INTERPRETER_TRANSLATE(b_2_thumb), INTERPRETER_TRANSLATE(b_cond_thumb), | ||||
|     INTERPRETER_TRANSLATE(bl_1_thumb), INTERPRETER_TRANSLATE(bl_2_thumb), | ||||
|     INTERPRETER_TRANSLATE(blx_1_thumb)}; | ||||
|     INTERPRETER_TRANSLATE(blx_1_thumb), | ||||
| }; | ||||
|  | ||||
| const size_t arm_instruction_trans_len = sizeof(arm_instruction_trans) / sizeof(transop_fp_t); | ||||
|   | ||||
| @@ -237,10 +237,8 @@ private: | ||||
|     void ResetMPCoreCP15Registers(); | ||||
|  | ||||
|     // Defines a reservation granule of 2 words, which protects the first 2 words starting at the | ||||
|     // tag. | ||||
|     // This is the smallest granule allowed by the v7 spec, and is coincidentally just large enough | ||||
|     // to | ||||
|     // support LDR/STREXD. | ||||
|     // tag. This is the smallest granule allowed by the v7 spec, and is coincidentally just large | ||||
|     // enough to support LDR/STREXD. | ||||
|     static const u32 RESERVATION_GRANULE_MASK = 0xFFFFFFF8; | ||||
|  | ||||
|     u32 exclusive_tag; // The address for which the local monitor is in exclusive access mode | ||||
|   | ||||
| @@ -51,10 +51,10 @@ | ||||
|  * =========================================================================== | ||||
|  */ | ||||
|  | ||||
| #include "core/arm/skyeye_common/vfp/vfp.h" | ||||
| #include <algorithm> | ||||
| #include "common/logging/log.h" | ||||
| #include "core/arm/skyeye_common/vfp/asm_vfp.h" | ||||
| #include "core/arm/skyeye_common/vfp/vfp.h" | ||||
| #include "core/arm/skyeye_common/vfp/vfp_helper.h" | ||||
|  | ||||
| static struct vfp_double vfp_double_default_qnan = { | ||||
|   | ||||
| @@ -280,13 +280,15 @@ static u32 vfp_single_fneg(ARMul_State* state, int sd, int unused, s32 m, u32 fp | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| static const u16 sqrt_oddadjust[] = {0x0004, 0x0022, 0x005d, 0x00b1, 0x011d, 0x019f, | ||||
|                                      0x0236, 0x02e0, 0x039c, 0x0468, 0x0545, 0x0631, | ||||
|                                      0x072b, 0x0832, 0x0946, 0x0a67}; | ||||
| static const u16 sqrt_oddadjust[] = { | ||||
|     0x0004, 0x0022, 0x005d, 0x00b1, 0x011d, 0x019f, 0x0236, 0x02e0, | ||||
|     0x039c, 0x0468, 0x0545, 0x0631, 0x072b, 0x0832, 0x0946, 0x0a67, | ||||
| }; | ||||
|  | ||||
| static const u16 sqrt_evenadjust[] = {0x0a2d, 0x08af, 0x075a, 0x0629, 0x051a, 0x0429, | ||||
|                                       0x0356, 0x029e, 0x0200, 0x0179, 0x0109, 0x00af, | ||||
|                                       0x0068, 0x0034, 0x0012, 0x0002}; | ||||
| static const u16 sqrt_evenadjust[] = { | ||||
|     0x0a2d, 0x08af, 0x075a, 0x0629, 0x051a, 0x0429, 0x0356, 0x029e, | ||||
|     0x0200, 0x0179, 0x0109, 0x00af, 0x0068, 0x0034, 0x0012, 0x0002, | ||||
| }; | ||||
|  | ||||
| u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand) { | ||||
|     int index; | ||||
|   | ||||
| @@ -28,8 +28,7 @@ void RunLoop(int tight_loop) { | ||||
|         GDBStub::HandlePacket(); | ||||
|  | ||||
|         // If the loop is halted and we want to step, use a tiny (1) number of instructions to | ||||
|         // execute. | ||||
|         // Otherwise get out of the loop function. | ||||
|         // execute. Otherwise, get out of the loop function. | ||||
|         if (GDBStub::GetCpuHaltFlag()) { | ||||
|             if (GDBStub::GetCpuStepFlag()) { | ||||
|                 GDBStub::SetCpuStepFlag(false); | ||||
|   | ||||
| @@ -23,11 +23,9 @@ int g_clock_rate_arm11 = 268123480; | ||||
|  | ||||
| namespace CoreTiming { | ||||
| struct EventType { | ||||
|     EventType() { | ||||
|     } | ||||
|     EventType() {} | ||||
|  | ||||
|     EventType(TimedCallback cb, const char* n) : callback(cb), name(n) { | ||||
|     } | ||||
|     EventType(TimedCallback cb, const char* n) : callback(cb), name(n) {} | ||||
|  | ||||
|     TimedCallback callback; | ||||
|     const char* name; | ||||
|   | ||||
| @@ -21,7 +21,13 @@ class FileBackend; | ||||
| class DirectoryBackend; | ||||
|  | ||||
| // Path string type | ||||
| enum LowPathType : u32 { Invalid = 0, Empty = 1, Binary = 2, Char = 3, Wchar = 4 }; | ||||
| enum LowPathType : u32 { | ||||
|     Invalid = 0, | ||||
|     Empty = 1, | ||||
|     Binary = 2, | ||||
|     Char = 3, | ||||
|     Wchar = 4, | ||||
| }; | ||||
|  | ||||
| union Mode { | ||||
|     u32 hex; | ||||
| @@ -32,12 +38,9 @@ union Mode { | ||||
|  | ||||
| class Path { | ||||
| public: | ||||
|     Path() : type(Invalid) { | ||||
|     } | ||||
|     Path(const char* path) : type(Char), string(path) { | ||||
|     } | ||||
|     Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) { | ||||
|     } | ||||
|     Path() : type(Invalid) {} | ||||
|     Path(const char* path) : type(Char), string(path) {} | ||||
|     Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {} | ||||
|     Path(LowPathType type, u32 size, u32 pointer); | ||||
|  | ||||
|     LowPathType GetType() const { | ||||
| @@ -61,22 +64,18 @@ private: | ||||
|     std::u16string u16str; | ||||
| }; | ||||
|  | ||||
| /// Parameters of the archive, as specified in the Create or Format call. | ||||
| struct ArchiveFormatInfo { | ||||
|     u32_le total_size; ///< The pre-defined size of the archive, as specified in the Create or | ||||
|                        /// Format call | ||||
|     u32_le number_directories; ///< The pre-defined number of directories in the archive, as | ||||
|                                /// specified in the Create or Format call | ||||
|     u32_le number_files; ///< The pre-defined number of files in the archive, as specified in the | ||||
|                          /// Create or Format call | ||||
|     u8 duplicate_data;   ///< Whether the archive should duplicate the data, as specified in the | ||||
|                          /// Create or Format call | ||||
|     u32_le total_size;         ///< The pre-defined size of the archive. | ||||
|     u32_le number_directories; ///< The pre-defined number of directories in the archive. | ||||
|     u32_le number_files;       ///< The pre-defined number of files in the archive. | ||||
|     u8 duplicate_data;         ///< Whether the archive should duplicate the data. | ||||
| }; | ||||
| static_assert(std::is_pod<ArchiveFormatInfo>::value, "ArchiveFormatInfo is not POD"); | ||||
|  | ||||
| class ArchiveBackend : NonCopyable { | ||||
| public: | ||||
|     virtual ~ArchiveBackend() { | ||||
|     } | ||||
|     virtual ~ArchiveBackend() {} | ||||
|  | ||||
|     /** | ||||
|      * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) | ||||
| @@ -153,8 +152,7 @@ public: | ||||
|  | ||||
| class ArchiveFactory : NonCopyable { | ||||
| public: | ||||
|     virtual ~ArchiveFactory() { | ||||
|     } | ||||
|     virtual ~ArchiveFactory() {} | ||||
|  | ||||
|     /** | ||||
|      * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) | ||||
|   | ||||
| @@ -48,11 +48,10 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveData::Open(const P | ||||
|     std::string concrete_mount_point = | ||||
|         GetSaveDataPath(mount_point, Kernel::g_current_process->codeset->program_id); | ||||
|     if (!FileUtil::Exists(concrete_mount_point)) { | ||||
|         // When a SaveData archive is created for the first time, it is not yet formatted | ||||
|         // and the save file/directory structure expected by the game has not yet been initialized. | ||||
|         // When a SaveData archive is created for the first time, it is not yet formatted and the | ||||
|         // save file/directory structure expected by the game has not yet been initialized. | ||||
|         // Returning the NotFormatted error code will signal the game to provision the SaveData | ||||
|         // archive | ||||
|         // with the files and folders that it expects. | ||||
|         // archive with the files and folders that it expects. | ||||
|         return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, | ||||
|                           ErrorSummary::InvalidState, ErrorLevel::Status); | ||||
|     } | ||||
|   | ||||
| @@ -30,8 +30,7 @@ static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high | ||||
| } | ||||
|  | ||||
| ArchiveFactory_SaveDataCheck::ArchiveFactory_SaveDataCheck(const std::string& nand_directory) | ||||
|     : mount_point(GetSaveDataCheckContainerPath(nand_directory)) { | ||||
| } | ||||
|     : mount_point(GetSaveDataCheckContainerPath(nand_directory)) {} | ||||
|  | ||||
| ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(const Path& path) { | ||||
|     auto vec = path.AsBinary(); | ||||
|   | ||||
| @@ -49,8 +49,7 @@ Path ConstructSystemSaveDataBinaryPath(u32 high, u32 low) { | ||||
| } | ||||
|  | ||||
| ArchiveFactory_SystemSaveData::ArchiveFactory_SystemSaveData(const std::string& nand_path) | ||||
|     : base_path(GetSystemSaveDataContainerPath(nand_path)) { | ||||
| } | ||||
|     : base_path(GetSystemSaveDataContainerPath(nand_path)) {} | ||||
|  | ||||
| ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SystemSaveData::Open(const Path& path) { | ||||
|     std::string fullpath = GetSystemSaveDataPath(base_path, path); | ||||
|   | ||||
| @@ -38,10 +38,8 @@ static_assert(offsetof(Entry, file_size) == 0x220, "Wrong offset for file_size i | ||||
|  | ||||
| class DirectoryBackend : NonCopyable { | ||||
| public: | ||||
|     DirectoryBackend() { | ||||
|     } | ||||
|     virtual ~DirectoryBackend() { | ||||
|     } | ||||
|     DirectoryBackend() {} | ||||
|     virtual ~DirectoryBackend() {} | ||||
|  | ||||
|     /** | ||||
|     * Open the directory | ||||
|   | ||||
| @@ -29,8 +29,7 @@ namespace FileSys { | ||||
|  */ | ||||
| class DiskArchive : public ArchiveBackend { | ||||
| public: | ||||
|     DiskArchive(const std::string& mount_point_) : mount_point(mount_point_) { | ||||
|     } | ||||
|     DiskArchive(const std::string& mount_point_) : mount_point(mount_point_) {} | ||||
|  | ||||
|     virtual std::string GetName() const override { | ||||
|         return "DiskArchive: " + mount_point; | ||||
|   | ||||
| @@ -16,10 +16,8 @@ namespace FileSys { | ||||
|  | ||||
| class FileBackend : NonCopyable { | ||||
| public: | ||||
|     FileBackend() { | ||||
|     } | ||||
|     virtual ~FileBackend() { | ||||
|     } | ||||
|     FileBackend() {} | ||||
|     virtual ~FileBackend() {} | ||||
|  | ||||
|     /** | ||||
|      * Open the file | ||||
|   | ||||
| @@ -30,8 +30,7 @@ namespace FileSys { | ||||
| class IVFCArchive : public ArchiveBackend { | ||||
| public: | ||||
|     IVFCArchive(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size) | ||||
|         : romfs_file(file), data_offset(offset), data_size(size) { | ||||
|     } | ||||
|         : romfs_file(file), data_offset(offset), data_size(size) {} | ||||
|  | ||||
|     std::string GetName() const override; | ||||
|  | ||||
| @@ -55,8 +54,7 @@ protected: | ||||
| class IVFCFile : public FileBackend { | ||||
| public: | ||||
|     IVFCFile(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size) | ||||
|         : romfs_file(file), data_offset(offset), data_size(size) { | ||||
|     } | ||||
|         : romfs_file(file), data_offset(offset), data_size(size) {} | ||||
|  | ||||
|     ResultCode Open() override { | ||||
|         return RESULT_SUCCESS; | ||||
| @@ -68,8 +66,7 @@ public: | ||||
|     bool Close() const override { | ||||
|         return false; | ||||
|     } | ||||
|     void Flush() const override { | ||||
|     } | ||||
|     void Flush() const override {} | ||||
|  | ||||
| private: | ||||
|     std::shared_ptr<FileUtil::IOFile> romfs_file; | ||||
|   | ||||
| @@ -14,10 +14,8 @@ namespace Applets { | ||||
|  | ||||
| class Applet { | ||||
| public: | ||||
|     virtual ~Applet() { | ||||
|     } | ||||
|     Applet(Service::APT::AppletId id) : id(id) { | ||||
|     } | ||||
|     virtual ~Applet() {} | ||||
|     Applet(Service::APT::AppletId id) : id(id) {} | ||||
|  | ||||
|     /** | ||||
|      * Creates an instance of the Applet subclass identified by the parameter. | ||||
|   | ||||
| @@ -67,8 +67,7 @@ ResultCode ErrEula::StartImpl(const Service::APT::AppletStartupParameter& parame | ||||
|     return RESULT_SUCCESS; | ||||
| } | ||||
|  | ||||
| void ErrEula::Update() { | ||||
| } | ||||
| void ErrEula::Update() {} | ||||
|  | ||||
| } // namespace Applets | ||||
| } // namespace HLE | ||||
|   | ||||
| @@ -12,8 +12,7 @@ namespace Applets { | ||||
|  | ||||
| class ErrEula final : public Applet { | ||||
| public: | ||||
|     explicit ErrEula(Service::APT::AppletId id) : Applet(id) { | ||||
|     } | ||||
|     explicit ErrEula(Service::APT::AppletId id) : Applet(id) {} | ||||
|  | ||||
|     ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override; | ||||
|     ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override; | ||||
|   | ||||
| @@ -85,7 +85,6 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa | ||||
|     return RESULT_SUCCESS; | ||||
| } | ||||
|  | ||||
| void MiiSelector::Update() { | ||||
| } | ||||
| void MiiSelector::Update() {} | ||||
| } | ||||
| } // namespace | ||||
|   | ||||
| @@ -66,8 +66,7 @@ ASSERT_REG_POSITION(unk_6C, 0x6C); | ||||
|  | ||||
| class MiiSelector final : public Applet { | ||||
| public: | ||||
|     MiiSelector(Service::APT::AppletId id) : Applet(id), started(false) { | ||||
|     } | ||||
|     MiiSelector(Service::APT::AppletId id) : Applet(id), started(false) {} | ||||
|  | ||||
|     ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override; | ||||
|     ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override; | ||||
|   | ||||
| @@ -53,8 +53,7 @@ static_assert(sizeof(SoftwareKeyboardConfig) == 0x400, "Software Keyboard Config | ||||
|  | ||||
| class SoftwareKeyboard final : public Applet { | ||||
| public: | ||||
|     SoftwareKeyboard(Service::APT::AppletId id) : Applet(id), started(false) { | ||||
|     } | ||||
|     SoftwareKeyboard(Service::APT::AppletId id) : Applet(id), started(false) {} | ||||
|  | ||||
|     ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override; | ||||
|     ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override; | ||||
|   | ||||
| @@ -16,10 +16,8 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| AddressArbiter::AddressArbiter() { | ||||
| } | ||||
| AddressArbiter::~AddressArbiter() { | ||||
| } | ||||
| AddressArbiter::AddressArbiter() {} | ||||
| AddressArbiter::~AddressArbiter() {} | ||||
|  | ||||
| SharedPtr<AddressArbiter> AddressArbiter::Create(std::string name) { | ||||
|     SharedPtr<AddressArbiter> address_arbiter(new AddressArbiter); | ||||
|   | ||||
| @@ -10,9 +10,7 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| ClientPort::ClientPort() { | ||||
| } | ||||
| ClientPort::~ClientPort() { | ||||
| } | ||||
| ClientPort::ClientPort() {} | ||||
| ClientPort::~ClientPort() {} | ||||
|  | ||||
| } // namespace | ||||
|   | ||||
| @@ -14,10 +14,8 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| Event::Event() { | ||||
| } | ||||
| Event::~Event() { | ||||
| } | ||||
| Event::Event() {} | ||||
| Event::~Event() {} | ||||
|  | ||||
| SharedPtr<Event> Event::Create(ResetType reset_type, std::string name) { | ||||
|     SharedPtr<Event> evt(new Event); | ||||
|   | ||||
| @@ -58,8 +58,7 @@ enum { | ||||
|  | ||||
| class Object : NonCopyable { | ||||
| public: | ||||
|     virtual ~Object() { | ||||
|     } | ||||
|     virtual ~Object() {} | ||||
|  | ||||
|     /// Returns a unique identifier for the object. For debugging purposes only. | ||||
|     unsigned int GetObjectId() const { | ||||
|   | ||||
| @@ -33,10 +33,8 @@ void ReleaseThreadMutexes(Thread* thread) { | ||||
|     thread->held_mutexes.clear(); | ||||
| } | ||||
|  | ||||
| Mutex::Mutex() { | ||||
| } | ||||
| Mutex::~Mutex() { | ||||
| } | ||||
| Mutex::Mutex() {} | ||||
| Mutex::~Mutex() {} | ||||
|  | ||||
| SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) { | ||||
|     SharedPtr<Mutex> mutex(new Mutex); | ||||
|   | ||||
| @@ -26,10 +26,8 @@ SharedPtr<CodeSet> CodeSet::Create(std::string name, u64 program_id) { | ||||
|     return codeset; | ||||
| } | ||||
|  | ||||
| CodeSet::CodeSet() { | ||||
| } | ||||
| CodeSet::~CodeSet() { | ||||
| } | ||||
| CodeSet::CodeSet() {} | ||||
| CodeSet::~CodeSet() {} | ||||
|  | ||||
| u32 Process::next_process_id; | ||||
|  | ||||
| @@ -282,10 +280,8 @@ ResultCode Process::LinearFree(VAddr target, u32 size) { | ||||
|     return RESULT_SUCCESS; | ||||
| } | ||||
|  | ||||
| Kernel::Process::Process() { | ||||
| } | ||||
| Kernel::Process::~Process() { | ||||
| } | ||||
| Kernel::Process::Process() {} | ||||
| Kernel::Process::~Process() {} | ||||
|  | ||||
| SharedPtr<Process> g_current_process; | ||||
| } | ||||
|   | ||||
| @@ -12,10 +12,8 @@ namespace Kernel { | ||||
|  | ||||
| static SharedPtr<ResourceLimit> resource_limits[4]; | ||||
|  | ||||
| ResourceLimit::ResourceLimit() { | ||||
| } | ||||
| ResourceLimit::~ResourceLimit() { | ||||
| } | ||||
| ResourceLimit::ResourceLimit() {} | ||||
| ResourceLimit::~ResourceLimit() {} | ||||
|  | ||||
| SharedPtr<ResourceLimit> ResourceLimit::Create(std::string name) { | ||||
|     SharedPtr<ResourceLimit> resource_limit(new ResourceLimit); | ||||
| @@ -150,7 +148,6 @@ void ResourceLimitsInit() { | ||||
|     resource_limits[static_cast<u8>(ResourceLimitCategory::OTHER)] = resource_limit; | ||||
| } | ||||
|  | ||||
| void ResourceLimitsShutdown() { | ||||
| } | ||||
| void ResourceLimitsShutdown() {} | ||||
|  | ||||
| } // namespace | ||||
|   | ||||
| @@ -92,8 +92,8 @@ public: | ||||
|     s32 max_cpu_time = 0; | ||||
|  | ||||
|     // TODO(Subv): Increment these in their respective Kernel::T::Create functions, keeping in mind | ||||
|     // that | ||||
|     // APPLICATION resource limits should not be affected by the objects created by service modules. | ||||
|     // that APPLICATION resource limits should not be affected by the objects created by service | ||||
|     // modules. | ||||
|     // Currently we have no way of distinguishing if a Create was called by the running application, | ||||
|     // or by a service module. Approach this once we have separated the service modules into their | ||||
|     // own processes | ||||
|   | ||||
| @@ -10,10 +10,8 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| Semaphore::Semaphore() { | ||||
| } | ||||
| Semaphore::~Semaphore() { | ||||
| } | ||||
| Semaphore::Semaphore() {} | ||||
| Semaphore::~Semaphore() {} | ||||
|  | ||||
| ResultVal<SharedPtr<Semaphore>> Semaphore::Create(s32 initial_count, s32 max_count, | ||||
|                                                   std::string name) { | ||||
|   | ||||
| @@ -13,10 +13,8 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| ServerPort::ServerPort() { | ||||
| } | ||||
| ServerPort::~ServerPort() { | ||||
| } | ||||
| ServerPort::ServerPort() {} | ||||
| ServerPort::~ServerPort() {} | ||||
|  | ||||
| bool ServerPort::ShouldWait() { | ||||
|     // If there are no pending sessions, we wait until a new one is added. | ||||
| @@ -27,8 +25,9 @@ void ServerPort::Acquire() { | ||||
|     ASSERT_MSG(!ShouldWait(), "object unavailable!"); | ||||
| } | ||||
|  | ||||
| std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> | ||||
| ServerPort::CreatePortPair(u32 max_sessions, std::string name) { | ||||
| std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> ServerPort::CreatePortPair( | ||||
|     u32 max_sessions, std::string name) { | ||||
|  | ||||
|     SharedPtr<ServerPort> server_port(new ServerPort); | ||||
|     SharedPtr<ClientPort> client_port(new ClientPort); | ||||
|  | ||||
|   | ||||
| @@ -23,8 +23,8 @@ public: | ||||
|      * @param name Optional name of the ports | ||||
|      * @return The created port tuple | ||||
|      */ | ||||
|     static std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> | ||||
|     CreatePortPair(u32 max_sessions, std::string name = "UnknownPort"); | ||||
|     static std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> CreatePortPair( | ||||
|         u32 max_sessions, std::string name = "UnknownPort"); | ||||
|  | ||||
|     std::string GetTypeName() const override { | ||||
|         return "ServerPort"; | ||||
|   | ||||
| @@ -7,8 +7,6 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| Session::Session() { | ||||
| } | ||||
| Session::~Session() { | ||||
| } | ||||
| Session::Session() {} | ||||
| Session::~Session() {} | ||||
| } | ||||
|   | ||||
| @@ -12,10 +12,8 @@ | ||||
|  | ||||
| namespace Kernel { | ||||
|  | ||||
| SharedMemory::SharedMemory() { | ||||
| } | ||||
| SharedMemory::~SharedMemory() { | ||||
| } | ||||
| SharedMemory::SharedMemory() {} | ||||
| SharedMemory::~SharedMemory() {} | ||||
|  | ||||
| SharedPtr<SharedMemory> SharedMemory::Create(SharedPtr<Process> owner_process, u32 size, | ||||
|                                              MemoryPermission permissions, | ||||
|   | ||||
| @@ -61,10 +61,8 @@ inline static u32 const NewThreadId() { | ||||
|     return next_thread_id++; | ||||
| } | ||||
|  | ||||
| Thread::Thread() { | ||||
| } | ||||
| Thread::~Thread() { | ||||
| } | ||||
| Thread::Thread() {} | ||||
| Thread::~Thread() {} | ||||
|  | ||||
| Thread* GetCurrentThread() { | ||||
|     return current_thread; | ||||
|   | ||||
| @@ -20,10 +20,8 @@ static int timer_callback_event_type; | ||||
| //               us to simply use a pool index or similar. | ||||
| static Kernel::HandleTable timer_callback_handle_table; | ||||
|  | ||||
| Timer::Timer() { | ||||
| } | ||||
| Timer::~Timer() { | ||||
| } | ||||
| Timer::Timer() {} | ||||
| Timer::~Timer() {} | ||||
|  | ||||
| SharedPtr<Timer> Timer::Create(ResetType reset_type, std::string name) { | ||||
|     SharedPtr<Timer> timer(new Timer); | ||||
| @@ -103,7 +101,6 @@ void TimersInit() { | ||||
|     timer_callback_event_type = CoreTiming::RegisterEvent("TimerCallback", TimerCallback); | ||||
| } | ||||
|  | ||||
| void TimersShutdown() { | ||||
| } | ||||
| void TimersShutdown() {} | ||||
|  | ||||
| } // namespace | ||||
|   | ||||
| @@ -213,8 +213,7 @@ union ResultCode { | ||||
|     // error | ||||
|     BitField<31, 1, u32> is_error; | ||||
|  | ||||
|     explicit ResultCode(u32 raw) : raw(raw) { | ||||
|     } | ||||
|     explicit ResultCode(u32 raw) : raw(raw) {} | ||||
|     ResultCode(ErrorDescription description_, ErrorModule module_, ErrorSummary summary_, | ||||
|                ErrorLevel level_) | ||||
|         : raw(0) { | ||||
|   | ||||
| @@ -186,8 +186,7 @@ void Init() { | ||||
|     AddService(new AM_U_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace AM | ||||
|  | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/am/am.h" | ||||
| #include "core/hle/service/am/am_app.h" | ||||
| #include "core/hle/service/am/am.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace AM { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/am/am.h" | ||||
| #include "core/hle/service/am/am_net.h" | ||||
| #include "core/hle/service/am/am.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace AM { | ||||
|   | ||||
| @@ -2,33 +2,35 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/am/am.h" | ||||
| #include "core/hle/service/am/am_sys.h" | ||||
| #include "core/hle/service/am/am.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace AM { | ||||
|  | ||||
| const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "GetTitleCount"}, | ||||
|                                                  {0x00020082, GetTitleList, "GetTitleList"}, | ||||
|                                                  {0x00030084, GetTitleInfo, "GetTitleInfo"}, | ||||
|                                                  {0x000400C0, nullptr, "DeleteApplicationTitle"}, | ||||
|                                                  {0x000500C0, nullptr, "GetTitleProductCode"}, | ||||
|                                                  {0x000600C0, nullptr, "GetTitleExtDataId"}, | ||||
|                                                  {0x00070080, DeleteTicket, "DeleteTicket"}, | ||||
|                                                  {0x00080000, GetTicketCount, "GetTicketCount"}, | ||||
|                                                  {0x00090082, GetTicketList, "GetTicketList"}, | ||||
|                                                  {0x000A0000, nullptr, "GetDeviceID"}, | ||||
|                                                  {0x000D0084, nullptr, "GetPendingTitleInfo"}, | ||||
|                                                  {0x000E00C0, nullptr, "DeletePendingTitle"}, | ||||
|                                                  {0x00140040, nullptr, "FinalizePendingTitles"}, | ||||
|                                                  {0x00150040, nullptr, "DeleteAllPendingTitles"}, | ||||
|                                                  {0x00180080, nullptr, "InitializeTitleDatabase"}, | ||||
|                                                  {0x00190040, nullptr, "ReloadDBS"}, | ||||
|                                                  {0x001A00C0, nullptr, "GetDSiWareExportSize"}, | ||||
|                                                  {0x001B0144, nullptr, "ExportDSiWare"}, | ||||
|                                                  {0x001C0084, nullptr, "ImportDSiWare"}, | ||||
|                                                  {0x00230080, nullptr, "GetPendingTitleCount"}, | ||||
|                                                  {0x002400C2, nullptr, "GetPendingTitleList"}}; | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00010040, GetTitleCount, "GetTitleCount"}, | ||||
|     {0x00020082, GetTitleList, "GetTitleList"}, | ||||
|     {0x00030084, GetTitleInfo, "GetTitleInfo"}, | ||||
|     {0x000400C0, nullptr, "DeleteApplicationTitle"}, | ||||
|     {0x000500C0, nullptr, "GetTitleProductCode"}, | ||||
|     {0x000600C0, nullptr, "GetTitleExtDataId"}, | ||||
|     {0x00070080, DeleteTicket, "DeleteTicket"}, | ||||
|     {0x00080000, GetTicketCount, "GetTicketCount"}, | ||||
|     {0x00090082, GetTicketList, "GetTicketList"}, | ||||
|     {0x000A0000, nullptr, "GetDeviceID"}, | ||||
|     {0x000D0084, nullptr, "GetPendingTitleInfo"}, | ||||
|     {0x000E00C0, nullptr, "DeletePendingTitle"}, | ||||
|     {0x00140040, nullptr, "FinalizePendingTitles"}, | ||||
|     {0x00150040, nullptr, "DeleteAllPendingTitles"}, | ||||
|     {0x00180080, nullptr, "InitializeTitleDatabase"}, | ||||
|     {0x00190040, nullptr, "ReloadDBS"}, | ||||
|     {0x001A00C0, nullptr, "GetDSiWareExportSize"}, | ||||
|     {0x001B0144, nullptr, "ExportDSiWare"}, | ||||
|     {0x001C0084, nullptr, "ImportDSiWare"}, | ||||
|     {0x00230080, nullptr, "GetPendingTitleCount"}, | ||||
|     {0x002400C2, nullptr, "GetPendingTitleList"}, | ||||
| }; | ||||
|  | ||||
| AM_SYS_Interface::AM_SYS_Interface() { | ||||
|     Register(FunctionTable); | ||||
|   | ||||
| @@ -2,46 +2,48 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/am/am.h" | ||||
| #include "core/hle/service/am/am_u.h" | ||||
| #include "core/hle/service/am/am.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace AM { | ||||
|  | ||||
| const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "GetTitleCount"}, | ||||
|                                                  {0x00020082, GetTitleList, "GetTitleList"}, | ||||
|                                                  {0x00030084, GetTitleInfo, "GetTitleInfo"}, | ||||
|                                                  {0x000400C0, nullptr, "DeleteApplicationTitle"}, | ||||
|                                                  {0x000500C0, nullptr, "GetTitleProductCode"}, | ||||
|                                                  {0x000600C0, nullptr, "GetTitleExtDataId"}, | ||||
|                                                  {0x00070080, DeleteTicket, "DeleteTicket"}, | ||||
|                                                  {0x00080000, GetTicketCount, "GetTicketCount"}, | ||||
|                                                  {0x00090082, GetTicketList, "GetTicketList"}, | ||||
|                                                  {0x000A0000, nullptr, "GetDeviceID"}, | ||||
|                                                  {0x000D0084, nullptr, "GetPendingTitleInfo"}, | ||||
|                                                  {0x000E00C0, nullptr, "DeletePendingTitle"}, | ||||
|                                                  {0x00140040, nullptr, "FinalizePendingTitles"}, | ||||
|                                                  {0x00150040, nullptr, "DeleteAllPendingTitles"}, | ||||
|                                                  {0x00180080, nullptr, "InitializeTitleDatabase"}, | ||||
|                                                  {0x00190040, nullptr, "ReloadDBS"}, | ||||
|                                                  {0x001A00C0, nullptr, "GetDSiWareExportSize"}, | ||||
|                                                  {0x001B0144, nullptr, "ExportDSiWare"}, | ||||
|                                                  {0x001C0084, nullptr, "ImportDSiWare"}, | ||||
|                                                  {0x00230080, nullptr, "TitleIDListGetTotal2"}, | ||||
|                                                  {0x002400C2, nullptr, "GetTitleIDList2"}, | ||||
|                                                  {0x04010080, nullptr, "InstallFIRM"}, | ||||
|                                                  {0x04020040, nullptr, "StartInstallCIADB0"}, | ||||
|                                                  {0x04030000, nullptr, "StartInstallCIADB1"}, | ||||
|                                                  {0x04040002, nullptr, "AbortCIAInstall"}, | ||||
|                                                  {0x04050002, nullptr, "CloseCIAFinalizeInstall"}, | ||||
|                                                  {0x04060002, nullptr, "CloseCIA"}, | ||||
|                                                  {0x040700C2, nullptr, "FinalizeTitlesInstall"}, | ||||
|                                                  {0x04080042, nullptr, "GetCiaFileInfo"}, | ||||
|                                                  {0x040E00C2, nullptr, "InstallTitlesFinish"}, | ||||
|                                                  {0x040F0000, nullptr, "InstallNATIVEFIRM"}, | ||||
|                                                  {0x041000C0, nullptr, "DeleteTitle"}, | ||||
|                                                  {0x04120000, nullptr, "Initialize"}, | ||||
|                                                  {0x041700C0, nullptr, "MigrateAGBtoSAV"}}; | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00010040, GetTitleCount, "GetTitleCount"}, | ||||
|     {0x00020082, GetTitleList, "GetTitleList"}, | ||||
|     {0x00030084, GetTitleInfo, "GetTitleInfo"}, | ||||
|     {0x000400C0, nullptr, "DeleteApplicationTitle"}, | ||||
|     {0x000500C0, nullptr, "GetTitleProductCode"}, | ||||
|     {0x000600C0, nullptr, "GetTitleExtDataId"}, | ||||
|     {0x00070080, DeleteTicket, "DeleteTicket"}, | ||||
|     {0x00080000, GetTicketCount, "GetTicketCount"}, | ||||
|     {0x00090082, GetTicketList, "GetTicketList"}, | ||||
|     {0x000A0000, nullptr, "GetDeviceID"}, | ||||
|     {0x000D0084, nullptr, "GetPendingTitleInfo"}, | ||||
|     {0x000E00C0, nullptr, "DeletePendingTitle"}, | ||||
|     {0x00140040, nullptr, "FinalizePendingTitles"}, | ||||
|     {0x00150040, nullptr, "DeleteAllPendingTitles"}, | ||||
|     {0x00180080, nullptr, "InitializeTitleDatabase"}, | ||||
|     {0x00190040, nullptr, "ReloadDBS"}, | ||||
|     {0x001A00C0, nullptr, "GetDSiWareExportSize"}, | ||||
|     {0x001B0144, nullptr, "ExportDSiWare"}, | ||||
|     {0x001C0084, nullptr, "ImportDSiWare"}, | ||||
|     {0x00230080, nullptr, "TitleIDListGetTotal2"}, | ||||
|     {0x002400C2, nullptr, "GetTitleIDList2"}, | ||||
|     {0x04010080, nullptr, "InstallFIRM"}, | ||||
|     {0x04020040, nullptr, "StartInstallCIADB0"}, | ||||
|     {0x04030000, nullptr, "StartInstallCIADB1"}, | ||||
|     {0x04040002, nullptr, "AbortCIAInstall"}, | ||||
|     {0x04050002, nullptr, "CloseCIAFinalizeInstall"}, | ||||
|     {0x04060002, nullptr, "CloseCIA"}, | ||||
|     {0x040700C2, nullptr, "FinalizeTitlesInstall"}, | ||||
|     {0x04080042, nullptr, "GetCiaFileInfo"}, | ||||
|     {0x040E00C2, nullptr, "InstallTitlesFinish"}, | ||||
|     {0x040F0000, nullptr, "InstallNATIVEFIRM"}, | ||||
|     {0x041000C0, nullptr, "DeleteTitle"}, | ||||
|     {0x04120000, nullptr, "Initialize"}, | ||||
|     {0x041700C0, nullptr, "MigrateAGBtoSAV"}, | ||||
| }; | ||||
|  | ||||
| AM_U_Interface::AM_U_Interface() { | ||||
|     Register(FunctionTable); | ||||
|   | ||||
| @@ -90,10 +90,8 @@ void GetSharedFont(Service::Interface* self) { | ||||
|     cmd_buff[0] = IPC::MakeHeader(0x44, 2, 2); | ||||
|     cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||||
|     // Since the SharedMemory interface doesn't provide the address at which the memory was | ||||
|     // allocated, | ||||
|     // the real APT service calculates this address by scanning the entire address space (using | ||||
|     // svcQueryMemory) | ||||
|     // and searches for an allocation of the same size as the Shared Font. | ||||
|     // allocated, the real APT service calculates this address by scanning the entire address space | ||||
|     // (using svcQueryMemory) and searches for an allocation of the same size as the Shared Font. | ||||
|     cmd_buff[2] = target_address; | ||||
|     cmd_buff[3] = IPC::CopyHandleDesc(); | ||||
|     cmd_buff[4] = Kernel::g_handle_table.Create(shared_font_mem).MoveFrom(); | ||||
|   | ||||
| @@ -183,12 +183,10 @@ void GetAppletInfo(Service::Interface* self); | ||||
|  | ||||
| /** | ||||
|  * APT::IsRegistered service function. This returns whether the specified AppID is registered with | ||||
|  * NS yet. | ||||
|  * An AppID is "registered" once the process associated with the AppID uses APT:Enable. Home Menu | ||||
|  * uses this | ||||
|  * command to determine when the launched process is running and to determine when to stop using GSP | ||||
|  * etc, | ||||
|  * while displaying the "Nintendo 3DS" loading screen. | ||||
|  * NS yet. An AppID is "registered" once the process associated with the AppID uses APT:Enable. Home | ||||
|  * Menu uses this command to determine when the launched process is running and to determine when to | ||||
|  * stop using GSP, etc., while displaying the "Nintendo 3DS" loading screen. | ||||
|  * | ||||
|  *  Inputs: | ||||
|  *      1 : AppID | ||||
|  *  Outputs: | ||||
| @@ -264,10 +262,10 @@ void GlanceParameter(Service::Interface* self); | ||||
|  * (same flag cleared by APT:ReceiveParameter). | ||||
|  *  Inputs: | ||||
|  *      1 : Flag, when non-zero NS will compare the word after this one with a field in the NS | ||||
|  * state. | ||||
|  *          state. | ||||
|  *      2 : Unknown, this is the same as the first unknown field returned by APT:ReceiveParameter. | ||||
|  *      3 : Flag, when non-zero NS will compare the word after this one with a field in the NS | ||||
|  * state. | ||||
|  *          state. | ||||
|  *      4 : AppID | ||||
|  *  Outputs: | ||||
|  *      0 : Return header | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/apt/apt.h" | ||||
| #include "core/hle/service/apt/apt_a.h" | ||||
| #include "core/hle/service/apt/apt.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace APT { | ||||
| @@ -36,7 +36,8 @@ const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00550040, SetScreenCapPostPermission, "SetScreenCapPostPermission"}, | ||||
|     {0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"}, | ||||
|     {0x01010000, CheckNew3DSApp, "CheckNew3DSApp"}, | ||||
|     {0x01020000, CheckNew3DS, "CheckNew3DS"}}; | ||||
|     {0x01020000, CheckNew3DS, "CheckNew3DS"}, | ||||
| }; | ||||
|  | ||||
| APT_A_Interface::APT_A_Interface() { | ||||
|     Register(FunctionTable); | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/apt/apt.h" | ||||
| #include "core/hle/service/apt/apt_s.h" | ||||
| #include "core/hle/service/apt/apt.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace APT { | ||||
| @@ -96,7 +96,8 @@ const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"}, | ||||
|     {0x00580002, nullptr, "GetProgramID"}, | ||||
|     {0x01010000, CheckNew3DSApp, "CheckNew3DSApp"}, | ||||
|     {0x01020000, CheckNew3DS, "CheckNew3DS"}}; | ||||
|     {0x01020000, CheckNew3DS, "CheckNew3DS"}, | ||||
| }; | ||||
|  | ||||
| APT_S_Interface::APT_S_Interface() { | ||||
|     Register(FunctionTable); | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/apt/apt.h" | ||||
| #include "core/hle/service/apt/apt_u.h" | ||||
| #include "core/hle/service/apt/apt.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace APT { | ||||
| @@ -96,7 +96,8 @@ const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"}, | ||||
|     {0x00580002, nullptr, "GetProgramID"}, | ||||
|     {0x01010000, CheckNew3DSApp, "CheckNew3DSApp"}, | ||||
|     {0x01020000, CheckNew3DS, "CheckNew3DS"}}; | ||||
|     {0x01020000, CheckNew3DS, "CheckNew3DS"}, | ||||
| }; | ||||
|  | ||||
| APT_U_Interface::APT_U_Interface() { | ||||
|     Register(FunctionTable); | ||||
|   | ||||
| @@ -17,8 +17,7 @@ void Init() { | ||||
|     AddService(new BOSS_U_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace BOSS | ||||
|  | ||||
|   | ||||
| @@ -24,14 +24,31 @@ enum class CameraSelect : u8 { | ||||
|     In1Out1 = Out1 | In1, | ||||
|     Out1Out2 = Out1 | Out2, | ||||
|     In1Out2 = In1 | Out2, | ||||
|     All = Out1 | In1 | Out2 | ||||
|     All = Out1 | In1 | Out2, | ||||
| }; | ||||
|  | ||||
| enum class Effect : u8 { None = 0, Mono = 1, Sepia = 2, Negative = 3, Negafilm = 4, Sepia01 = 5 }; | ||||
| enum class Effect : u8 { | ||||
|     None = 0, | ||||
|     Mono = 1, | ||||
|     Sepia = 2, | ||||
|     Negative = 3, | ||||
|     Negafilm = 4, | ||||
|     Sepia01 = 5, | ||||
| }; | ||||
|  | ||||
| enum class Context : u8 { None = 0, A = 1, B = 2, Both = A | B }; | ||||
| enum class Context : u8 { | ||||
|     None = 0, | ||||
|     A = 1, | ||||
|     B = 2, | ||||
|     Both = A | B, | ||||
| }; | ||||
|  | ||||
| enum class Flip : u8 { None = 0, Horizontal = 1, Vertical = 2, Reverse = 3 }; | ||||
| enum class Flip : u8 { | ||||
|     None = 0, | ||||
|     Horizontal = 1, | ||||
|     Vertical = 2, | ||||
|     Reverse = 3, | ||||
| }; | ||||
|  | ||||
| enum class Size : u8 { | ||||
|     VGA = 0, | ||||
| @@ -42,7 +59,7 @@ enum class Size : u8 { | ||||
|     DS_LCD = 5, | ||||
|     DS_LCDx4 = 6, | ||||
|     CTR_TOP_LCD = 7, | ||||
|     CTR_BOTTOM_LCD = QVGA | ||||
|     CTR_BOTTOM_LCD = QVGA, | ||||
| }; | ||||
|  | ||||
| enum class FrameRate : u8 { | ||||
| @@ -58,10 +75,14 @@ enum class FrameRate : u8 { | ||||
|     Rate_30_To_5 = 9, | ||||
|     Rate_15_To_10 = 10, | ||||
|     Rate_20_To_10 = 11, | ||||
|     Rate_30_To_10 = 12 | ||||
|     Rate_30_To_10 = 12, | ||||
| }; | ||||
|  | ||||
| enum class ShutterSoundType : u8 { Normal = 0, Movie = 1, MovieEnd = 2 }; | ||||
| enum class ShutterSoundType : u8 { | ||||
|     Normal = 0, | ||||
|     Movie = 1, | ||||
|     MovieEnd = 2, | ||||
| }; | ||||
|  | ||||
| enum class WhiteBalance : u8 { | ||||
|     BalanceAuto = 0, | ||||
| @@ -77,10 +98,16 @@ enum class WhiteBalance : u8 { | ||||
|     BalanceDaylight = Balance5200K, | ||||
|     BalanceCloudy = Balance6000K, | ||||
|     BalanceHorizon = Balance6000K, | ||||
|     BalanceShade = Balance7000K | ||||
|     BalanceShade = Balance7000K, | ||||
| }; | ||||
|  | ||||
| enum class PhotoMode : u8 { Normal = 0, Portrait = 1, Landscape = 2, Nightview = 3, Letter0 = 4 }; | ||||
| enum class PhotoMode : u8 { | ||||
|     Normal = 0, | ||||
|     Portrait = 1, | ||||
|     Landscape = 2, | ||||
|     Nightview = 3, | ||||
|     Letter0 = 4, | ||||
| }; | ||||
|  | ||||
| enum class LensCorrection : u8 { | ||||
|     Off = 0, | ||||
| @@ -88,7 +115,7 @@ enum class LensCorrection : u8 { | ||||
|     On90 = 2, | ||||
|     Dark = Off, | ||||
|     Normal = On70, | ||||
|     Bright = On90 | ||||
|     Bright = On90, | ||||
| }; | ||||
|  | ||||
| enum class Contrast : u8 { | ||||
| @@ -105,10 +132,13 @@ enum class Contrast : u8 { | ||||
|     Pattern11 = 11, | ||||
|     Low = Pattern05, | ||||
|     Normal = Pattern06, | ||||
|     High = Pattern07 | ||||
|     High = Pattern07, | ||||
| }; | ||||
|  | ||||
| enum class OutputFormat : u8 { YUV422 = 0, RGB565 = 1 }; | ||||
| enum class OutputFormat : u8 { | ||||
|     YUV422 = 0, | ||||
|     RGB565 = 1, | ||||
| }; | ||||
|  | ||||
| /// Stereo camera calibration data. | ||||
| struct StereoCameraCalibrationData { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/cam/cam.h" | ||||
| #include "core/hle/service/cam/cam_u.h" | ||||
| #include "core/hle/service/cam/cam.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace CAM { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/cecd/cecd.h" | ||||
| #include "core/hle/service/cecd/cecd_u.h" | ||||
| #include "core/hle/service/cecd/cecd.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace CECD { | ||||
|   | ||||
| @@ -101,8 +101,9 @@ static const ConsoleCountryInfo COUNTRY_INFO = {{0, 0, 0}, UNITED_STATES_COUNTRY | ||||
|  * Thanks Normmatt for providing this information | ||||
|  */ | ||||
| static const std::array<float, 8> STEREO_CAMERA_SETTINGS = { | ||||
|     {62.0f, 289.0f, 76.80000305175781f, 46.08000183105469f, 10.0f, 5.0f, 55.58000183105469f, | ||||
|      21.56999969482422f}}; | ||||
|     62.0f, 289.0f, 76.80000305175781f, 46.08000183105469f, | ||||
|     10.0f, 5.0f,   55.58000183105469f, 21.56999969482422f, | ||||
| }; | ||||
| static_assert(sizeof(STEREO_CAMERA_SETTINGS) == 0x20, | ||||
|               "STEREO_CAMERA_SETTINGS must be exactly 0x20 bytes"); | ||||
|  | ||||
| @@ -110,8 +111,9 @@ static const u32 CONFIG_SAVEFILE_SIZE = 0x8000; | ||||
| static std::array<u8, CONFIG_SAVEFILE_SIZE> cfg_config_file_buffer; | ||||
|  | ||||
| static Service::FS::ArchiveHandle cfg_system_save_data_archive; | ||||
| static const std::vector<u8> cfg_system_savedata_id = {0x00, 0x00, 0x00, 0x00, | ||||
|                                                        0x17, 0x00, 0x01, 0x00}; | ||||
| static const std::vector<u8> cfg_system_savedata_id = { | ||||
|     0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x01, 0x00, | ||||
| }; | ||||
|  | ||||
| void GetCountryCodeString(Service::Interface* self) { | ||||
|     u32* cmd_buff = Kernel::GetCommandBuffer(); | ||||
| @@ -528,8 +530,7 @@ void Init() { | ||||
|     LoadConfigNANDSaveFile(); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| void SetUsername(const std::u16string& name) { | ||||
|     ASSERT(name.size() <= 10); | ||||
|   | ||||
| @@ -79,7 +79,7 @@ static const std::array<u16, 187> country_codes = {{ | ||||
|     C("CN"), 0,       0,       0,       0,       0,       0,       0,       // 160-167 | ||||
|     C("AE"), C("IN"), C("EG"), C("OM"), C("QA"), C("KW"), C("SA"), C("SY"), // 168-175 | ||||
|     C("BH"), C("JO"), 0,       0,       0,       0,       0,       0,       // 176-183 | ||||
|     C("SM"), C("VA"), C("BM")                                               // 184-186 | ||||
|     C("SM"), C("VA"), C("BM"),                                              // 184-186 | ||||
| }}; | ||||
|  | ||||
| /** | ||||
| @@ -218,8 +218,9 @@ void FormatConfig(Service::Interface* self); | ||||
|  | ||||
| /** | ||||
|  * Reads a block with the specified id and flag from the Config savegame buffer | ||||
|  * and writes the output to output. | ||||
|  * The input size must match exactly the size of the requested block | ||||
|  * and writes the output to output. The input size must match exactly the size of the requested | ||||
|  * block. | ||||
|  * | ||||
|  * @param block_id The id of the block we want to read | ||||
|  * @param size The size of the block we want to read | ||||
|  * @param flag The requested block must have this flag set | ||||
| @@ -230,8 +231,8 @@ ResultCode GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, void* output); | ||||
|  | ||||
| /** | ||||
|  * Reads data from input and writes to a block with the specified id and flag | ||||
|  * in the Config savegame buffer. | ||||
|  * The input size must match exactly the size of the target block | ||||
|  * in the Config savegame buffer. The input size must match exactly the size of the target block. | ||||
|  * | ||||
|  * @param block_id The id of the block we want to write | ||||
|  * @param size The size of the block we want to write | ||||
|  * @param flag The target block must have this flag set | ||||
| @@ -242,8 +243,8 @@ ResultCode SetConfigInfoBlock(u32 block_id, u32 size, u32 flag, const void* inpu | ||||
|  | ||||
| /** | ||||
|  * Creates a block with the specified id and writes the input data to the cfg savegame buffer in | ||||
|  * memory. | ||||
|  * The config savegame file in the filesystem is not updated. | ||||
|  * memory. The config savegame file in the filesystem is not updated. | ||||
|  * | ||||
|  * @param block_id The id of the block we want to create | ||||
|  * @param size The size of the block we want to create | ||||
|  * @param flags The flags of the new block | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/cfg/cfg.h" | ||||
| #include "core/hle/service/cfg/cfg_i.h" | ||||
| #include "core/hle/service/cfg/cfg.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace CFG { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/cfg/cfg.h" | ||||
| #include "core/hle/service/cfg/cfg_s.h" | ||||
| #include "core/hle/service/cfg/cfg.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace CFG { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/cfg/cfg.h" | ||||
| #include "core/hle/service/cfg/cfg_u.h" | ||||
| #include "core/hle/service/cfg/cfg.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace CFG { | ||||
|   | ||||
| @@ -17,8 +17,7 @@ void Init() { | ||||
|     AddService(new DLP_SRVR_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace DLP | ||||
| } // namespace Service | ||||
|   | ||||
| @@ -173,7 +173,9 @@ static void ThrowFatalError(Service::Interface* self) { | ||||
|     cmd_buff[1] = 0; // No error | ||||
| } | ||||
|  | ||||
| const Interface::FunctionInfo FunctionTable[] = {{0x00010800, ThrowFatalError, "ThrowFatalError"}}; | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00010800, ThrowFatalError, "ThrowFatalError"}, | ||||
| }; | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| // Interface class | ||||
|   | ||||
| @@ -108,8 +108,7 @@ void Init() { | ||||
|     AddService(new FRD_U_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace FRD | ||||
|  | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // 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" | ||||
| #include "core/hle/service/frd/frd.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace FRD { | ||||
|   | ||||
| @@ -90,11 +90,9 @@ enum class DirectoryCommand : u32 { | ||||
| }; | ||||
|  | ||||
| File::File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path& path) | ||||
|     : path(path), priority(0), backend(std::move(backend)) { | ||||
| } | ||||
|     : path(path), priority(0), backend(std::move(backend)) {} | ||||
|  | ||||
| File::~File() { | ||||
| } | ||||
| File::~File() {} | ||||
|  | ||||
| ResultVal<bool> File::SyncRequest() { | ||||
|     u32* cmd_buff = Kernel::GetCommandBuffer(); | ||||
| @@ -205,11 +203,9 @@ ResultVal<bool> File::SyncRequest() { | ||||
|  | ||||
| Directory::Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, | ||||
|                      const FileSys::Path& path) | ||||
|     : path(path), backend(std::move(backend)) { | ||||
| } | ||||
|     : path(path), backend(std::move(backend)) {} | ||||
|  | ||||
| Directory::~Directory() { | ||||
| } | ||||
| Directory::~Directory() {} | ||||
|  | ||||
| ResultVal<bool> Directory::SyncRequest() { | ||||
|     u32* cmd_buff = Kernel::GetCommandBuffer(); | ||||
|   | ||||
| @@ -968,7 +968,8 @@ const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x086700C4, nullptr, "ControlSecureSave"}, | ||||
|     {0x08680000, nullptr, "GetMediaType"}, | ||||
|     {0x08690000, nullptr, "GetNandEraseCount"}, | ||||
|     {0x086A0082, nullptr, "ReadNandReport"}}; | ||||
|     {0x086A0082, nullptr, "ReadNandReport"}, | ||||
| }; | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| // Interface class | ||||
|   | ||||
| @@ -29,10 +29,9 @@ const static u32 REGS_BEGIN = 0x1EB00000; | ||||
|  | ||||
| namespace GSP_GPU { | ||||
|  | ||||
| const ResultCode | ||||
|     ERR_GSP_REGS_OUTOFRANGE_OR_MISALIGNED(ErrorDescription::OutofRangeOrMisalignedAddress, | ||||
|                                           ErrorModule::GX, ErrorSummary::InvalidArgument, | ||||
|                                           ErrorLevel::Usage); // 0xE0E02A01 | ||||
| const ResultCode ERR_GSP_REGS_OUTOFRANGE_OR_MISALIGNED( | ||||
|     ErrorDescription::OutofRangeOrMisalignedAddress, ErrorModule::GX, ErrorSummary::InvalidArgument, | ||||
|     ErrorLevel::Usage); // 0xE0E02A01 | ||||
| const ResultCode ERR_GSP_REGS_MISALIGNED(ErrorDescription::MisalignedSize, ErrorModule::GX, | ||||
|                                          ErrorSummary::InvalidArgument, | ||||
|                                          ErrorLevel::Usage); // 0xE0E02BF2 | ||||
|   | ||||
| @@ -9,11 +9,15 @@ | ||||
|  | ||||
| namespace GSP_LCD { | ||||
|  | ||||
| const Interface::FunctionInfo FunctionTable[] = {{0x000F0000, nullptr, "PowerOnAllBacklights"}, | ||||
|                                                  {0x00100000, nullptr, "PowerOffAllBacklights"}, | ||||
|                                                  {0x00110040, nullptr, "PowerOnBacklight"}, | ||||
|                                                  {0x00120040, nullptr, "PowerOffBacklight"}, | ||||
|                                                  {0x00130040, nullptr, "SetLedForceOff"}}; | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|     // clang-format off | ||||
|     {0x000F0000, nullptr, "PowerOnAllBacklights"}, | ||||
|     {0x00100000, nullptr, "PowerOffAllBacklights"}, | ||||
|     {0x00110040, nullptr, "PowerOnBacklight"}, | ||||
|     {0x00120040, nullptr, "PowerOffBacklight"}, | ||||
|     {0x00130040, nullptr, "SetLedForceOff"}, | ||||
|     // clang-format on | ||||
| }; | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| // Interface class | ||||
|   | ||||
| @@ -40,11 +40,10 @@ static int enable_accelerometer_count = 0; // positive means enabled | ||||
| static int enable_gyroscope_count = 0;     // positive means enabled | ||||
|  | ||||
| static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) { | ||||
|     constexpr float TAN30 = 0.577350269, | ||||
|                     TAN60 = | ||||
|                         1 / TAN30; // 30 degree and 60 degree are angular thresholds for directions | ||||
|     constexpr int CIRCLE_PAD_THRESHOLD_SQUARE = | ||||
|         40 * 40; // a circle pad radius greater than 40 will trigger circle pad direction | ||||
|     // 30 degree and 60 degree are angular thresholds for directions | ||||
|     constexpr float TAN30 = 0.577350269, TAN60 = 1 / TAN30; | ||||
|     // a circle pad radius greater than 40 will trigger circle pad direction | ||||
|     constexpr int CIRCLE_PAD_THRESHOLD_SQUARE = 40 * 40; | ||||
|     PadState state; | ||||
|     state.hex = 0; | ||||
|  | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/hid/hid.h" | ||||
| #include "core/hle/service/hid/hid_spvr.h" | ||||
| #include "core/hle/service/hid/hid.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace HID { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/hid/hid.h" | ||||
| #include "core/hle/service/hid/hid_user.h" | ||||
| #include "core/hle/service/hid/hid.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace HID { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/ir/ir.h" | ||||
| #include "core/hle/service/ir/ir_rst.h" | ||||
| #include "core/hle/service/ir/ir.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace IR { | ||||
|   | ||||
| @@ -8,15 +8,26 @@ namespace Service { | ||||
| namespace IR { | ||||
|  | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00010000, nullptr, "Initialize"},           {0x00020000, nullptr, "Shutdown"}, | ||||
|     {0x00030042, nullptr, "StartSendTransfer"},    {0x00040000, nullptr, "WaitSendTransfer"}, | ||||
|     {0x000500C2, nullptr, "StartRecvTransfer"},    {0x00060000, nullptr, "WaitRecvTransfer"}, | ||||
|     {0x00070080, nullptr, "GetRecvTransferCount"}, {0x00080000, nullptr, "GetSendState"}, | ||||
|     {0x00090040, nullptr, "SetBitRate"},           {0x000A0000, nullptr, "GetBitRate"}, | ||||
|     {0x000B0040, nullptr, "SetIRLEDState"},        {0x000C0000, nullptr, "GetIRLEDRecvState"}, | ||||
|     {0x000D0000, nullptr, "GetSendFinishedEvent"}, {0x000E0000, nullptr, "GetRecvFinishedEvent"}, | ||||
|     {0x000F0000, nullptr, "GetTransferState"},     {0x00100000, nullptr, "GetErrorStatus"}, | ||||
|     {0x00110040, nullptr, "SetSleepModeActive"},   {0x00120040, nullptr, "SetSleepModeState"}, | ||||
|     // clang-format off | ||||
|     {0x00010000, nullptr, "Initialize"}, | ||||
|     {0x00020000, nullptr, "Shutdown"}, | ||||
|     {0x00030042, nullptr, "StartSendTransfer"}, | ||||
|     {0x00040000, nullptr, "WaitSendTransfer"}, | ||||
|     {0x000500C2, nullptr, "StartRecvTransfer"}, | ||||
|     {0x00060000, nullptr, "WaitRecvTransfer"}, | ||||
|     {0x00070080, nullptr, "GetRecvTransferCount"}, | ||||
|     {0x00080000, nullptr, "GetSendState"}, | ||||
|     {0x00090040, nullptr, "SetBitRate"}, | ||||
|     {0x000A0000, nullptr, "GetBitRate"}, | ||||
|     {0x000B0040, nullptr, "SetIRLEDState"}, | ||||
|     {0x000C0000, nullptr, "GetIRLEDRecvState"}, | ||||
|     {0x000D0000, nullptr, "GetSendFinishedEvent"}, | ||||
|     {0x000E0000, nullptr, "GetRecvFinishedEvent"}, | ||||
|     {0x000F0000, nullptr, "GetTransferState"}, | ||||
|     {0x00100000, nullptr, "GetErrorStatus"}, | ||||
|     {0x00110040, nullptr, "SetSleepModeActive"}, | ||||
|     {0x00120040, nullptr, "SetSleepModeState"}, | ||||
|     // clang-format off | ||||
| }; | ||||
|  | ||||
| IR_U_Interface::IR_U_Interface() { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/ir/ir.h" | ||||
| #include "core/hle/service/ir/ir_user.h" | ||||
| #include "core/hle/service/ir/ir.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace IR { | ||||
|   | ||||
| @@ -22,21 +22,23 @@ static ResultCode CROFormatError(u32 description) { | ||||
|                       ErrorSummary::WrongArgument, ErrorLevel::Permanent); | ||||
| } | ||||
|  | ||||
| const std::array<int, 17> CROHelper::ENTRY_SIZE{ | ||||
|     {1, // code | ||||
|      1, // data | ||||
|      1, // module name | ||||
|      sizeof(SegmentEntry), sizeof(ExportNamedSymbolEntry), sizeof(ExportIndexedSymbolEntry), | ||||
|      1, // export strings | ||||
|      sizeof(ExportTreeEntry), sizeof(ImportModuleEntry), sizeof(ExternalRelocationEntry), | ||||
|      sizeof(ImportNamedSymbolEntry), sizeof(ImportIndexedSymbolEntry), | ||||
|      sizeof(ImportAnonymousSymbolEntry), | ||||
|      1, // import strings | ||||
|      sizeof(StaticAnonymousSymbolEntry), sizeof(InternalRelocationEntry), | ||||
|      sizeof(StaticRelocationEntry)}}; | ||||
| const std::array<int, 17> CROHelper::ENTRY_SIZE{{ | ||||
|     1, // code | ||||
|     1, // data | ||||
|     1, // module name | ||||
|     sizeof(SegmentEntry), sizeof(ExportNamedSymbolEntry), sizeof(ExportIndexedSymbolEntry), | ||||
|     1, // export strings | ||||
|     sizeof(ExportTreeEntry), sizeof(ImportModuleEntry), sizeof(ExternalRelocationEntry), | ||||
|     sizeof(ImportNamedSymbolEntry), sizeof(ImportIndexedSymbolEntry), | ||||
|     sizeof(ImportAnonymousSymbolEntry), | ||||
|     1, // import strings | ||||
|     sizeof(StaticAnonymousSymbolEntry), sizeof(InternalRelocationEntry), | ||||
|     sizeof(StaticRelocationEntry), | ||||
| }}; | ||||
|  | ||||
| const std::array<CROHelper::HeaderField, 4> CROHelper::FIX_BARRIERS{ | ||||
|     {Fix0Barrier, Fix1Barrier, Fix2Barrier, Fix3Barrier}}; | ||||
| const std::array<CROHelper::HeaderField, 4> CROHelper::FIX_BARRIERS{{ | ||||
|     Fix0Barrier, Fix1Barrier, Fix2Barrier, Fix3Barrier, | ||||
| }}; | ||||
|  | ||||
| VAddr CROHelper::SegmentTagToAddress(SegmentTag segment_tag) const { | ||||
|     u32 segment_num = GetField(SegmentNum); | ||||
| @@ -204,13 +206,14 @@ ResultCode CROHelper::RebaseHeader(u32 cro_size) { | ||||
|         return error; | ||||
|  | ||||
|     // verifies that all offsets are in the correct order | ||||
|     constexpr std::array<HeaderField, 18> OFFSET_ORDER = { | ||||
|         {CodeOffset, ModuleNameOffset, SegmentTableOffset, ExportNamedSymbolTableOffset, | ||||
|          ExportTreeTableOffset, ExportIndexedSymbolTableOffset, ExportStringsOffset, | ||||
|          ImportModuleTableOffset, ExternalRelocationTableOffset, ImportNamedSymbolTableOffset, | ||||
|          ImportIndexedSymbolTableOffset, ImportAnonymousSymbolTableOffset, ImportStringsOffset, | ||||
|          StaticAnonymousSymbolTableOffset, InternalRelocationTableOffset, | ||||
|          StaticRelocationTableOffset, DataOffset, FileSize}}; | ||||
|     constexpr std::array<HeaderField, 18> OFFSET_ORDER = {{ | ||||
|         CodeOffset, ModuleNameOffset, SegmentTableOffset, ExportNamedSymbolTableOffset, | ||||
|         ExportTreeTableOffset, ExportIndexedSymbolTableOffset, ExportStringsOffset, | ||||
|         ImportModuleTableOffset, ExternalRelocationTableOffset, ImportNamedSymbolTableOffset, | ||||
|         ImportIndexedSymbolTableOffset, ImportAnonymousSymbolTableOffset, ImportStringsOffset, | ||||
|         StaticAnonymousSymbolTableOffset, InternalRelocationTableOffset, | ||||
|         StaticRelocationTableOffset, DataOffset, FileSize, | ||||
|     }}; | ||||
|  | ||||
|     u32 prev_offset = GetField(OFFSET_ORDER[0]); | ||||
|     u32 cur_offset; | ||||
|   | ||||
| @@ -40,8 +40,7 @@ static constexpr u32 CRO_HASH_SIZE = 0x80; | ||||
| /// Represents a loaded module (CRO) with interfaces manipulating it. | ||||
| class CROHelper final { | ||||
| public: | ||||
|     explicit CROHelper(VAddr cro_address) : module_address(cro_address) { | ||||
|     } | ||||
|     explicit CROHelper(VAddr cro_address) : module_address(cro_address) {} | ||||
|  | ||||
|     std::string ModuleName() const { | ||||
|         return Memory::ReadCString(GetField(ModuleNameOffset), GetField(ModuleNameSize)); | ||||
| @@ -152,8 +151,7 @@ private: | ||||
|  | ||||
|     /** | ||||
|      * Each item in this enum represents a u32 field in the header begin from address+0x80, | ||||
|      * successively. | ||||
|      * We don't directly use a struct here, to avoid GetPointer, reinterpret_cast, or | ||||
|      * successively. We don't directly use a struct here, to avoid GetPointer, reinterpret_cast, or | ||||
|      * Read/WriteBlock repeatedly. | ||||
|      */ | ||||
|     enum HeaderField { | ||||
| @@ -234,8 +232,7 @@ private: | ||||
|         BitField<4, 28, u32_le> offset_into_segment; | ||||
|  | ||||
|         SegmentTag() = default; | ||||
|         explicit SegmentTag(u32 raw_) : raw(raw_) { | ||||
|         } | ||||
|         explicit SegmentTag(u32 raw_) : raw(raw_) {} | ||||
|     }; | ||||
|  | ||||
|     /// Information of a segment in this module. | ||||
|   | ||||
| @@ -750,11 +750,17 @@ static void Shutdown(Service::Interface* self) { | ||||
| } | ||||
|  | ||||
| const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x000100C2, Initialize, "Initialize"},     {0x00020082, LoadCRR, "LoadCRR"}, | ||||
|     {0x00030042, UnloadCRR, "UnloadCRR"},       {0x000402C2, LoadCRO<false>, "LoadCRO"}, | ||||
|     {0x000500C2, UnloadCRO, "UnloadCRO"},       {0x00060042, LinkCRO, "LinkCRO"}, | ||||
|     {0x00070042, UnlinkCRO, "UnlinkCRO"},       {0x00080042, Shutdown, "Shutdown"}, | ||||
|     // clang-format off | ||||
|     {0x000100C2, Initialize, "Initialize"}, | ||||
|     {0x00020082, LoadCRR, "LoadCRR"}, | ||||
|     {0x00030042, UnloadCRR, "UnloadCRR"}, | ||||
|     {0x000402C2, LoadCRO<false>, "LoadCRO"}, | ||||
|     {0x000500C2, UnloadCRO, "UnloadCRO"}, | ||||
|     {0x00060042, LinkCRO, "LinkCRO"}, | ||||
|     {0x00070042, UnlinkCRO, "UnlinkCRO"}, | ||||
|     {0x00080042, Shutdown, "Shutdown"}, | ||||
|     {0x000902C2, LoadCRO<true>, "LoadCRO_New"}, | ||||
|     // clang-format on | ||||
| }; | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
| @@ -11,12 +11,16 @@ | ||||
| namespace Service { | ||||
| namespace NDM { | ||||
|  | ||||
| enum : u32 { DEFAULT_RETRY_INTERVAL = 10, DEFAULT_SCAN_INTERVAL = 30 }; | ||||
| enum : u32 { | ||||
|     DEFAULT_RETRY_INTERVAL = 10, | ||||
|     DEFAULT_SCAN_INTERVAL = 30, | ||||
| }; | ||||
|  | ||||
| static DaemonMask daemon_bit_mask = DaemonMask::Default; | ||||
| static DaemonMask default_daemon_bit_mask = DaemonMask::Default; | ||||
| static std::array<DaemonStatus, 4> daemon_status = {DaemonStatus::Idle, DaemonStatus::Idle, | ||||
|                                                     DaemonStatus::Idle, DaemonStatus::Idle}; | ||||
| static std::array<DaemonStatus, 4> daemon_status = { | ||||
|     DaemonStatus::Idle, DaemonStatus::Idle, DaemonStatus::Idle, DaemonStatus::Idle, | ||||
| }; | ||||
| static ExclusiveState exclusive_state = ExclusiveState::None; | ||||
| static u32 scan_interval = DEFAULT_SCAN_INTERVAL; | ||||
| static u32 retry_interval = DEFAULT_RETRY_INTERVAL; | ||||
| @@ -227,8 +231,7 @@ void Init() { | ||||
|     AddService(new NDM_U_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace NDM | ||||
| } // namespace Service | ||||
|   | ||||
| @@ -12,7 +12,12 @@ class Interface; | ||||
|  | ||||
| namespace NDM { | ||||
|  | ||||
| enum class Daemon : u32 { Cec = 0, Boss = 1, Nim = 2, Friend = 3 }; | ||||
| enum class Daemon : u32 { | ||||
|     Cec = 0, | ||||
|     Boss = 1, | ||||
|     Nim = 2, | ||||
|     Friend = 3, | ||||
| }; | ||||
|  | ||||
| enum class DaemonMask : u32 { | ||||
|     None = 0, | ||||
| @@ -21,7 +26,7 @@ enum class DaemonMask : u32 { | ||||
|     Nim = (1 << static_cast<u32>(Daemon::Nim)), | ||||
|     Friend = (1 << static_cast<u32>(Daemon::Friend)), | ||||
|     Default = Cec | Friend, | ||||
|     All = Cec | Boss | Nim | Friend | ||||
|     All = Cec | Boss | Nim | Friend, | ||||
| }; | ||||
|  | ||||
| enum class DaemonStatus : u32 { Busy = 0, Idle = 1, Suspending = 2, Suspended = 3 }; | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/ndm/ndm.h" | ||||
| #include "core/hle/service/ndm/ndm_u.h" | ||||
| #include "core/hle/service/ndm/ndm.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace NDM { | ||||
|   | ||||
| @@ -19,8 +19,7 @@ void Init() { | ||||
|     AddService(new NEWS_U_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace NEWS | ||||
|  | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/news/news.h" | ||||
| #include "core/hle/service/news/news_s.h" | ||||
| #include "core/hle/service/news/news.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace NEWS { | ||||
|   | ||||
| @@ -31,8 +31,7 @@ void Init() { | ||||
|     AddService(new NIM_U_Interface); | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace NIM | ||||
|  | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/nim/nim.h" | ||||
| #include "core/hle/service/nim/nim_u.h" | ||||
| #include "core/hle/service/nim/nim.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace NIM { | ||||
|   | ||||
| @@ -144,8 +144,7 @@ void Init() { | ||||
|     } | ||||
| } | ||||
|  | ||||
| void Shutdown() { | ||||
| } | ||||
| void Shutdown() {} | ||||
|  | ||||
| } // namespace PTM | ||||
| } // namespace Service | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/ptm/ptm.h" | ||||
| #include "core/hle/service/ptm/ptm_sysm.h" | ||||
| #include "core/hle/service/ptm/ptm.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace PTM { | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| // Licensed under GPLv2 or any later version | ||||
| // Refer to the license.txt file included. | ||||
|  | ||||
| #include "core/hle/service/ptm/ptm.h" | ||||
| #include "core/hle/service/ptm/ptm_u.h" | ||||
| #include "core/hle/service/ptm/ptm.h" | ||||
|  | ||||
| namespace Service { | ||||
| namespace PTM { | ||||
|   | ||||
| @@ -63,82 +63,84 @@ static const s32 SOCKET_ERROR_VALUE = -1; | ||||
| namespace SOC_U { | ||||
|  | ||||
| /// Holds the translation from system network errors to 3DS network errors | ||||
| static const std::unordered_map<int, int> error_map = {{{E2BIG, 1}, | ||||
|                                                         {ERRNO(EACCES), 2}, | ||||
|                                                         {ERRNO(EADDRINUSE), 3}, | ||||
|                                                         {ERRNO(EADDRNOTAVAIL), 4}, | ||||
|                                                         {ERRNO(EAFNOSUPPORT), 5}, | ||||
|                                                         {ERRNO(EAGAIN), 6}, | ||||
|                                                         {ERRNO(EALREADY), 7}, | ||||
|                                                         {ERRNO(EBADF), 8}, | ||||
|                                                         {EBADMSG, 9}, | ||||
|                                                         {EBUSY, 10}, | ||||
|                                                         {ECANCELED, 11}, | ||||
|                                                         {ECHILD, 12}, | ||||
|                                                         {ERRNO(ECONNABORTED), 13}, | ||||
|                                                         {ERRNO(ECONNREFUSED), 14}, | ||||
|                                                         {ERRNO(ECONNRESET), 15}, | ||||
|                                                         {EDEADLK, 16}, | ||||
|                                                         {ERRNO(EDESTADDRREQ), 17}, | ||||
|                                                         {EDOM, 18}, | ||||
|                                                         {ERRNO(EDQUOT), 19}, | ||||
|                                                         {EEXIST, 20}, | ||||
|                                                         {ERRNO(EFAULT), 21}, | ||||
|                                                         {EFBIG, 22}, | ||||
|                                                         {ERRNO(EHOSTUNREACH), 23}, | ||||
|                                                         {EIDRM, 24}, | ||||
|                                                         {EILSEQ, 25}, | ||||
|                                                         {ERRNO(EINPROGRESS), 26}, | ||||
|                                                         {ERRNO(EINTR), 27}, | ||||
|                                                         {ERRNO(EINVAL), 28}, | ||||
|                                                         {EIO, 29}, | ||||
|                                                         {ERRNO(EISCONN), 30}, | ||||
|                                                         {EISDIR, 31}, | ||||
|                                                         {ERRNO(ELOOP), 32}, | ||||
|                                                         {ERRNO(EMFILE), 33}, | ||||
|                                                         {EMLINK, 34}, | ||||
|                                                         {ERRNO(EMSGSIZE), 35}, | ||||
|                                                         {ERRNO(EMULTIHOP), 36}, | ||||
|                                                         {ERRNO(ENAMETOOLONG), 37}, | ||||
|                                                         {ERRNO(ENETDOWN), 38}, | ||||
|                                                         {ERRNO(ENETRESET), 39}, | ||||
|                                                         {ERRNO(ENETUNREACH), 40}, | ||||
|                                                         {ENFILE, 41}, | ||||
|                                                         {ERRNO(ENOBUFS), 42}, | ||||
|                                                         {ENODATA, 43}, | ||||
|                                                         {ENODEV, 44}, | ||||
|                                                         {ENOENT, 45}, | ||||
|                                                         {ENOEXEC, 46}, | ||||
|                                                         {ENOLCK, 47}, | ||||
|                                                         {ENOLINK, 48}, | ||||
|                                                         {ENOMEM, 49}, | ||||
|                                                         {ENOMSG, 50}, | ||||
|                                                         {ERRNO(ENOPROTOOPT), 51}, | ||||
|                                                         {ENOSPC, 52}, | ||||
|                                                         {ENOSR, 53}, | ||||
|                                                         {ENOSTR, 54}, | ||||
|                                                         {ENOSYS, 55}, | ||||
|                                                         {ERRNO(ENOTCONN), 56}, | ||||
|                                                         {ENOTDIR, 57}, | ||||
|                                                         {ERRNO(ENOTEMPTY), 58}, | ||||
|                                                         {ERRNO(ENOTSOCK), 59}, | ||||
|                                                         {ENOTSUP, 60}, | ||||
|                                                         {ENOTTY, 61}, | ||||
|                                                         {ENXIO, 62}, | ||||
|                                                         {ERRNO(EOPNOTSUPP), 63}, | ||||
|                                                         {EOVERFLOW, 64}, | ||||
|                                                         {EPERM, 65}, | ||||
|                                                         {EPIPE, 66}, | ||||
|                                                         {EPROTO, 67}, | ||||
|                                                         {ERRNO(EPROTONOSUPPORT), 68}, | ||||
|                                                         {ERRNO(EPROTOTYPE), 69}, | ||||
|                                                         {ERANGE, 70}, | ||||
|                                                         {EROFS, 71}, | ||||
|                                                         {ESPIPE, 72}, | ||||
|                                                         {ESRCH, 73}, | ||||
|                                                         {ERRNO(ESTALE), 74}, | ||||
|                                                         {ETIME, 75}, | ||||
|                                                         {ERRNO(ETIMEDOUT), 76}}}; | ||||
| static const std::unordered_map<int, int> error_map = {{ | ||||
|     {E2BIG, 1}, | ||||
|     {ERRNO(EACCES), 2}, | ||||
|     {ERRNO(EADDRINUSE), 3}, | ||||
|     {ERRNO(EADDRNOTAVAIL), 4}, | ||||
|     {ERRNO(EAFNOSUPPORT), 5}, | ||||
|     {ERRNO(EAGAIN), 6}, | ||||
|     {ERRNO(EALREADY), 7}, | ||||
|     {ERRNO(EBADF), 8}, | ||||
|     {EBADMSG, 9}, | ||||
|     {EBUSY, 10}, | ||||
|     {ECANCELED, 11}, | ||||
|     {ECHILD, 12}, | ||||
|     {ERRNO(ECONNABORTED), 13}, | ||||
|     {ERRNO(ECONNREFUSED), 14}, | ||||
|     {ERRNO(ECONNRESET), 15}, | ||||
|     {EDEADLK, 16}, | ||||
|     {ERRNO(EDESTADDRREQ), 17}, | ||||
|     {EDOM, 18}, | ||||
|     {ERRNO(EDQUOT), 19}, | ||||
|     {EEXIST, 20}, | ||||
|     {ERRNO(EFAULT), 21}, | ||||
|     {EFBIG, 22}, | ||||
|     {ERRNO(EHOSTUNREACH), 23}, | ||||
|     {EIDRM, 24}, | ||||
|     {EILSEQ, 25}, | ||||
|     {ERRNO(EINPROGRESS), 26}, | ||||
|     {ERRNO(EINTR), 27}, | ||||
|     {ERRNO(EINVAL), 28}, | ||||
|     {EIO, 29}, | ||||
|     {ERRNO(EISCONN), 30}, | ||||
|     {EISDIR, 31}, | ||||
|     {ERRNO(ELOOP), 32}, | ||||
|     {ERRNO(EMFILE), 33}, | ||||
|     {EMLINK, 34}, | ||||
|     {ERRNO(EMSGSIZE), 35}, | ||||
|     {ERRNO(EMULTIHOP), 36}, | ||||
|     {ERRNO(ENAMETOOLONG), 37}, | ||||
|     {ERRNO(ENETDOWN), 38}, | ||||
|     {ERRNO(ENETRESET), 39}, | ||||
|     {ERRNO(ENETUNREACH), 40}, | ||||
|     {ENFILE, 41}, | ||||
|     {ERRNO(ENOBUFS), 42}, | ||||
|     {ENODATA, 43}, | ||||
|     {ENODEV, 44}, | ||||
|     {ENOENT, 45}, | ||||
|     {ENOEXEC, 46}, | ||||
|     {ENOLCK, 47}, | ||||
|     {ENOLINK, 48}, | ||||
|     {ENOMEM, 49}, | ||||
|     {ENOMSG, 50}, | ||||
|     {ERRNO(ENOPROTOOPT), 51}, | ||||
|     {ENOSPC, 52}, | ||||
|     {ENOSR, 53}, | ||||
|     {ENOSTR, 54}, | ||||
|     {ENOSYS, 55}, | ||||
|     {ERRNO(ENOTCONN), 56}, | ||||
|     {ENOTDIR, 57}, | ||||
|     {ERRNO(ENOTEMPTY), 58}, | ||||
|     {ERRNO(ENOTSOCK), 59}, | ||||
|     {ENOTSUP, 60}, | ||||
|     {ENOTTY, 61}, | ||||
|     {ENXIO, 62}, | ||||
|     {ERRNO(EOPNOTSUPP), 63}, | ||||
|     {EOVERFLOW, 64}, | ||||
|     {EPERM, 65}, | ||||
|     {EPIPE, 66}, | ||||
|     {EPROTO, 67}, | ||||
|     {ERRNO(EPROTONOSUPPORT), 68}, | ||||
|     {ERRNO(EPROTOTYPE), 69}, | ||||
|     {ERANGE, 70}, | ||||
|     {EROFS, 71}, | ||||
|     {ESPIPE, 72}, | ||||
|     {ESRCH, 73}, | ||||
|     {ERRNO(ESTALE), 74}, | ||||
|     {ETIME, 75}, | ||||
|     {ERRNO(ETIMEDOUT), 76}, | ||||
| }}; | ||||
|  | ||||
| /// Converts a network error from platform-specific to 3ds-specific | ||||
| static int TranslateError(int error) { | ||||
|   | ||||
| @@ -79,7 +79,8 @@ const Interface::FunctionInfo FunctionTable[] = { | ||||
|     {0x00190080, nullptr, "ContextSetClientCert"}, | ||||
|     {0x001B0080, nullptr, "ContextClearOpt"}, | ||||
|     {0x001E0040, nullptr, "DestroyContext"}, | ||||
|     {0x001F0082, nullptr, "ContextInitSharedmem"}}; | ||||
|     {0x001F0082, nullptr, "ContextInitSharedmem"}, | ||||
| }; | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| // Interface class | ||||
|   | ||||
| @@ -73,8 +73,8 @@ ResultCode ConversionConfiguration::SetInputLines(u16 lines) { | ||||
|     return RESULT_SUCCESS; | ||||
| } | ||||
|  | ||||
| ResultCode | ||||
| ConversionConfiguration::SetStandardCoefficient(StandardCoefficient standard_coefficient) { | ||||
| ResultCode ConversionConfiguration::SetStandardCoefficient( | ||||
|     StandardCoefficient standard_coefficient) { | ||||
|     size_t index = static_cast<size_t>(standard_coefficient); | ||||
|     if (index >= ARRAY_SIZE(standard_coefficients)) { | ||||
|         return ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::CAM, | ||||
|   | ||||
| @@ -82,8 +82,7 @@ template void Write<u16>(u32 addr, const u16 data); | ||||
| template void Write<u8>(u32 addr, const u8 data); | ||||
|  | ||||
| /// Update hardware | ||||
| void Update() { | ||||
| } | ||||
| void Update() {} | ||||
|  | ||||
| /// Initialize hardware | ||||
| void Init() { | ||||
|   | ||||
| @@ -61,7 +61,7 @@ static void ConvertYUVToRGB(InputFormat input_format, const u8* input_Y, const u | ||||
|             s32 cY = c[0] * Y; | ||||
|  | ||||
|             s32 r = cY + c[1] * V; | ||||
|             s32 g = cY - c[3] * U - c[2] * V; | ||||
|             s32 g = cY - c[2] * V - c[3] * U; | ||||
|             s32 b = cY + c[4] * U; | ||||
|  | ||||
|             const s32 rounding_offset = 0x18; | ||||
| @@ -144,16 +144,30 @@ static void SendData(const u32* input, ConversionBuffer& buf, int amount_of_data | ||||
|     } | ||||
| } | ||||
|  | ||||
| static const u8 linear_lut[64] = { | ||||
|     0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, | ||||
|     22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, | ||||
|     44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, | ||||
| static const u8 linear_lut[TILE_SIZE] = { | ||||
|     // clang-format off | ||||
|      0,  1,  2,  3,  4,  5,  6,  7, | ||||
|      8,  9, 10, 11, 12, 13, 14, 15, | ||||
|     16, 17, 18, 19, 20, 21, 22, 23, | ||||
|     24, 25, 26, 27, 28, 29, 30, 31, | ||||
|     32, 33, 34, 35, 36, 37, 38, 39, | ||||
|     40, 41, 42, 43, 44, 45, 46, 47, | ||||
|     48, 49, 50, 51, 52, 53, 54, 55, | ||||
|     56, 57, 58, 59, 60, 61, 62, 63, | ||||
|     // clang-format on | ||||
| }; | ||||
|  | ||||
| static const u8 morton_lut[64] = { | ||||
|     0,  1,  4,  5,  16, 17, 20, 21, 2,  3,  6,  7,  18, 19, 22, 23, 8,  9,  12, 13, 24, 25, | ||||
|     28, 29, 10, 11, 14, 15, 26, 27, 30, 31, 32, 33, 36, 37, 48, 49, 52, 53, 34, 35, 38, 39, | ||||
|     50, 51, 54, 55, 40, 41, 44, 45, 56, 57, 60, 61, 42, 43, 46, 47, 58, 59, 62, 63, | ||||
| static const u8 morton_lut[TILE_SIZE] = { | ||||
|     // clang-format off | ||||
|      0,  1,  4,  5, 16, 17, 20, 21, | ||||
|      2,  3,  6,  7, 18, 19, 22, 23, | ||||
|      8,  9, 12, 13, 24, 25, 28, 29, | ||||
|     10, 11, 14, 15, 26, 27, 30, 31, | ||||
|     32, 33, 36, 37, 48, 49, 52, 53, | ||||
|     34, 35, 38, 39, 50, 51, 54, 55, | ||||
|     40, 41, 44, 45, 56, 57, 60, 61, | ||||
|     42, 43, 46, 47, 58, 59, 62, 63, | ||||
|     // clang-format on | ||||
| }; | ||||
|  | ||||
| static void RotateTile0(const ImageTile& input, ImageTile& output, int height, | ||||
|   | ||||
| @@ -19,8 +19,7 @@ class AppLoader_THREEDSX final : public AppLoader { | ||||
| public: | ||||
|     AppLoader_THREEDSX(FileUtil::IOFile&& file, const std::string& filename, | ||||
|                        const std::string& filepath) | ||||
|         : AppLoader(std::move(file)), filename(std::move(filename)), filepath(filepath) { | ||||
|     } | ||||
|         : AppLoader(std::move(file)), filename(std::move(filename)), filepath(filepath) {} | ||||
|  | ||||
|     /** | ||||
|      * Returns the type of the file | ||||
|   | ||||
| @@ -18,8 +18,7 @@ namespace Loader { | ||||
| class AppLoader_ELF final : public AppLoader { | ||||
| public: | ||||
|     AppLoader_ELF(FileUtil::IOFile&& file, std::string filename) | ||||
|         : AppLoader(std::move(file)), filename(std::move(filename)) { | ||||
|     } | ||||
|         : AppLoader(std::move(file)), filename(std::move(filename)) {} | ||||
|  | ||||
|     /** | ||||
|      * Returns the type of the file | ||||
|   | ||||
| @@ -81,10 +81,8 @@ constexpr u32 MakeMagic(char a, char b, char c, char d) { | ||||
| /// Interface for loading an application | ||||
| class AppLoader : NonCopyable { | ||||
| public: | ||||
|     AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) { | ||||
|     } | ||||
|     virtual ~AppLoader() { | ||||
|     } | ||||
|     AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) {} | ||||
|     virtual ~AppLoader() {} | ||||
|  | ||||
|     /** | ||||
|      * Returns the type of this file | ||||
|   | ||||
| @@ -164,8 +164,7 @@ namespace Loader { | ||||
| class AppLoader_NCCH final : public AppLoader { | ||||
| public: | ||||
|     AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath) | ||||
|         : AppLoader(std::move(file)), filepath(filepath) { | ||||
|     } | ||||
|         : AppLoader(std::move(file)), filepath(filepath) {} | ||||
|  | ||||
|     /** | ||||
|      * Returns the type of the file | ||||
|   | ||||
| @@ -76,7 +76,12 @@ struct CTMemoryLoad { | ||||
| struct CTRegisterWrite { | ||||
|     u32 physical_address; | ||||
|  | ||||
|     enum : u32 { SIZE_8 = 0xD1, SIZE_16 = 0xD2, SIZE_32 = 0xD3, SIZE_64 = 0xD4 } size; | ||||
|     enum : u32 { | ||||
|         SIZE_8 = 0xD1, | ||||
|         SIZE_16 = 0xD2, | ||||
|         SIZE_32 = 0xD3, | ||||
|         SIZE_64 = 0xD4, | ||||
|     } size; | ||||
|  | ||||
|     // TODO: Make it clearer which bits of this member are used for sizes other than 32 bits | ||||
|     u64 value; | ||||
|   | ||||
| @@ -12,8 +12,7 @@ | ||||
|  | ||||
| namespace CiTrace { | ||||
|  | ||||
| Recorder::Recorder(const InitialState& initial_state) : initial_state(initial_state) { | ||||
| } | ||||
| Recorder::Recorder(const InitialState& initial_state) : initial_state(initial_state) {} | ||||
|  | ||||
| void Recorder::Finish(const std::string& filename) { | ||||
|     // Setup CiTrace header | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yuri Kunde Schlesner
					Yuri Kunde Schlesner