summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-09-15 03:28:44 +0200
committerbunnei <bunneidev@gmail.com>2014-09-15 03:28:44 +0200
commit31d9cf4d17ef9ec4835ea5dc64236087989fbe3a (patch)
tree9fc67e151ae3d776a32a69d873b1d57bf5f34c59
parentMerge pull request #97 from archshift/cleanup (diff)
parentCore: Fix warnings in gpu.cpp (diff)
downloadyuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.tar
yuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.tar.gz
yuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.tar.bz2
yuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.tar.lz
yuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.tar.xz
yuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.tar.zst
yuzu-31d9cf4d17ef9ec4835ea5dc64236087989fbe3a.zip
-rw-r--r--src/core/hw/gpu.cpp12
-rw-r--r--src/video_core/pica.h2
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) {
return;
}
- g_regs[index] = data;
+ g_regs[index] = static_cast<u32>(data);
switch (index) {
@@ -81,9 +81,9 @@ inline void Write(u32 addr, const T data) {
u8* source_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress()));
u8* dest_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress()));
- for (int y = 0; y < config.output_height; ++y) {
+ for (u32 y = 0; y < config.output_height; ++y) {
// TODO: Why does the register seem to hold twice the framebuffer width?
- for (int x = 0; x < config.output_width; ++x) {
+ for (u32 x = 0; x < config.output_width; ++x) {
struct {
int r, g, b, a;
} source_color = { 0, 0, 0, 0 };
@@ -134,10 +134,10 @@ inline void Write(u32 addr, const T data) {
}
}
- DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%dx%d)-> 0x%08x(%dx%d), dst format %x",
+ DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x",
config.output_height * config.output_width * 4,
- config.GetPhysicalInputAddress(), (int)config.input_width, (int)config.input_height,
- config.GetPhysicalOutputAddress(), (int)config.output_width, (int)config.output_height,
+ config.GetPhysicalInputAddress(), config.input_width, config.input_height,
+ config.GetPhysicalOutputAddress(), config.output_width, config.output_height,
config.output_format.Value());
}
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 {
// Used for debugging purposes, so performance is not an issue here
static std::string GetCommandName(int index) {
std::map<u32, std::string> map;
- Regs regs;
// TODO: MSVC does not support using offsetof() on non-static data members even though this
// is technically allowed since C++11. Hence, this functionality is disabled until
// MSVC properly supports it.
#ifndef _MSC_VER
+ Regs regs;
#define ADD_FIELD(name) \
do { \
map.insert({PICA_REG_INDEX(name), #name}); \