summaryrefslogtreecommitdiff
path: root/src/yuzu
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/configuration/configure_gamelist.cpp2
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoints.cpp3
-rw-r--r--src/yuzu/debugger/graphics/graphics_surface.cpp4
-rw-r--r--src/yuzu/debugger/wait_tree.cpp60
-rw-r--r--src/yuzu/game_list_p.h10
-rw-r--r--src/yuzu/main.cpp2
-rw-r--r--src/yuzu/util/util.cpp3
7 files changed, 43 insertions, 41 deletions
diff --git a/src/yuzu/configuration/configure_gamelist.cpp b/src/yuzu/configuration/configure_gamelist.cpp
index 0be030434..8743ce982 100644
--- a/src/yuzu/configuration/configure_gamelist.cpp
+++ b/src/yuzu/configuration/configure_gamelist.cpp
@@ -89,7 +89,7 @@ void ConfigureGameList::InitializeIconSizeComboBox() {
}
void ConfigureGameList::InitializeRowComboBoxes() {
- for (size_t i = 0; i < row_text_names.size(); ++i) {
+ for (std::size_t i = 0; i < row_text_names.size(); ++i) {
ui->row_1_text_combobox->addItem(row_text_names[i], QVariant::fromValue(i));
ui->row_2_text_combobox->addItem(row_text_names[i], QVariant::fromValue(i));
}
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
index fe682b3b8..b5c88f944 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
+++ b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
@@ -42,7 +42,8 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const {
tr("Finished primitive batch")},
};
- DEBUG_ASSERT(map.size() == static_cast<size_t>(Tegra::DebugContext::Event::NumEvents));
+ DEBUG_ASSERT(map.size() ==
+ static_cast<std::size_t>(Tegra::DebugContext::Event::NumEvents));
return (map.find(event) != map.end()) ? map.at(event) : QString();
}
diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp
index 7e37962d5..cbcd5dd5f 100644
--- a/src/yuzu/debugger/graphics/graphics_surface.cpp
+++ b/src/yuzu/debugger/graphics/graphics_surface.cpp
@@ -341,8 +341,8 @@ void GraphicsSurfaceWidget::OnUpdate() {
// directly...
const auto& registers = gpu.Maxwell3D().regs;
- const auto& rt = registers.rt[static_cast<size_t>(surface_source) -
- static_cast<size_t>(Source::RenderTarget0)];
+ const auto& rt = registers.rt[static_cast<std::size_t>(surface_source) -
+ static_cast<std::size_t>(Source::RenderTarget0)];
surface_address = rt.Address();
surface_width = rt.width;
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp
index 6c2cd967e..f2a7e23f0 100644
--- a/src/yuzu/debugger/wait_tree.cpp
+++ b/src/yuzu/debugger/wait_tree.cpp
@@ -117,7 +117,7 @@ QString WaitTreeCallstack::GetText() const {
std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeCallstack::GetChildren() const {
std::vector<std::unique_ptr<WaitTreeItem>> list;
- constexpr size_t BaseRegister = 29;
+ constexpr std::size_t BaseRegister = 29;
u64 base_pointer = thread.context.cpu_registers[BaseRegister];
while (base_pointer != 0) {
@@ -213,35 +213,35 @@ QString WaitTreeThread::GetText() const {
const auto& thread = static_cast<const Kernel::Thread&>(object);
QString status;
switch (thread.status) {
- case ThreadStatus::Running:
+ case Kernel::ThreadStatus::Running:
status = tr("running");
break;
- case ThreadStatus::Ready:
+ case Kernel::ThreadStatus::Ready:
status = tr("ready");
break;
- case ThreadStatus::WaitHLEEvent:
+ case Kernel::ThreadStatus::WaitHLEEvent:
status = tr("waiting for HLE return");
break;
- case ThreadStatus::WaitSleep:
+ case Kernel::ThreadStatus::WaitSleep:
status = tr("sleeping");
break;
- case ThreadStatus::WaitIPC:
+ case Kernel::ThreadStatus::WaitIPC:
status = tr("waiting for IPC reply");
break;
- case ThreadStatus::WaitSynchAll:
- case ThreadStatus::WaitSynchAny:
+ case Kernel::ThreadStatus::WaitSynchAll:
+ case Kernel::ThreadStatus::WaitSynchAny:
status = tr("waiting for objects");
break;
- case ThreadStatus::WaitMutex:
+ case Kernel::ThreadStatus::WaitMutex:
status = tr("waiting for mutex");
break;
- case ThreadStatus::WaitArb:
+ case Kernel::ThreadStatus::WaitArb:
status = tr("waiting for address arbiter");
break;
- case ThreadStatus::Dormant:
+ case Kernel::ThreadStatus::Dormant:
status = tr("dormant");
break;
- case ThreadStatus::Dead:
+ case Kernel::ThreadStatus::Dead:
status = tr("dead");
break;
}
@@ -254,23 +254,23 @@ QString WaitTreeThread::GetText() const {
QColor WaitTreeThread::GetColor() const {
const auto& thread = static_cast<const Kernel::Thread&>(object);
switch (thread.status) {
- case ThreadStatus::Running:
+ case Kernel::ThreadStatus::Running:
return QColor(Qt::GlobalColor::darkGreen);
- case ThreadStatus::Ready:
+ case Kernel::ThreadStatus::Ready:
return QColor(Qt::GlobalColor::darkBlue);
- case ThreadStatus::WaitHLEEvent:
- case ThreadStatus::WaitIPC:
+ case Kernel::ThreadStatus::WaitHLEEvent:
+ case Kernel::ThreadStatus::WaitIPC:
return QColor(Qt::GlobalColor::darkRed);
- case ThreadStatus::WaitSleep:
+ case Kernel::ThreadStatus::WaitSleep:
return QColor(Qt::GlobalColor::darkYellow);
- case ThreadStatus::WaitSynchAll:
- case ThreadStatus::WaitSynchAny:
- case ThreadStatus::WaitMutex:
- case ThreadStatus::WaitArb:
+ case Kernel::ThreadStatus::WaitSynchAll:
+ case Kernel::ThreadStatus::WaitSynchAny:
+ case Kernel::ThreadStatus::WaitMutex:
+ case Kernel::ThreadStatus::WaitArb:
return QColor(Qt::GlobalColor::red);
- case ThreadStatus::Dormant:
+ case Kernel::ThreadStatus::Dormant:
return QColor(Qt::GlobalColor::darkCyan);
- case ThreadStatus::Dead:
+ case Kernel::ThreadStatus::Dead:
return QColor(Qt::GlobalColor::gray);
default:
return WaitTreeItem::GetColor();
@@ -284,13 +284,13 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
QString processor;
switch (thread.processor_id) {
- case ThreadProcessorId::THREADPROCESSORID_DEFAULT:
+ case Kernel::ThreadProcessorId::THREADPROCESSORID_DEFAULT:
processor = tr("default");
break;
- case ThreadProcessorId::THREADPROCESSORID_0:
- case ThreadProcessorId::THREADPROCESSORID_1:
- case ThreadProcessorId::THREADPROCESSORID_2:
- case ThreadProcessorId::THREADPROCESSORID_3:
+ case Kernel::ThreadProcessorId::THREADPROCESSORID_0:
+ case Kernel::ThreadProcessorId::THREADPROCESSORID_1:
+ case Kernel::ThreadProcessorId::THREADPROCESSORID_2:
+ case Kernel::ThreadProcessorId::THREADPROCESSORID_3:
processor = tr("core %1").arg(thread.processor_id);
break;
default:
@@ -314,8 +314,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
else
list.push_back(std::make_unique<WaitTreeText>(tr("not waiting for mutex")));
- if (thread.status == ThreadStatus::WaitSynchAny ||
- thread.status == ThreadStatus::WaitSynchAll) {
+ if (thread.status == Kernel::ThreadStatus::WaitSynchAny ||
+ thread.status == Kernel::ThreadStatus::WaitSynchAll) {
list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects,
thread.IsSleepingOnWaitAll()));
}
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h
index f22e422e5..b6272d536 100644
--- a/src/yuzu/game_list_p.h
+++ b/src/yuzu/game_list_p.h
@@ -106,7 +106,7 @@ class GameListItemCompat : public GameListItem {
public:
static const int CompatNumberRole = Qt::UserRole + 1;
GameListItemCompat() = default;
- explicit GameListItemCompat(const QString& compatiblity) {
+ explicit GameListItemCompat(const QString& compatibility) {
struct CompatStatus {
QString color;
const char* text;
@@ -123,13 +123,13 @@ public:
{"99", {"#000000", QT_TR_NOOP("Not Tested"), QT_TR_NOOP("The game has not yet been tested.")}}};
// clang-format on
- auto iterator = status_data.find(compatiblity);
+ auto iterator = status_data.find(compatibility);
if (iterator == status_data.end()) {
- LOG_WARNING(Frontend, "Invalid compatibility number {}", compatiblity.toStdString());
+ LOG_WARNING(Frontend, "Invalid compatibility number {}", compatibility.toStdString());
return;
}
- CompatStatus status = iterator->second;
- setData(compatiblity, CompatNumberRole);
+ const CompatStatus& status = iterator->second;
+ setData(compatibility, CompatNumberRole);
setText(QObject::tr(status.text));
setToolTip(QObject::tr(status.tooltip));
setData(CreateCirclePixmapFromColor(status.color), Qt::DecorationRole);
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 22a317737..45bb1d1d1 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -804,7 +804,7 @@ void GMainWindow::OnMenuInstallToNAND() {
tr("Cancel"), 0, progress_maximum, this);
progress.setWindowModality(Qt::WindowModal);
- for (size_t i = 0; i < src->GetSize(); i += buffer.size()) {
+ for (std::size_t i = 0; i < src->GetSize(); i += buffer.size()) {
if (progress.wasCanceled()) {
dest->Resize(0);
return false;
diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp
index e99042a23..62c080aff 100644
--- a/src/yuzu/util/util.cpp
+++ b/src/yuzu/util/util.cpp
@@ -30,8 +30,9 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) {
QPixmap circle_pixmap(16, 16);
circle_pixmap.fill(Qt::transparent);
QPainter painter(&circle_pixmap);
+ painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(color);
painter.setBrush(color);
- painter.drawEllipse(0, 0, 15, 15);
+ painter.drawEllipse({circle_pixmap.width() / 2.0, circle_pixmap.height() / 2.0}, 7.0, 7.0);
return circle_pixmap;
}