diff options
| author | 2014-09-13 22:55:41 -0400 | |
|---|---|---|
| committer | 2014-09-13 22:55:41 -0400 | |
| commit | 6cc7c73b8088d415c2eeae4ecacb7659cd2fd430 (patch) | |
| tree | 6ec44474be0d41b8dbf37ef91e1ad2f13c679ec2 /src | |
| parent | Merge pull request #105 from kevinhartman/hid (diff) | |
| download | yuzu-6cc7c73b8088d415c2eeae4ecacb7659cd2fd430.tar.gz yuzu-6cc7c73b8088d415c2eeae4ecacb7659cd2fd430.tar.xz yuzu-6cc7c73b8088d415c2eeae4ecacb7659cd2fd430.zip | |
Core: Fix warnings in gpu.cpp
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hw/gpu.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/pica.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 2e0943776..7afb00d6c 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -49,7 +49,7 @@ inline void Write(u32 addr, const T data) { | |||
| 49 | return; | 49 | return; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | g_regs[index] = data; | 52 | g_regs[index] = static_cast<u32>(data); |
| 53 | 53 | ||
| 54 | switch (index) { | 54 | switch (index) { |
| 55 | 55 | ||
| @@ -81,9 +81,9 @@ inline void Write(u32 addr, const T data) { | |||
| 81 | u8* source_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress())); | 81 | u8* source_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress())); |
| 82 | u8* dest_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress())); | 82 | u8* dest_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress())); |
| 83 | 83 | ||
| 84 | for (int y = 0; y < config.output_height; ++y) { | 84 | for (u32 y = 0; y < config.output_height; ++y) { |
| 85 | // TODO: Why does the register seem to hold twice the framebuffer width? | 85 | // TODO: Why does the register seem to hold twice the framebuffer width? |
| 86 | for (int x = 0; x < config.output_width; ++x) { | 86 | for (u32 x = 0; x < config.output_width; ++x) { |
| 87 | struct { | 87 | struct { |
| 88 | int r, g, b, a; | 88 | int r, g, b, a; |
| 89 | } source_color = { 0, 0, 0, 0 }; | 89 | } source_color = { 0, 0, 0, 0 }; |
| @@ -134,10 +134,10 @@ inline void Write(u32 addr, const T data) { | |||
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%dx%d)-> 0x%08x(%dx%d), dst format %x", | 137 | DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x", |
| 138 | config.output_height * config.output_width * 4, | 138 | config.output_height * config.output_width * 4, |
| 139 | config.GetPhysicalInputAddress(), (int)config.input_width, (int)config.input_height, | 139 | config.GetPhysicalInputAddress(), config.input_width, config.input_height, |
| 140 | config.GetPhysicalOutputAddress(), (int)config.output_width, (int)config.output_height, | 140 | config.GetPhysicalOutputAddress(), config.output_width, config.output_height, |
| 141 | config.output_format.Value()); | 141 | config.output_format.Value()); |
| 142 | } | 142 | } |
| 143 | break; | 143 | break; |
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index cfdc9b934..374cd83c1 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h | |||
| @@ -516,12 +516,12 @@ struct Regs { | |||
| 516 | // Used for debugging purposes, so performance is not an issue here | 516 | // Used for debugging purposes, so performance is not an issue here |
| 517 | static std::string GetCommandName(int index) { | 517 | static std::string GetCommandName(int index) { |
| 518 | std::map<u32, std::string> map; | 518 | std::map<u32, std::string> map; |
| 519 | Regs regs; | ||
| 520 | 519 | ||
| 521 | // TODO: MSVC does not support using offsetof() on non-static data members even though this | 520 | // TODO: MSVC does not support using offsetof() on non-static data members even though this |
| 522 | // is technically allowed since C++11. Hence, this functionality is disabled until | 521 | // is technically allowed since C++11. Hence, this functionality is disabled until |
| 523 | // MSVC properly supports it. | 522 | // MSVC properly supports it. |
| 524 | #ifndef _MSC_VER | 523 | #ifndef _MSC_VER |
| 524 | Regs regs; | ||
| 525 | #define ADD_FIELD(name) \ | 525 | #define ADD_FIELD(name) \ |
| 526 | do { \ | 526 | do { \ |
| 527 | map.insert({PICA_REG_INDEX(name), #name}); \ | 527 | map.insert({PICA_REG_INDEX(name), #name}); \ |