diff options
| author | 2016-09-21 11:29:48 -0700 | |
|---|---|---|
| committer | 2016-09-21 11:29:48 -0700 | |
| commit | d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a (patch) | |
| tree | 8a22ca73ff838f3f0090b29a548ae81087fc90ed /src/core/hw/lcd.cpp | |
| parent | README: Specify master branch for Travis CI badge (diff) | |
| parent | Fix Travis clang-format check (diff) | |
| download | yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.tar.gz yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.tar.xz yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.zip | |
Merge pull request #2086 from linkmauve/clang-format
Add clang-format as part of our {commit,travis}-time checks
Diffstat (limited to 'src/core/hw/lcd.cpp')
| -rw-r--r-- | src/core/hw/lcd.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp index 6f93709e3..2aa89de18 100644 --- a/src/core/hw/lcd.cpp +++ b/src/core/hw/lcd.cpp | |||
| @@ -3,13 +3,10 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | |||
| 7 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 8 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 9 | |||
| 10 | #include "core/hw/hw.h" | 8 | #include "core/hw/hw.h" |
| 11 | #include "core/hw/lcd.h" | 9 | #include "core/hw/lcd.h" |
| 12 | |||
| 13 | #include "core/tracer/recorder.h" | 10 | #include "core/tracer/recorder.h" |
| 14 | #include "video_core/debug_utils/debug_utils.h" | 11 | #include "video_core/debug_utils/debug_utils.h" |
| 15 | 12 | ||
| @@ -18,7 +15,7 @@ namespace LCD { | |||
| 18 | Regs g_regs; | 15 | Regs g_regs; |
| 19 | 16 | ||
| 20 | template <typename T> | 17 | template <typename T> |
| 21 | inline void Read(T &var, const u32 raw_addr) { | 18 | inline void Read(T& var, const u32 raw_addr) { |
| 22 | u32 addr = raw_addr - HW::VADDR_LCD; | 19 | u32 addr = raw_addr - HW::VADDR_LCD; |
| 23 | u32 index = addr / 4; | 20 | u32 index = addr / 4; |
| 24 | 21 | ||
| @@ -48,16 +45,17 @@ inline void Write(u32 addr, const T data) { | |||
| 48 | // This is happening *after* handling the write to make sure we properly catch all memory reads. | 45 | // This is happening *after* handling the write to make sure we properly catch all memory reads. |
| 49 | if (Pica::g_debug_context && Pica::g_debug_context->recorder) { | 46 | if (Pica::g_debug_context && Pica::g_debug_context->recorder) { |
| 50 | // addr + GPU VBase - IO VBase + IO PBase | 47 | // addr + GPU VBase - IO VBase + IO PBase |
| 51 | Pica::g_debug_context->recorder->RegisterWritten<T>(addr + HW::VADDR_LCD - 0x1EC00000 + 0x10100000, data); | 48 | Pica::g_debug_context->recorder->RegisterWritten<T>( |
| 49 | addr + HW::VADDR_LCD - 0x1EC00000 + 0x10100000, data); | ||
| 52 | } | 50 | } |
| 53 | } | 51 | } |
| 54 | 52 | ||
| 55 | // Explicitly instantiate template functions because we aren't defining this in the header: | 53 | // Explicitly instantiate template functions because we aren't defining this in the header: |
| 56 | 54 | ||
| 57 | template void Read<u64>(u64 &var, const u32 addr); | 55 | template void Read<u64>(u64& var, const u32 addr); |
| 58 | template void Read<u32>(u32 &var, const u32 addr); | 56 | template void Read<u32>(u32& var, const u32 addr); |
| 59 | template void Read<u16>(u16 &var, const u32 addr); | 57 | template void Read<u16>(u16& var, const u32 addr); |
| 60 | template void Read<u8>(u8 &var, const u32 addr); | 58 | template void Read<u8>(u8& var, const u32 addr); |
| 61 | 59 | ||
| 62 | template void Write<u64>(u32 addr, const u64 data); | 60 | template void Write<u64>(u32 addr, const u64 data); |
| 63 | template void Write<u32>(u32 addr, const u32 data); | 61 | template void Write<u32>(u32 addr, const u32 data); |