More coding style fixes.
This commit is contained in:
parent
0cd27a511e
commit
79bb403089
3 changed files with 14 additions and 8 deletions
|
@ -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::IncomingPrimitiveBatch, tr("Incoming primitive batch")});
|
||||||
map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished 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];
|
return map[event];
|
||||||
} else if (index.column() == 1) {
|
} else if (index.column() == 1) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ class QSpinBox;
|
||||||
class CSpinBox;
|
class CSpinBox;
|
||||||
|
|
||||||
// Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots.
|
// 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.
|
// the widget usually wants to perform reactions in the GUI thread.
|
||||||
class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver {
|
class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -131,17 +131,23 @@ struct Regs {
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned BytesPerPixel(TextureFormat format) {
|
static unsigned BytesPerPixel(TextureFormat format) {
|
||||||
if (format == TextureFormat::RGBA8)
|
switch (format) {
|
||||||
|
case TextureFormat::RGBA8:
|
||||||
return 4;
|
return 4;
|
||||||
else if (format == TextureFormat::RGB8)
|
|
||||||
|
case TextureFormat::RGB8:
|
||||||
return 3;
|
return 3;
|
||||||
else if (format == TextureFormat::RGBA5551 ||
|
|
||||||
format == TextureFormat::RGB565 ||
|
case TextureFormat::RGBA5551:
|
||||||
format == TextureFormat::RGBA4)
|
case TextureFormat::RGB565:
|
||||||
|
case TextureFormat::RGBA4:
|
||||||
return 2;
|
return 2;
|
||||||
else // placeholder
|
|
||||||
|
default:
|
||||||
|
// placeholder for yet unknown formats
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BitField< 0, 1, u32> texturing_enable;
|
BitField< 0, 1, u32> texturing_enable;
|
||||||
TextureConfig texture0;
|
TextureConfig texture0;
|
||||||
|
|
Loading…
Reference in a new issue