aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tony Wasserka <NeoBrainX@gmail.com>2014-12-04 20:41:01 +0100
committerGravatar Tony Wasserka <NeoBrainX@gmail.com>2014-12-09 16:37:34 +0100
commit79bb403089ff91c24b8356ad8d5bc5f7666a0d11 (patch)
tree83907606411e146ec64434438345d093bee696ca
parent0cd27a511ecd170484b672263c09192b579e31ac (diff)
More coding style fixes.
-rw-r--r--src/citra_qt/debugger/graphics_breakpoints.cpp2
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.hxx2
-rw-r--r--src/video_core/pica.h18
3 files changed, 14 insertions, 8 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp
index db98a3b0..5973aafc 100644
--- a/src/citra_qt/debugger/graphics_breakpoints.cpp
+++ b/src/citra_qt/debugger/graphics_breakpoints.cpp
@@ -43,7 +43,7 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const
map.insert({Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch")});
map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch")});
- _dbg_assert_(GPU, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
+ _dbg_assert_(GUI, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
return map[event];
} else if (index.column() == 1) {
diff --git a/src/citra_qt/debugger/graphics_framebuffer.hxx b/src/citra_qt/debugger/graphics_framebuffer.hxx
index bb73b2f7..1151ee7a 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.hxx
+++ b/src/citra_qt/debugger/graphics_framebuffer.hxx
@@ -15,7 +15,7 @@ class QSpinBox;
class CSpinBox;
// Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots.
-// This is because the Pica breakpoint callbacks will called on a non-GUI thread, while
+// This is because the Pica breakpoint callbacks are called from a non-GUI thread, while
// the widget usually wants to perform reactions in the GUI thread.
class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver {
Q_OBJECT
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index c1f35a01..b463a32e 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -131,16 +131,22 @@ struct Regs {
};
static unsigned BytesPerPixel(TextureFormat format) {
- if (format == TextureFormat::RGBA8)
+ switch (format) {
+ case TextureFormat::RGBA8:
return 4;
- else if (format == TextureFormat::RGB8)
+
+ case TextureFormat::RGB8:
return 3;
- else if (format == TextureFormat::RGBA5551 ||
- format == TextureFormat::RGB565 ||
- format == TextureFormat::RGBA4)
+
+ case TextureFormat::RGBA5551:
+ case TextureFormat::RGB565:
+ case TextureFormat::RGBA4:
return 2;
- else // placeholder
+
+ default:
+ // placeholder for yet unknown formats
return 1;
+ }
}
BitField< 0, 1, u32> texturing_enable;