diff options
| author | 2018-01-20 00:48:02 -0700 | |
|---|---|---|
| committer | 2018-01-20 16:45:11 -0700 | |
| commit | 096be1663682f38d572e9816e3350e0dc9f13168 (patch) | |
| tree | a2f695170d9a3e0e98cebf823087cdb65d5af00f /src | |
| parent | CMake: Conditionally turn on bundled libs for MSVC (diff) | |
| download | yuzu-096be1663682f38d572e9816e3350e0dc9f13168.tar.gz yuzu-096be1663682f38d572e9816e3350e0dc9f13168.tar.xz yuzu-096be1663682f38d572e9816e3350e0dc9f13168.zip | |
Format: Run the new clang format on everything
Diffstat (limited to 'src')
74 files changed, 207 insertions, 117 deletions
diff --git a/src/common/bit_set.h b/src/common/bit_set.h index 9c2e6b28c..84e3cbe58 100644 --- a/src/common/bit_set.h +++ b/src/common/bit_set.h | |||
| @@ -236,7 +236,7 @@ public: | |||
| 236 | IntTy m_val; | 236 | IntTy m_val; |
| 237 | }; | 237 | }; |
| 238 | 238 | ||
| 239 | } // Common | 239 | } // namespace Common |
| 240 | 240 | ||
| 241 | typedef Common::BitSet<u8> BitSet8; | 241 | typedef Common::BitSet<u8> BitSet8; |
| 242 | typedef Common::BitSet<u16> BitSet16; | 242 | typedef Common::BitSet<u16> BitSet16; |
diff --git a/src/common/chunk_file.h b/src/common/chunk_file.h index 5145a3657..972ef9039 100644 --- a/src/common/chunk_file.h +++ b/src/common/chunk_file.h | |||
| @@ -607,8 +607,9 @@ public: | |||
| 607 | u32 cookie = arbitraryNumber; | 607 | u32 cookie = arbitraryNumber; |
| 608 | Do(cookie); | 608 | Do(cookie); |
| 609 | if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) { | 609 | if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) { |
| 610 | LOG_ERROR(Common, "After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). " | 610 | LOG_ERROR(Common, |
| 611 | "Aborting savestate load...", | 611 | "After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). " |
| 612 | "Aborting savestate load...", | ||
| 612 | prevName, cookie, cookie, arbitraryNumber, arbitraryNumber); | 613 | prevName, cookie, cookie, arbitraryNumber, arbitraryNumber); |
| 613 | SetError(ERROR_FAILURE); | 614 | SetError(ERROR_FAILURE); |
| 614 | } | 615 | } |
diff --git a/src/common/color.h b/src/common/color.h index 4ebd4f3d0..24a445dac 100644 --- a/src/common/color.h +++ b/src/common/color.h | |||
| @@ -256,4 +256,4 @@ inline void EncodeX24S8(u8 stencil, u8* bytes) { | |||
| 256 | bytes[3] = stencil; | 256 | bytes[3] = stencil; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | } // namespace | 259 | } // namespace Color |
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 5ab036b34..4e1d702f7 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -873,20 +873,19 @@ bool IOFile::Flush() { | |||
| 873 | } | 873 | } |
| 874 | 874 | ||
| 875 | bool IOFile::Resize(u64 size) { | 875 | bool IOFile::Resize(u64 size) { |
| 876 | if (!IsOpen() || | 876 | if (!IsOpen() || 0 != |
| 877 | 0 != | ||
| 878 | #ifdef _WIN32 | 877 | #ifdef _WIN32 |
| 879 | // ector: _chsize sucks, not 64-bit safe | 878 | // ector: _chsize sucks, not 64-bit safe |
| 880 | // F|RES: changed to _chsize_s. i think it is 64-bit safe | 879 | // F|RES: changed to _chsize_s. i think it is 64-bit safe |
| 881 | _chsize_s(_fileno(m_file), size) | 880 | _chsize_s(_fileno(m_file), size) |
| 882 | #else | 881 | #else |
| 883 | // TODO: handle 64bit and growing | 882 | // TODO: handle 64bit and growing |
| 884 | ftruncate(fileno(m_file), size) | 883 | ftruncate(fileno(m_file), size) |
| 885 | #endif | 884 | #endif |
| 886 | ) | 885 | ) |
| 887 | m_good = false; | 886 | m_good = false; |
| 888 | 887 | ||
| 889 | return m_good; | 888 | return m_good; |
| 890 | } | 889 | } |
| 891 | 890 | ||
| 892 | } // namespace | 891 | } // namespace FileUtil |
diff --git a/src/common/file_util.h b/src/common/file_util.h index 94adfcd7e..630232a25 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -253,7 +253,7 @@ private: | |||
| 253 | bool m_good = true; | 253 | bool m_good = true; |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | } // namespace | 256 | } // namespace FileUtil |
| 257 | 257 | ||
| 258 | // To deal with Windows being dumb at unicode: | 258 | // To deal with Windows being dumb at unicode: |
| 259 | template <typename T> | 259 | template <typename T> |
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index ba0acfb72..e136482b6 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -132,4 +132,4 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned | |||
| 132 | 132 | ||
| 133 | PrintColoredMessage(entry); | 133 | PrintColoredMessage(entry); |
| 134 | } | 134 | } |
| 135 | } | 135 | } // namespace Log |
diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h index c4fe2acbf..70744e3e5 100644 --- a/src/common/logging/backend.h +++ b/src/common/logging/backend.h | |||
| @@ -47,4 +47,4 @@ Entry CreateEntry(Class log_class, Level log_level, const char* filename, unsign | |||
| 47 | const char* function, const char* format, va_list args); | 47 | const char* function, const char* format, va_list args); |
| 48 | 48 | ||
| 49 | void SetFilter(Filter* filter); | 49 | void SetFilter(Filter* filter); |
| 50 | } | 50 | } // namespace Log |
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 12e5bb45d..733247b51 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp | |||
| @@ -94,4 +94,4 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, | |||
| 94 | bool Filter::CheckMessage(Class log_class, Level level) const { | 94 | bool Filter::CheckMessage(Class log_class, Level level) const { |
| 95 | return static_cast<u8>(level) >= static_cast<u8>(class_levels[static_cast<size_t>(log_class)]); | 95 | return static_cast<u8>(level) >= static_cast<u8>(class_levels[static_cast<size_t>(log_class)]); |
| 96 | } | 96 | } |
| 97 | } | 97 | } // namespace Log |
diff --git a/src/common/logging/filter.h b/src/common/logging/filter.h index b51df61de..16fa72642 100644 --- a/src/common/logging/filter.h +++ b/src/common/logging/filter.h | |||
| @@ -50,4 +50,4 @@ public: | |||
| 50 | private: | 50 | private: |
| 51 | std::array<Level, (size_t)Class::Count> class_levels; | 51 | std::array<Level, (size_t)Class::Count> class_levels; |
| 52 | }; | 52 | }; |
| 53 | } | 53 | } // namespace Log |
diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index f71e748d1..e7e46c76b 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp | |||
| @@ -129,4 +129,4 @@ void PrintColoredMessage(const Entry& entry) { | |||
| 129 | #undef ESC | 129 | #undef ESC |
| 130 | #endif | 130 | #endif |
| 131 | } | 131 | } |
| 132 | } | 132 | } // namespace Log |
diff --git a/src/common/logging/text_formatter.h b/src/common/logging/text_formatter.h index 749268310..66e86d9ec 100644 --- a/src/common/logging/text_formatter.h +++ b/src/common/logging/text_formatter.h | |||
| @@ -28,4 +28,4 @@ void FormatLogMessage(const Entry& entry, char* out_text, size_t text_len); | |||
| 28 | void PrintMessage(const Entry& entry); | 28 | void PrintMessage(const Entry& entry); |
| 29 | /// Prints the same message as `PrintMessage`, but colored acoording to the severity level. | 29 | /// Prints the same message as `PrintMessage`, but colored acoording to the severity level. |
| 30 | void PrintColoredMessage(const Entry& entry); | 30 | void PrintColoredMessage(const Entry& entry); |
| 31 | } | 31 | } // namespace Log |
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index c19729b21..759ad02ca 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp | |||
| @@ -40,11 +40,12 @@ void* AllocateExecutableMemory(size_t size, bool low) { | |||
| 40 | if (low && (!map_hint)) | 40 | if (low && (!map_hint)) |
| 41 | map_hint = (char*)round_page(512 * 1024 * 1024); /* 0.5 GB rounded up to the next page */ | 41 | map_hint = (char*)round_page(512 * 1024 * 1024); /* 0.5 GB rounded up to the next page */ |
| 42 | #endif | 42 | #endif |
| 43 | void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE | 43 | void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, |
| 44 | MAP_ANON | MAP_PRIVATE | ||
| 44 | #if defined(ARCHITECTURE_X64) && defined(MAP_32BIT) | 45 | #if defined(ARCHITECTURE_X64) && defined(MAP_32BIT) |
| 45 | | (low ? MAP_32BIT : 0) | 46 | | (low ? MAP_32BIT : 0) |
| 46 | #endif | 47 | #endif |
| 47 | , | 48 | , |
| 48 | -1, 0); | 49 | -1, 0); |
| 49 | #endif /* defined(_WIN32) */ | 50 | #endif /* defined(_WIN32) */ |
| 50 | 51 | ||
diff --git a/src/common/quaternion.h b/src/common/quaternion.h index 77f626bcb..ea39298c1 100644 --- a/src/common/quaternion.h +++ b/src/common/quaternion.h | |||
| @@ -46,4 +46,4 @@ inline Quaternion<float> MakeQuaternion(const Math::Vec3<float>& axis, float ang | |||
| 46 | return {axis * std::sin(angle / 2), std::cos(angle / 2)}; | 46 | return {axis * std::sin(angle / 2), std::cos(angle / 2)}; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | } // namspace Math | 49 | } // namespace Math |
diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h index 18aaa1735..db0f4a947 100644 --- a/src/common/scm_rev.h +++ b/src/common/scm_rev.h | |||
| @@ -12,4 +12,4 @@ extern const char g_scm_desc[]; | |||
| 12 | extern const char g_build_name[]; | 12 | extern const char g_build_name[]; |
| 13 | extern const char g_build_date[]; | 13 | extern const char g_build_date[]; |
| 14 | 14 | ||
| 15 | } // namespace | 15 | } // namespace Common |
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index 072ab285d..baf1f1c9e 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h | |||
| @@ -22,7 +22,7 @@ template <typename Func> | |||
| 22 | ScopeExitHelper<Func> ScopeExit(Func&& func) { | 22 | ScopeExitHelper<Func> ScopeExit(Func&& func) { |
| 23 | return ScopeExitHelper<Func>(std::move(func)); | 23 | return ScopeExitHelper<Func>(std::move(func)); |
| 24 | } | 24 | } |
| 25 | } | 25 | } // namespace detail |
| 26 | 26 | ||
| 27 | /** | 27 | /** |
| 28 | * This macro allows you to conveniently specify a block of code that will run on scope exit. Handy | 28 | * This macro allows you to conveniently specify a block of code that will run on scope exit. Handy |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 6959915fa..e9a2a6b00 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -202,7 +202,7 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _ | |||
| 202 | #ifdef _WIN32 | 202 | #ifdef _WIN32 |
| 203 | ":" | 203 | ":" |
| 204 | #endif | 204 | #endif |
| 205 | ); | 205 | ); |
| 206 | if (std::string::npos == dir_end) | 206 | if (std::string::npos == dir_end) |
| 207 | dir_end = 0; | 207 | dir_end = 0; |
| 208 | else | 208 | else |
| @@ -462,4 +462,4 @@ std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, size_t max_l | |||
| 462 | 462 | ||
| 463 | return std::string(buffer, len); | 463 | return std::string(buffer, len); |
| 464 | } | 464 | } |
| 465 | } | 465 | } // namespace Common |
diff --git a/src/common/string_util.h b/src/common/string_util.h index 259360aec..ceb8df48e 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -134,4 +134,4 @@ bool ComparePartialString(InIt begin, InIt end, const char* other) { | |||
| 134 | * NUL-terminated then the string ends at max_len characters. | 134 | * NUL-terminated then the string ends at max_len characters. |
| 135 | */ | 135 | */ |
| 136 | std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, size_t max_len); | 136 | std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, size_t max_len); |
| 137 | } | 137 | } // namespace Common |
diff --git a/src/common/thread_queue_list.h b/src/common/thread_queue_list.h index edd0e4a3f..38a450d69 100644 --- a/src/common/thread_queue_list.h +++ b/src/common/thread_queue_list.h | |||
| @@ -158,4 +158,4 @@ private: | |||
| 158 | std::array<Queue, NUM_QUEUES> queues; | 158 | std::array<Queue, NUM_QUEUES> queues; |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | } // namespace | 161 | } // namespace Common |
diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h index 6090d93e1..fd3fbdd4b 100644 --- a/src/common/x64/xbyak_abi.h +++ b/src/common/x64/xbyak_abi.h | |||
| @@ -60,20 +60,41 @@ const Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9; | |||
| 60 | 60 | ||
| 61 | const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({ | 61 | const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({ |
| 62 | // GPRs | 62 | // GPRs |
| 63 | Xbyak::util::rcx, Xbyak::util::rdx, Xbyak::util::r8, Xbyak::util::r9, Xbyak::util::r10, | 63 | Xbyak::util::rcx, |
| 64 | Xbyak::util::rdx, | ||
| 65 | Xbyak::util::r8, | ||
| 66 | Xbyak::util::r9, | ||
| 67 | Xbyak::util::r10, | ||
| 64 | Xbyak::util::r11, | 68 | Xbyak::util::r11, |
| 65 | // XMMs | 69 | // XMMs |
| 66 | Xbyak::util::xmm0, Xbyak::util::xmm1, Xbyak::util::xmm2, Xbyak::util::xmm3, Xbyak::util::xmm4, | 70 | Xbyak::util::xmm0, |
| 71 | Xbyak::util::xmm1, | ||
| 72 | Xbyak::util::xmm2, | ||
| 73 | Xbyak::util::xmm3, | ||
| 74 | Xbyak::util::xmm4, | ||
| 67 | Xbyak::util::xmm5, | 75 | Xbyak::util::xmm5, |
| 68 | }); | 76 | }); |
| 69 | 77 | ||
| 70 | const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({ | 78 | const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({ |
| 71 | // GPRs | 79 | // GPRs |
| 72 | Xbyak::util::rbx, Xbyak::util::rsi, Xbyak::util::rdi, Xbyak::util::rbp, Xbyak::util::r12, | 80 | Xbyak::util::rbx, |
| 73 | Xbyak::util::r13, Xbyak::util::r14, Xbyak::util::r15, | 81 | Xbyak::util::rsi, |
| 82 | Xbyak::util::rdi, | ||
| 83 | Xbyak::util::rbp, | ||
| 84 | Xbyak::util::r12, | ||
| 85 | Xbyak::util::r13, | ||
| 86 | Xbyak::util::r14, | ||
| 87 | Xbyak::util::r15, | ||
| 74 | // XMMs | 88 | // XMMs |
| 75 | Xbyak::util::xmm6, Xbyak::util::xmm7, Xbyak::util::xmm8, Xbyak::util::xmm9, Xbyak::util::xmm10, | 89 | Xbyak::util::xmm6, |
| 76 | Xbyak::util::xmm11, Xbyak::util::xmm12, Xbyak::util::xmm13, Xbyak::util::xmm14, | 90 | Xbyak::util::xmm7, |
| 91 | Xbyak::util::xmm8, | ||
| 92 | Xbyak::util::xmm9, | ||
| 93 | Xbyak::util::xmm10, | ||
| 94 | Xbyak::util::xmm11, | ||
| 95 | Xbyak::util::xmm12, | ||
| 96 | Xbyak::util::xmm13, | ||
| 97 | Xbyak::util::xmm14, | ||
| 77 | Xbyak::util::xmm15, | 98 | Xbyak::util::xmm15, |
| 78 | }); | 99 | }); |
| 79 | 100 | ||
| @@ -90,18 +111,40 @@ const Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx; | |||
| 90 | 111 | ||
| 91 | const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({ | 112 | const BitSet32 ABI_ALL_CALLER_SAVED = BuildRegSet({ |
| 92 | // GPRs | 113 | // GPRs |
| 93 | Xbyak::util::rcx, Xbyak::util::rdx, Xbyak::util::rdi, Xbyak::util::rsi, Xbyak::util::r8, | 114 | Xbyak::util::rcx, |
| 94 | Xbyak::util::r9, Xbyak::util::r10, Xbyak::util::r11, | 115 | Xbyak::util::rdx, |
| 116 | Xbyak::util::rdi, | ||
| 117 | Xbyak::util::rsi, | ||
| 118 | Xbyak::util::r8, | ||
| 119 | Xbyak::util::r9, | ||
| 120 | Xbyak::util::r10, | ||
| 121 | Xbyak::util::r11, | ||
| 95 | // XMMs | 122 | // XMMs |
| 96 | Xbyak::util::xmm0, Xbyak::util::xmm1, Xbyak::util::xmm2, Xbyak::util::xmm3, Xbyak::util::xmm4, | 123 | Xbyak::util::xmm0, |
| 97 | Xbyak::util::xmm5, Xbyak::util::xmm6, Xbyak::util::xmm7, Xbyak::util::xmm8, Xbyak::util::xmm9, | 124 | Xbyak::util::xmm1, |
| 98 | Xbyak::util::xmm10, Xbyak::util::xmm11, Xbyak::util::xmm12, Xbyak::util::xmm13, | 125 | Xbyak::util::xmm2, |
| 99 | Xbyak::util::xmm14, Xbyak::util::xmm15, | 126 | Xbyak::util::xmm3, |
| 127 | Xbyak::util::xmm4, | ||
| 128 | Xbyak::util::xmm5, | ||
| 129 | Xbyak::util::xmm6, | ||
| 130 | Xbyak::util::xmm7, | ||
| 131 | Xbyak::util::xmm8, | ||
| 132 | Xbyak::util::xmm9, | ||
| 133 | Xbyak::util::xmm10, | ||
| 134 | Xbyak::util::xmm11, | ||
| 135 | Xbyak::util::xmm12, | ||
| 136 | Xbyak::util::xmm13, | ||
| 137 | Xbyak::util::xmm14, | ||
| 138 | Xbyak::util::xmm15, | ||
| 100 | }); | 139 | }); |
| 101 | 140 | ||
| 102 | const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({ | 141 | const BitSet32 ABI_ALL_CALLEE_SAVED = BuildRegSet({ |
| 103 | // GPRs | 142 | // GPRs |
| 104 | Xbyak::util::rbx, Xbyak::util::rbp, Xbyak::util::r12, Xbyak::util::r13, Xbyak::util::r14, | 143 | Xbyak::util::rbx, |
| 144 | Xbyak::util::rbp, | ||
| 145 | Xbyak::util::r12, | ||
| 146 | Xbyak::util::r13, | ||
| 147 | Xbyak::util::r14, | ||
| 105 | Xbyak::util::r15, | 148 | Xbyak::util::r15, |
| 106 | }); | 149 | }); |
| 107 | 150 | ||
diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cpp index 87a240d7a..fc472b44f 100644 --- a/src/core/file_sys/archive_backend.cpp +++ b/src/core/file_sys/archive_backend.cpp | |||
| @@ -119,4 +119,4 @@ std::vector<u8> Path::AsBinary() const { | |||
| 119 | return {}; | 119 | return {}; |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | } | 122 | } // namespace FileSys |
diff --git a/src/core/gdbstub/gdbstub.h b/src/core/gdbstub/gdbstub.h index 8f12c6a1d..201fca095 100644 --- a/src/core/gdbstub/gdbstub.h +++ b/src/core/gdbstub/gdbstub.h | |||
| @@ -91,4 +91,4 @@ bool GetCpuStepFlag(); | |||
| 91 | * @param is_step | 91 | * @param is_step |
| 92 | */ | 92 | */ |
| 93 | void SetCpuStepFlag(bool is_step); | 93 | void SetCpuStepFlag(bool is_step); |
| 94 | } | 94 | } // namespace GDBStub |
diff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cpp index e386ccdc6..038af7909 100644 --- a/src/core/hle/config_mem.cpp +++ b/src/core/hle/config_mem.cpp | |||
| @@ -28,4 +28,4 @@ void Init() { | |||
| 28 | config_mem.firm_ctr_sdk_ver = 0x0000F297; | 28 | config_mem.firm_ctr_sdk_ver = 0x0000F297; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | } // namespace | 31 | } // namespace ConfigMem |
diff --git a/src/core/hle/config_mem.h b/src/core/hle/config_mem.h index 42fa6d789..1840d1760 100644 --- a/src/core/hle/config_mem.h +++ b/src/core/hle/config_mem.h | |||
| @@ -53,4 +53,4 @@ extern ConfigMemDef config_mem; | |||
| 53 | 53 | ||
| 54 | void Init(); | 54 | void Init(); |
| 55 | 55 | ||
| 56 | } // namespace | 56 | } // namespace ConfigMem |
diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index 1d24401b1..f902ddf2d 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h | |||
| @@ -57,4 +57,4 @@ private: | |||
| 57 | ~AddressArbiter() override; | 57 | ~AddressArbiter() override; |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | } // namespace FileSys | 60 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/client_port.cpp b/src/core/hle/kernel/client_port.cpp index ce5d94e99..fb2b6f7a3 100644 --- a/src/core/hle/kernel/client_port.cpp +++ b/src/core/hle/kernel/client_port.cpp | |||
| @@ -39,4 +39,4 @@ ResultVal<SharedPtr<ClientSession>> ClientPort::Connect() { | |||
| 39 | return MakeResult(std::get<SharedPtr<ClientSession>>(sessions)); | 39 | return MakeResult(std::get<SharedPtr<ClientSession>>(sessions)); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | } // namespace | 42 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/client_port.h b/src/core/hle/kernel/client_port.h index 8f7d6ac44..a829aeb6d 100644 --- a/src/core/hle/kernel/client_port.h +++ b/src/core/hle/kernel/client_port.h | |||
| @@ -47,4 +47,4 @@ private: | |||
| 47 | ~ClientPort() override; | 47 | ~ClientPort() override; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | } // namespace | 50 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp index 646a5cc64..72773d8b1 100644 --- a/src/core/hle/kernel/client_session.cpp +++ b/src/core/hle/kernel/client_session.cpp | |||
| @@ -48,4 +48,4 @@ ResultCode ClientSession::SendSyncRequest(SharedPtr<Thread> thread) { | |||
| 48 | return server->HandleSyncRequest(std::move(thread)); | 48 | return server->HandleSyncRequest(std::move(thread)); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | } // namespace | 51 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/client_session.h b/src/core/hle/kernel/client_session.h index 671174ec4..d6ab4f893 100644 --- a/src/core/hle/kernel/client_session.h +++ b/src/core/hle/kernel/client_session.h | |||
| @@ -45,4 +45,4 @@ private: | |||
| 45 | ~ClientSession() override; | 45 | ~ClientSession() override; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | } // namespace | 48 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/condition_variable.h b/src/core/hle/kernel/condition_variable.h index 0610a284f..0d54031cb 100644 --- a/src/core/hle/kernel/condition_variable.h +++ b/src/core/hle/kernel/condition_variable.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <queue> | ||
| 8 | #include <string> | 7 | #include <string> |
| 8 | #include <queue> | ||
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "core/hle/kernel/kernel.h" | 10 | #include "core/hle/kernel/kernel.h" |
| 11 | #include "core/hle/kernel/wait_object.h" | 11 | #include "core/hle/kernel/wait_object.h" |
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 23f9df0d6..9cae2369f 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp | |||
| @@ -52,4 +52,4 @@ void Event::WakeupAllWaitingThreads() { | |||
| 52 | signaled = false; | 52 | signaled = false; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | } // namespace | 55 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h index cc41abb85..e5c924a75 100644 --- a/src/core/hle/kernel/event.h +++ b/src/core/hle/kernel/event.h | |||
| @@ -49,4 +49,4 @@ private: | |||
| 49 | ~Event() override; | 49 | ~Event() override; |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | } // namespace | 52 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index 12506e64c..74d3d0514 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp | |||
| @@ -104,4 +104,4 @@ void HandleTable::Clear() { | |||
| 104 | next_free_slot = 0; | 104 | next_free_slot = 0; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | } // namespace | 107 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/handle_table.h b/src/core/hle/kernel/handle_table.h index dba5573a8..935cc22b5 100644 --- a/src/core/hle/kernel/handle_table.h +++ b/src/core/hle/kernel/handle_table.h | |||
| @@ -130,4 +130,4 @@ private: | |||
| 130 | 130 | ||
| 131 | extern HandleTable g_handle_table; | 131 | extern HandleTable g_handle_table; |
| 132 | 132 | ||
| 133 | } // namespace | 133 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 3899dad09..ecf32c18a 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -99,9 +99,8 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { | |||
| 99 | 99 | ||
| 100 | data_payload_offset = rp.GetCurrentOffset(); | 100 | data_payload_offset = rp.GetCurrentOffset(); |
| 101 | 101 | ||
| 102 | if (domain_message_header && | 102 | if (domain_message_header && domain_message_header->command == |
| 103 | domain_message_header->command == | 103 | IPC::DomainMessageHeader::CommandType::CloseVirtualHandle) { |
| 104 | IPC::DomainMessageHeader::CommandType::CloseVirtualHandle) { | ||
| 105 | // CloseVirtualHandle command does not have SFC* or any data | 104 | // CloseVirtualHandle command does not have SFC* or any data |
| 106 | return; | 105 | return; |
| 107 | } | 106 | } |
diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cpp index 517dc47a8..0149a3ed6 100644 --- a/src/core/hle/kernel/resource_limit.cpp +++ b/src/core/hle/kernel/resource_limit.cpp | |||
| @@ -151,4 +151,4 @@ void ResourceLimitsInit() { | |||
| 151 | 151 | ||
| 152 | void ResourceLimitsShutdown() {} | 152 | void ResourceLimitsShutdown() {} |
| 153 | 153 | ||
| 154 | } // namespace | 154 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/resource_limit.h b/src/core/hle/kernel/resource_limit.h index 42874eb8d..1a0ca11f1 100644 --- a/src/core/hle/kernel/resource_limit.h +++ b/src/core/hle/kernel/resource_limit.h | |||
| @@ -123,4 +123,4 @@ void ResourceLimitsInit(); | |||
| 123 | // Destroys the resource limits | 123 | // Destroys the resource limits |
| 124 | void ResourceLimitsShutdown(); | 124 | void ResourceLimitsShutdown(); |
| 125 | 125 | ||
| 126 | } // namespace | 126 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/server_port.cpp b/src/core/hle/kernel/server_port.cpp index 49a9cdfa3..0b7061403 100644 --- a/src/core/hle/kernel/server_port.cpp +++ b/src/core/hle/kernel/server_port.cpp | |||
| @@ -50,4 +50,4 @@ std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> ServerPort::CreatePortP | |||
| 50 | return std::make_tuple(std::move(server_port), std::move(client_port)); | 50 | return std::make_tuple(std::move(server_port), std::move(client_port)); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | } // namespace | 53 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/server_port.h b/src/core/hle/kernel/server_port.h index 6fe7c7f2f..9ef4ecc35 100644 --- a/src/core/hle/kernel/server_port.h +++ b/src/core/hle/kernel/server_port.h | |||
| @@ -72,4 +72,4 @@ private: | |||
| 72 | ~ServerPort() override; | 72 | ~ServerPort() override; |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | } // namespace | 75 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index f4360ddf3..6ff4ef8c1 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h | |||
| @@ -113,4 +113,4 @@ private: | |||
| 113 | * in the command buffer. | 113 | * in the command buffer. |
| 114 | */ | 114 | */ |
| 115 | ResultCode TranslateHLERequest(ServerSession* server_session); | 115 | ResultCode TranslateHLERequest(ServerSession* server_session); |
| 116 | } | 116 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/session.cpp b/src/core/hle/kernel/session.cpp index 8a2a7e3fd..642914744 100644 --- a/src/core/hle/kernel/session.cpp +++ b/src/core/hle/kernel/session.cpp | |||
| @@ -9,4 +9,4 @@ namespace Kernel { | |||
| 9 | 9 | ||
| 10 | Session::Session() {} | 10 | Session::Session() {} |
| 11 | Session::~Session() {} | 11 | Session::~Session() {} |
| 12 | } | 12 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.h index 2cf319e99..e69b034a7 100644 --- a/src/core/hle/kernel/session.h +++ b/src/core/hle/kernel/session.h | |||
| @@ -24,4 +24,4 @@ public: | |||
| 24 | ServerSession* server = nullptr; ///< The server endpoint of the session. | 24 | ServerSession* server = nullptr; ///< The server endpoint of the session. |
| 25 | SharedPtr<ClientPort> port; ///< The port that this session is associated with (optional). | 25 | SharedPtr<ClientPort> port; ///< The port that this session is associated with (optional). |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h index 93a6f2182..e948819c0 100644 --- a/src/core/hle/kernel/shared_memory.h +++ b/src/core/hle/kernel/shared_memory.h | |||
| @@ -98,10 +98,10 @@ public: | |||
| 98 | ResultCode Unmap(Process* target_process, VAddr address); | 98 | ResultCode Unmap(Process* target_process, VAddr address); |
| 99 | 99 | ||
| 100 | /** | 100 | /** |
| 101 | * Gets a pointer to the shared memory block | 101 | * Gets a pointer to the shared memory block |
| 102 | * @param offset Offset from the start of the shared memory block to get pointer | 102 | * @param offset Offset from the start of the shared memory block to get pointer |
| 103 | * @return Pointer to the shared memory block from the specified offset | 103 | * @return Pointer to the shared memory block from the specified offset |
| 104 | */ | 104 | */ |
| 105 | u8* GetPointer(u32 offset = 0); | 105 | u8* GetPointer(u32 offset = 0); |
| 106 | 106 | ||
| 107 | /// Process that created this shared memory block. | 107 | /// Process that created this shared memory block. |
| @@ -129,4 +129,4 @@ private: | |||
| 129 | ~SharedMemory() override; | 129 | ~SharedMemory() override; |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | } // namespace | 132 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index d267b6c2e..516309036 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -255,8 +255,9 @@ static ResultCode CancelSynchronization(Handle thread_handle) { | |||
| 255 | /// Attempts to locks a mutex, creating it if it does not already exist | 255 | /// Attempts to locks a mutex, creating it if it does not already exist |
| 256 | static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr, | 256 | static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr, |
| 257 | Handle requesting_thread_handle) { | 257 | Handle requesting_thread_handle) { |
| 258 | LOG_TRACE(Kernel_SVC, "called holding_thread_handle=0x%08X, mutex_addr=0x%llx, " | 258 | LOG_TRACE(Kernel_SVC, |
| 259 | "requesting_current_thread_handle=0x%08X", | 259 | "called holding_thread_handle=0x%08X, mutex_addr=0x%llx, " |
| 260 | "requesting_current_thread_handle=0x%08X", | ||
| 260 | holding_thread_handle, mutex_addr, requesting_thread_handle); | 261 | holding_thread_handle, mutex_addr, requesting_thread_handle); |
| 261 | 262 | ||
| 262 | SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle); | 263 | SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle); |
| @@ -546,8 +547,9 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | |||
| 546 | 547 | ||
| 547 | Core::System::GetInstance().PrepareReschedule(); | 548 | Core::System::GetInstance().PrepareReschedule(); |
| 548 | 549 | ||
| 549 | LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " | 550 | LOG_TRACE(Kernel_SVC, |
| 550 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", | 551 | "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " |
| 552 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", | ||
| 551 | entry_point, name.c_str(), arg, stack_top, priority, processor_id, *out_handle); | 553 | entry_point, name.c_str(), arg, stack_top, priority, processor_id, *out_handle); |
| 552 | 554 | ||
| 553 | return RESULT_SUCCESS; | 555 | return RESULT_SUCCESS; |
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index a93a6c87a..8da745634 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp | |||
| @@ -111,4 +111,4 @@ void TimersInit() { | |||
| 111 | 111 | ||
| 112 | void TimersShutdown() {} | 112 | void TimersShutdown() {} |
| 113 | 113 | ||
| 114 | } // namespace | 114 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h index 82552372d..82d19cefc 100644 --- a/src/core/hle/kernel/timer.h +++ b/src/core/hle/kernel/timer.h | |||
| @@ -76,4 +76,4 @@ void TimersInit(); | |||
| 76 | /// Tears down the timer variables | 76 | /// Tears down the timer variables |
| 77 | void TimersShutdown(); | 77 | void TimersShutdown(); |
| 78 | 78 | ||
| 79 | } // namespace | 79 | } // namespace Kernel |
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index 687e65fe3..b4a6ad232 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp | |||
| @@ -222,7 +222,8 @@ public: | |||
| 222 | explicit IStorageAccessor(std::vector<u8> buffer) | 222 | explicit IStorageAccessor(std::vector<u8> buffer) |
| 223 | : ServiceFramework("IStorageAccessor"), buffer(std::move(buffer)) { | 223 | : ServiceFramework("IStorageAccessor"), buffer(std::move(buffer)) { |
| 224 | static const FunctionInfo functions[] = { | 224 | static const FunctionInfo functions[] = { |
| 225 | {0, &IStorageAccessor::GetSize, "GetSize"}, {11, &IStorageAccessor::Read, "Read"}, | 225 | {0, &IStorageAccessor::GetSize, "GetSize"}, |
| 226 | {11, &IStorageAccessor::Read, "Read"}, | ||
| 226 | }; | 227 | }; |
| 227 | RegisterHandlers(functions); | 228 | RegisterHandlers(functions); |
| 228 | } | 229 | } |
diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp index 66d94ff52..bf7e12288 100644 --- a/src/core/hle/service/apm/apm.cpp +++ b/src/core/hle/service/apm/apm.cpp | |||
| @@ -51,7 +51,8 @@ private: | |||
| 51 | 51 | ||
| 52 | APM::APM() : ServiceFramework("apm") { | 52 | APM::APM() : ServiceFramework("apm") { |
| 53 | static const FunctionInfo functions[] = { | 53 | static const FunctionInfo functions[] = { |
| 54 | {0x00000000, &APM::OpenSession, "OpenSession"}, {0x00000001, nullptr, "GetPerformanceMode"}, | 54 | {0x00000000, &APM::OpenSession, "OpenSession"}, |
| 55 | {0x00000001, nullptr, "GetPerformanceMode"}, | ||
| 55 | }; | 56 | }; |
| 56 | RegisterHandlers(functions); | 57 | RegisterHandlers(functions); |
| 57 | } | 58 | } |
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index 9b73886bb..9d3013c16 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" | 7 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" |
| 8 | #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" | 8 | #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" |
| 9 | #include "core/hle/service/nvdrv/devices/nvmap.h" | 9 | #include "core/hle/service/nvdrv/devices/nvmap.h" |
| 10 | #include "core/hle/service/nvdrv/nvdrv.h" | ||
| 11 | #include "core/hle/service/nvdrv/interface.h" | 10 | #include "core/hle/service/nvdrv/interface.h" |
| 11 | #include "core/hle/service/nvdrv/nvdrv.h" | ||
| 12 | 12 | ||
| 13 | namespace Service { | 13 | namespace Service { |
| 14 | namespace Nvidia { | 14 | namespace Nvidia { |
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 8e1c5b399..9c2e826da 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -21,7 +21,7 @@ class ClientPort; | |||
| 21 | class ServerPort; | 21 | class ServerPort; |
| 22 | class ServerSession; | 22 | class ServerSession; |
| 23 | class HLERequestContext; | 23 | class HLERequestContext; |
| 24 | } | 24 | } // namespace Kernel |
| 25 | 25 | ||
| 26 | namespace Service { | 26 | namespace Service { |
| 27 | 27 | ||
| @@ -189,4 +189,4 @@ extern std::unordered_map<std::string, Kernel::SharedPtr<Kernel::ClientPort>> g_ | |||
| 189 | /// Adds a port to the named port table | 189 | /// Adds a port to the named port table |
| 190 | void AddNamedPort(std::string name, Kernel::SharedPtr<Kernel::ClientPort> port); | 190 | void AddNamedPort(std::string name, Kernel::SharedPtr<Kernel::ClientPort> port); |
| 191 | 191 | ||
| 192 | } // namespace | 192 | } // namespace Service |
diff --git a/src/core/hle/shared_page.cpp b/src/core/hle/shared_page.cpp index 9ce8af961..bba4a0715 100644 --- a/src/core/hle/shared_page.cpp +++ b/src/core/hle/shared_page.cpp | |||
| @@ -82,4 +82,4 @@ void Init() { | |||
| 82 | CoreTiming::ScheduleEvent(0, update_time_event); | 82 | CoreTiming::ScheduleEvent(0, update_time_event); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | } // namespace | 85 | } // namespace SharedPage |
diff --git a/src/core/hle/shared_page.h b/src/core/hle/shared_page.h index 864695ae1..a58259888 100644 --- a/src/core/hle/shared_page.h +++ b/src/core/hle/shared_page.h | |||
| @@ -66,4 +66,4 @@ extern SharedPageDef shared_page; | |||
| 66 | 66 | ||
| 67 | void Init(); | 67 | void Init(); |
| 68 | 68 | ||
| 69 | } // namespace | 69 | } // namespace SharedPage |
diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index a751b1d62..0db604c76 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp | |||
| @@ -91,4 +91,4 @@ void Shutdown() { | |||
| 91 | LCD::Shutdown(); | 91 | LCD::Shutdown(); |
| 92 | LOG_DEBUG(HW, "shutdown OK"); | 92 | LOG_DEBUG(HW, "shutdown OK"); |
| 93 | } | 93 | } |
| 94 | } | 94 | } // namespace HW |
diff --git a/src/core/hw/hw.h b/src/core/hw/hw.h index a3c5d2ea3..5890d2b5c 100644 --- a/src/core/hw/hw.h +++ b/src/core/hw/hw.h | |||
| @@ -47,4 +47,4 @@ void Init(); | |||
| 47 | /// Shutdown hardware | 47 | /// Shutdown hardware |
| 48 | void Shutdown(); | 48 | void Shutdown(); |
| 49 | 49 | ||
| 50 | } // namespace | 50 | } // namespace HW |
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp index 763ac1c4d..690079b65 100644 --- a/src/core/hw/lcd.cpp +++ b/src/core/hw/lcd.cpp | |||
| @@ -64,4 +64,4 @@ void Shutdown() { | |||
| 64 | LOG_DEBUG(HW_LCD, "shutdown OK"); | 64 | LOG_DEBUG(HW_LCD, "shutdown OK"); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | } // namespace | 67 | } // namespace LCD |
diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h index 191fd44af..d2db9700f 100644 --- a/src/core/hw/lcd.h +++ b/src/core/hw/lcd.h | |||
| @@ -83,4 +83,4 @@ void Init(); | |||
| 83 | /// Shutdown hardware | 83 | /// Shutdown hardware |
| 84 | void Shutdown(); | 84 | void Shutdown(); |
| 85 | 85 | ||
| 86 | } // namespace | 86 | } // namespace LCD |
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 9ba913dbe..98fb4cdaf 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp | |||
| @@ -323,8 +323,9 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | if (codeset_segment->size != 0) { | 325 | if (codeset_segment->size != 0) { |
| 326 | LOG_ERROR(Loader, "ELF has more than one segment of the same type. Skipping extra " | 326 | LOG_ERROR(Loader, |
| 327 | "segment (id %i)", | 327 | "ELF has more than one segment of the same type. Skipping extra " |
| 328 | "segment (id %i)", | ||
| 328 | i); | 329 | i); |
| 329 | continue; | 330 | continue; |
| 330 | } | 331 | } |
diff --git a/src/core/memory_setup.h b/src/core/memory_setup.h index ff4dcc936..6f82a131e 100644 --- a/src/core/memory_setup.h +++ b/src/core/memory_setup.h | |||
| @@ -29,4 +29,4 @@ void MapMemoryRegion(PageTable& page_table, VAddr base, u64 size, u8* target); | |||
| 29 | void MapIoRegion(PageTable& page_table, VAddr base, u64 size, MMIORegionPointer mmio_handler); | 29 | void MapIoRegion(PageTable& page_table, VAddr base, u64 size, MMIORegionPointer mmio_handler); |
| 30 | 30 | ||
| 31 | void UnmapRegion(PageTable& page_table, VAddr base, u64 size); | 31 | void UnmapRegion(PageTable& page_table, VAddr base, u64 size); |
| 32 | } | 32 | } // namespace Memory |
diff --git a/src/core/mmio.h b/src/core/mmio.h index f45126da8..5e3cc01af 100644 --- a/src/core/mmio.h +++ b/src/core/mmio.h | |||
| @@ -35,4 +35,4 @@ public: | |||
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | using MMIORegionPointer = std::shared_ptr<MMIORegion>; | 37 | using MMIORegionPointer = std::shared_ptr<MMIORegion>; |
| 38 | }; | 38 | }; // namespace Memory |
diff --git a/src/core/settings.h b/src/core/settings.h index 56fb189ae..6f8cd0f03 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -100,7 +100,8 @@ enum Values { | |||
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | static const std::array<const char*, NumAnalogs> mapping = {{ | 102 | static const std::array<const char*, NumAnalogs> mapping = {{ |
| 103 | "lstick", "rstick", | 103 | "lstick", |
| 104 | "rstick", | ||
| 104 | }}; | 105 | }}; |
| 105 | } // namespace NativeAnalog | 106 | } // namespace NativeAnalog |
| 106 | 107 | ||
diff --git a/src/core/tracer/citrace.h b/src/core/tracer/citrace.h index 215f86359..21fdc127a 100644 --- a/src/core/tracer/citrace.h +++ b/src/core/tracer/citrace.h | |||
| @@ -97,4 +97,4 @@ struct CTStreamElement { | |||
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | #pragma pack() | 99 | #pragma pack() |
| 100 | } | 100 | } // namespace CiTrace |
diff --git a/src/core/tracer/recorder.cpp b/src/core/tracer/recorder.cpp index 55b3b5efc..f3b0d6a8f 100644 --- a/src/core/tracer/recorder.cpp +++ b/src/core/tracer/recorder.cpp | |||
| @@ -205,4 +205,4 @@ template void Recorder::RegisterWritten(u32, u8); | |||
| 205 | template void Recorder::RegisterWritten(u32, u16); | 205 | template void Recorder::RegisterWritten(u32, u16); |
| 206 | template void Recorder::RegisterWritten(u32, u32); | 206 | template void Recorder::RegisterWritten(u32, u32); |
| 207 | template void Recorder::RegisterWritten(u32, u64); | 207 | template void Recorder::RegisterWritten(u32, u64); |
| 208 | } | 208 | } // namespace CiTrace |
diff --git a/src/core/tracer/recorder.h b/src/core/tracer/recorder.h index 39e6ec4fd..629c2f6d2 100644 --- a/src/core/tracer/recorder.h +++ b/src/core/tracer/recorder.h | |||
| @@ -63,9 +63,9 @@ private: | |||
| 63 | CTStreamElement data; | 63 | CTStreamElement data; |
| 64 | 64 | ||
| 65 | /** | 65 | /** |
| 66 | * Extra data to store along "core" data. | 66 | * Extra data to store along "core" data. |
| 67 | * This is e.g. used for data used in MemoryUpdates. | 67 | * This is e.g. used for data used in MemoryUpdates. |
| 68 | */ | 68 | */ |
| 69 | std::vector<u8> extra_data; | 69 | std::vector<u8> extra_data; |
| 70 | 70 | ||
| 71 | /// Optional CRC hash (e.g. for hashing memory regions) | 71 | /// Optional CRC hash (e.g. for hashing memory regions) |
| @@ -84,4 +84,4 @@ private: | |||
| 84 | std::unordered_map<boost::crc_32_type::value_type /*hash*/, u32 /*file_offset*/> memory_regions; | 84 | std::unordered_map<boost::crc_32_type::value_type /*hash*/, u32 /*file_offset*/> memory_regions; |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | } // namespace | 87 | } // namespace CiTrace |
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 95d40f09f..b12623d55 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -52,7 +52,8 @@ MotionEmu* GetMotionEmu() { | |||
| 52 | 52 | ||
| 53 | std::string GenerateKeyboardParam(int key_code) { | 53 | std::string GenerateKeyboardParam(int key_code) { |
| 54 | Common::ParamPackage param{ | 54 | Common::ParamPackage param{ |
| 55 | {"engine", "keyboard"}, {"code", std::to_string(key_code)}, | 55 | {"engine", "keyboard"}, |
| 56 | {"code", std::to_string(key_code)}, | ||
| 56 | }; | 57 | }; |
| 57 | return param.Serialize(); | 58 | return param.Serialize(); |
| 58 | } | 59 | } |
diff --git a/src/tests/common/param_package.cpp b/src/tests/common/param_package.cpp index efec2cc86..19d372236 100644 --- a/src/tests/common/param_package.cpp +++ b/src/tests/common/param_package.cpp | |||
| @@ -10,7 +10,9 @@ namespace Common { | |||
| 10 | 10 | ||
| 11 | TEST_CASE("ParamPackage", "[common]") { | 11 | TEST_CASE("ParamPackage", "[common]") { |
| 12 | ParamPackage original{ | 12 | ParamPackage original{ |
| 13 | {"abc", "xyz"}, {"def", "42"}, {"jkl", "$$:1:$2$,3"}, | 13 | {"abc", "xyz"}, |
| 14 | {"def", "42"}, | ||
| 15 | {"jkl", "$$:1:$2$,3"}, | ||
| 14 | }; | 16 | }; |
| 15 | original.Set("ghi", 3.14f); | 17 | original.Set("ghi", 3.14f); |
| 16 | ParamPackage copy(original.Serialize()); | 18 | ParamPackage copy(original.Serialize()); |
diff --git a/src/video_core/renderer_opengl/gl_shader_util.h b/src/video_core/renderer_opengl/gl_shader_util.h index c66e8acd3..a4bcffdfa 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.h +++ b/src/video_core/renderer_opengl/gl_shader_util.h | |||
| @@ -16,4 +16,4 @@ namespace GLShader { | |||
| 16 | */ | 16 | */ |
| 17 | GLuint LoadProgram(const char* vertex_shader, const char* fragment_shader); | 17 | GLuint LoadProgram(const char* vertex_shader, const char* fragment_shader); |
| 18 | 18 | ||
| 19 | } // namespace | 19 | } // namespace GLShader |
diff --git a/src/video_core/utils.h b/src/video_core/utils.h index d8567f314..d94a10417 100644 --- a/src/video_core/utils.h +++ b/src/video_core/utils.h | |||
| @@ -49,4 +49,4 @@ static inline u32 GetMortonOffset(u32 x, u32 y, u32 bytes_per_pixel) { | |||
| 49 | return (i + offset) * bytes_per_pixel; | 49 | return (i + offset) * bytes_per_pixel; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | } // namespace | 52 | } // namespace VideoCore |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 106d62562..864691baa 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -39,4 +39,4 @@ void Shutdown() { | |||
| 39 | LOG_DEBUG(Render, "shutdown OK"); | 39 | LOG_DEBUG(Render, "shutdown OK"); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | } // namespace | 42 | } // namespace VideoCore |
diff --git a/src/video_core/video_core.h b/src/video_core/video_core.h index 0b8785898..1fd90b9d0 100644 --- a/src/video_core/video_core.h +++ b/src/video_core/video_core.h | |||
| @@ -31,4 +31,4 @@ bool Init(EmuWindow* emu_window); | |||
| 31 | /// Shutdown the video core | 31 | /// Shutdown the video core |
| 32 | void Shutdown(); | 32 | void Shutdown(); |
| 33 | 33 | ||
| 34 | } // namespace | 34 | } // namespace VideoCore |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 6a40f035c..f9ddb9edc 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -26,10 +26,18 @@ const std::array<int, Settings::NativeButton::NumButtons> Config::default_button | |||
| 26 | 26 | ||
| 27 | const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> Config::default_analogs{{ | 27 | const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> Config::default_analogs{{ |
| 28 | { | 28 | { |
| 29 | Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right, Qt::Key_E, | 29 | Qt::Key_Up, |
| 30 | Qt::Key_Down, | ||
| 31 | Qt::Key_Left, | ||
| 32 | Qt::Key_Right, | ||
| 33 | Qt::Key_E, | ||
| 30 | }, | 34 | }, |
| 31 | { | 35 | { |
| 32 | Qt::Key_I, Qt::Key_K, Qt::Key_J, Qt::Key_L, Qt::Key_R, | 36 | Qt::Key_I, |
| 37 | Qt::Key_K, | ||
| 38 | Qt::Key_J, | ||
| 39 | Qt::Key_L, | ||
| 40 | Qt::Key_R, | ||
| 33 | }, | 41 | }, |
| 34 | }}; | 42 | }}; |
| 35 | 43 | ||
diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index 10043e6e8..78559e2bb 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp | |||
| @@ -14,7 +14,11 @@ | |||
| 14 | 14 | ||
| 15 | const std::array<std::string, ConfigureInput::ANALOG_SUB_BUTTONS_NUM> | 15 | const std::array<std::string, ConfigureInput::ANALOG_SUB_BUTTONS_NUM> |
| 16 | ConfigureInput::analog_sub_buttons{{ | 16 | ConfigureInput::analog_sub_buttons{{ |
| 17 | "up", "down", "left", "right", "modifier", | 17 | "up", |
| 18 | "down", | ||
| 19 | "left", | ||
| 20 | "right", | ||
| 21 | "modifier", | ||
| 18 | }}; | 22 | }}; |
| 19 | 23 | ||
| 20 | static QString getKeyName(int key_code) { | 24 | static QString getKeyName(int key_code) { |
| @@ -36,7 +40,8 @@ static void SetAnalogButton(const Common::ParamPackage& input_param, | |||
| 36 | Common::ParamPackage& analog_param, const std::string& button_name) { | 40 | Common::ParamPackage& analog_param, const std::string& button_name) { |
| 37 | if (analog_param.Get("engine", "") != "analog_from_button") { | 41 | if (analog_param.Get("engine", "") != "analog_from_button") { |
| 38 | analog_param = { | 42 | analog_param = { |
| 39 | {"engine", "analog_from_button"}, {"modifier_scale", "0.5"}, | 43 | {"engine", "analog_from_button"}, |
| 44 | {"modifier_scale", "0.5"}, | ||
| 40 | }; | 45 | }; |
| 41 | } | 46 | } |
| 42 | analog_param.Set(button_name, input_param.Serialize()); | 47 | analog_param.Set(button_name, input_param.Serialize()); |
| @@ -107,11 +112,17 @@ ConfigureInput::ConfigureInput(QWidget* parent) | |||
| 107 | 112 | ||
| 108 | analog_map_buttons = {{ | 113 | analog_map_buttons = {{ |
| 109 | { | 114 | { |
| 110 | ui->buttonLStickUp, ui->buttonLStickDown, ui->buttonLStickLeft, ui->buttonLStickRight, | 115 | ui->buttonLStickUp, |
| 116 | ui->buttonLStickDown, | ||
| 117 | ui->buttonLStickLeft, | ||
| 118 | ui->buttonLStickRight, | ||
| 111 | ui->buttonLStickMod, | 119 | ui->buttonLStickMod, |
| 112 | }, | 120 | }, |
| 113 | { | 121 | { |
| 114 | ui->buttonRStickUp, ui->buttonRStickDown, ui->buttonRStickLeft, ui->buttonRStickRight, | 122 | ui->buttonRStickUp, |
| 123 | ui->buttonRStickDown, | ||
| 124 | ui->buttonRStickLeft, | ||
| 125 | ui->buttonRStickRight, | ||
| 115 | ui->buttonRStickMod, | 126 | ui->buttonRStickMod, |
| 116 | }, | 127 | }, |
| 117 | }}; | 128 | }}; |
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 89e783687..d09505a0f 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -9,7 +9,18 @@ | |||
| 9 | #include "yuzu/ui_settings.h" | 9 | #include "yuzu/ui_settings.h" |
| 10 | 10 | ||
| 11 | static const std::array<int, 12> days_in_month = {{ | 11 | static const std::array<int, 12> days_in_month = {{ |
| 12 | 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, | 12 | 31, |
| 13 | 29, | ||
| 14 | 31, | ||
| 15 | 30, | ||
| 16 | 31, | ||
| 17 | 30, | ||
| 18 | 31, | ||
| 19 | 31, | ||
| 20 | 30, | ||
| 21 | 31, | ||
| 22 | 30, | ||
| 23 | 31, | ||
| 13 | }}; | 24 | }}; |
| 14 | 25 | ||
| 15 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { | 26 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { |
diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h index 4034e909b..e538174eb 100644 --- a/src/yuzu/debugger/wait_tree.h +++ b/src/yuzu/debugger/wait_tree.h | |||
| @@ -20,7 +20,7 @@ class Mutex; | |||
| 20 | class ConditionVariable; | 20 | class ConditionVariable; |
| 21 | class Thread; | 21 | class Thread; |
| 22 | class Timer; | 22 | class Timer; |
| 23 | } | 23 | } // namespace Kernel |
| 24 | 24 | ||
| 25 | class WaitTreeThread; | 25 | class WaitTreeThread; |
| 26 | 26 | ||
diff --git a/src/yuzu/ui_settings.h b/src/yuzu/ui_settings.h index d093da641..9036ce2c1 100644 --- a/src/yuzu/ui_settings.h +++ b/src/yuzu/ui_settings.h | |||
| @@ -50,4 +50,4 @@ struct Values { | |||
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | extern Values values; | 52 | extern Values values; |
| 53 | } | 53 | } // namespace UISettings |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index e5be72213..bf79d2e81 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -49,10 +49,18 @@ static const std::array<int, Settings::NativeButton::NumButtons> default_buttons | |||
| 49 | 49 | ||
| 50 | static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs{{ | 50 | static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs{{ |
| 51 | { | 51 | { |
| 52 | SDL_SCANCODE_UP, SDL_SCANCODE_DOWN, SDL_SCANCODE_LEFT, SDL_SCANCODE_RIGHT, SDL_SCANCODE_D, | 52 | SDL_SCANCODE_UP, |
| 53 | SDL_SCANCODE_DOWN, | ||
| 54 | SDL_SCANCODE_LEFT, | ||
| 55 | SDL_SCANCODE_RIGHT, | ||
| 56 | SDL_SCANCODE_D, | ||
| 53 | }, | 57 | }, |
| 54 | { | 58 | { |
| 55 | SDL_SCANCODE_I, SDL_SCANCODE_K, SDL_SCANCODE_J, SDL_SCANCODE_L, SDL_SCANCODE_D, | 59 | SDL_SCANCODE_I, |
| 60 | SDL_SCANCODE_K, | ||
| 61 | SDL_SCANCODE_J, | ||
| 62 | SDL_SCANCODE_L, | ||
| 63 | SDL_SCANCODE_D, | ||
| 56 | }, | 64 | }, |
| 57 | }}; | 65 | }}; |
| 58 | 66 | ||