summaryrefslogtreecommitdiff
path: root/src/yuzu
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/configuration/config.cpp4
-rw-r--r--src/yuzu/configuration/configure_system.cpp8
-rw-r--r--src/yuzu/configuration/configure_system.ui29
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoint_observer.cpp6
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoint_observer.h8
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoints.cpp26
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoints.h11
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoints_p.h1
-rw-r--r--src/yuzu/debugger/graphics/graphics_surface.cpp34
-rw-r--r--src/yuzu/debugger/graphics/graphics_surface.h9
-rw-r--r--src/yuzu/debugger/wait_tree.h2
-rw-r--r--src/yuzu/main.cpp2
12 files changed, 89 insertions, 51 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 2f2d8c4c5..bf469ee73 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -105,6 +105,8 @@ void Config::ReadValues() {
qt_config->beginGroup("System");
Settings::values.use_docked_mode = qt_config->value("use_docked_mode", false).toBool();
+ Settings::values.username = qt_config->value("username", "yuzu").toString().toStdString();
+ Settings::values.language_index = qt_config->value("language_index", 1).toInt();
qt_config->endGroup();
qt_config->beginGroup("Miscellaneous");
@@ -215,6 +217,8 @@ void Config::SaveValues() {
qt_config->beginGroup("System");
qt_config->setValue("use_docked_mode", Settings::values.use_docked_mode);
+ qt_config->setValue("username", QString::fromStdString(Settings::values.username));
+ qt_config->setValue("language_index", Settings::values.language_index);
qt_config->endGroup();
qt_config->beginGroup("Miscellaneous");
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index d09505a0f..9be2c939c 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -4,9 +4,10 @@
#include <QMessageBox>
#include "core/core.h"
+#include "core/settings.h"
#include "ui_configure_system.h"
#include "yuzu/configuration/configure_system.h"
-#include "yuzu/ui_settings.h"
+#include "yuzu/main.h"
static const std::array<int, 12> days_in_month = {{
31,
@@ -38,6 +39,8 @@ ConfigureSystem::~ConfigureSystem() {}
void ConfigureSystem::setConfiguration() {
enabled = !Core::System::GetInstance().IsPoweredOn();
+ ui->edit_username->setText(QString::fromStdString(Settings::values.username));
+ ui->combo_language->setCurrentIndex(Settings::values.language_index);
}
void ConfigureSystem::ReadSystemSettings() {}
@@ -45,6 +48,9 @@ void ConfigureSystem::ReadSystemSettings() {}
void ConfigureSystem::applyConfiguration() {
if (!enabled)
return;
+ Settings::values.username = ui->edit_username->text().toStdString();
+ Settings::values.language_index = ui->combo_language->currentIndex();
+ Settings::Apply();
}
void ConfigureSystem::updateBirthdayComboBox(int birthmonth_index) {
diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui
index 8caf49623..f3f8db038 100644
--- a/src/yuzu/configuration/configure_system.ui
+++ b/src/yuzu/configuration/configure_system.ui
@@ -38,7 +38,7 @@
</sizepolicy>
</property>
<property name="maxLength">
- <number>10</number>
+ <number>32</number>
</property>
</widget>
</item>
@@ -164,7 +164,7 @@
</item>
<item>
<property name="text">
- <string>Simplified Chinese (简体中文)</string>
+ <string>Chinese</string>
</property>
</item>
<item>
@@ -187,6 +187,31 @@
<string>Russian (Русский)</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>Taiwanese</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>British English</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Canadian French</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Latin American Spanish</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Simplified Chinese</string>
+ </property>
+ </item>
<item>
<property name="text">
<string>Traditional Chinese (正體中文)</string>
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoint_observer.cpp b/src/yuzu/debugger/graphics/graphics_breakpoint_observer.cpp
index d6d61a739..5f459ccfb 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoint_observer.cpp
+++ b/src/yuzu/debugger/graphics/graphics_breakpoint_observer.cpp
@@ -10,12 +10,12 @@ BreakPointObserverDock::BreakPointObserverDock(std::shared_ptr<Tegra::DebugConte
: QDockWidget(title, parent), BreakPointObserver(debug_context) {
qRegisterMetaType<Tegra::DebugContext::Event>("Tegra::DebugContext::Event");
- connect(this, SIGNAL(Resumed()), this, SLOT(OnResumed()));
+ connect(this, &BreakPointObserverDock::Resumed, this, &BreakPointObserverDock::OnResumed);
// NOTE: This signal is emitted from a non-GUI thread, but connect() takes
// care of delaying its handling to the GUI thread.
- connect(this, SIGNAL(BreakPointHit(Tegra::DebugContext::Event, void*)), this,
- SLOT(OnBreakPointHit(Tegra::DebugContext::Event, void*)), Qt::BlockingQueuedConnection);
+ connect(this, &BreakPointObserverDock::BreakPointHit, this,
+ &BreakPointObserverDock::OnBreakPointHit, Qt::BlockingQueuedConnection);
}
void BreakPointObserverDock::OnMaxwellBreakPointHit(Tegra::DebugContext::Event event, void* data) {
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoint_observer.h b/src/yuzu/debugger/graphics/graphics_breakpoint_observer.h
index 9d05493cf..ab32f0115 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoint_observer.h
+++ b/src/yuzu/debugger/graphics/graphics_breakpoint_observer.h
@@ -23,11 +23,11 @@ public:
void OnMaxwellBreakPointHit(Tegra::DebugContext::Event event, void* data) override;
void OnMaxwellResume() override;
-private slots:
- virtual void OnBreakPointHit(Tegra::DebugContext::Event event, void* data) = 0;
- virtual void OnResumed() = 0;
-
signals:
void Resumed();
void BreakPointHit(Tegra::DebugContext::Event event, void* data);
+
+private:
+ virtual void OnBreakPointHit(Tegra::DebugContext::Event event, void* data) = 0;
+ virtual void OnResumed() = 0;
};
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
index f98cc8152..eb16a38a0 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
+++ b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
@@ -144,21 +144,25 @@ GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(
qRegisterMetaType<Tegra::DebugContext::Event>("Tegra::DebugContext::Event");
- connect(breakpoint_list, SIGNAL(doubleClicked(const QModelIndex&)), this,
- SLOT(OnItemDoubleClicked(const QModelIndex&)));
+ connect(breakpoint_list, &QTreeView::doubleClicked, this,
+ &GraphicsBreakPointsWidget::OnItemDoubleClicked);
- connect(resume_button, SIGNAL(clicked()), this, SLOT(OnResumeRequested()));
+ connect(resume_button, &QPushButton::clicked, this,
+ &GraphicsBreakPointsWidget::OnResumeRequested);
- connect(this, SIGNAL(BreakPointHit(Tegra::DebugContext::Event, void*)), this,
- SLOT(OnBreakPointHit(Tegra::DebugContext::Event, void*)), Qt::BlockingQueuedConnection);
- connect(this, SIGNAL(Resumed()), this, SLOT(OnResumed()));
+ connect(this, &GraphicsBreakPointsWidget::BreakPointHit, this,
+ &GraphicsBreakPointsWidget::OnBreakPointHit, Qt::BlockingQueuedConnection);
+ connect(this, &GraphicsBreakPointsWidget::Resumed, this, &GraphicsBreakPointsWidget::OnResumed);
- connect(this, SIGNAL(BreakPointHit(Tegra::DebugContext::Event, void*)), breakpoint_model,
- SLOT(OnBreakPointHit(Tegra::DebugContext::Event)), Qt::BlockingQueuedConnection);
- connect(this, SIGNAL(Resumed()), breakpoint_model, SLOT(OnResumed()));
+ connect(this, &GraphicsBreakPointsWidget::BreakPointHit, breakpoint_model,
+ &BreakPointModel::OnBreakPointHit, Qt::BlockingQueuedConnection);
+ connect(this, &GraphicsBreakPointsWidget::Resumed, breakpoint_model,
+ &BreakPointModel::OnResumed);
- connect(this, SIGNAL(BreakPointsChanged(const QModelIndex&, const QModelIndex&)),
- breakpoint_model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)));
+ connect(this, &GraphicsBreakPointsWidget::BreakPointsChanged,
+ [this](const QModelIndex& top_left, const QModelIndex& bottom_right) {
+ breakpoint_model->dataChanged(top_left, bottom_right);
+ });
QWidget* main_widget = new QWidget;
auto main_layout = new QVBoxLayout;
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints.h b/src/yuzu/debugger/graphics/graphics_breakpoints.h
index ae0ede2e8..a920a2ae5 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoints.h
+++ b/src/yuzu/debugger/graphics/graphics_breakpoints.h
@@ -26,18 +26,17 @@ public:
void OnMaxwellBreakPointHit(Tegra::DebugContext::Event event, void* data) override;
void OnMaxwellResume() override;
-public slots:
- void OnBreakPointHit(Tegra::DebugContext::Event event, void* data);
- void OnItemDoubleClicked(const QModelIndex&);
- void OnResumeRequested();
- void OnResumed();
-
signals:
void Resumed();
void BreakPointHit(Tegra::DebugContext::Event event, void* data);
void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
private:
+ void OnBreakPointHit(Tegra::DebugContext::Event event, void* data);
+ void OnItemDoubleClicked(const QModelIndex&);
+ void OnResumeRequested();
+ void OnResumed();
+
QLabel* status_text;
QPushButton* resume_button;
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints_p.h b/src/yuzu/debugger/graphics/graphics_breakpoints_p.h
index 35a6876ae..7112b87e6 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoints_p.h
+++ b/src/yuzu/debugger/graphics/graphics_breakpoints_p.h
@@ -25,7 +25,6 @@ public:
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
-public slots:
void OnBreakPointHit(Tegra::DebugContext::Event event);
void OnResumed();
diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp
index c41ff693b..ff3efcdaa 100644
--- a/src/yuzu/debugger/graphics/graphics_surface.cpp
+++ b/src/yuzu/debugger/graphics/graphics_surface.cpp
@@ -153,22 +153,24 @@ GraphicsSurfaceWidget::GraphicsSurfaceWidget(std::shared_ptr<Tegra::DebugContext
save_surface = new QPushButton(QIcon::fromTheme("document-save"), tr("Save"));
// Connections
- connect(this, SIGNAL(Update()), this, SLOT(OnUpdate()));
- connect(surface_source_list, SIGNAL(currentIndexChanged(int)), this,
- SLOT(OnSurfaceSourceChanged(int)));
- connect(surface_address_control, SIGNAL(ValueChanged(qint64)), this,
- SLOT(OnSurfaceAddressChanged(qint64)));
- connect(surface_width_control, SIGNAL(valueChanged(int)), this,
- SLOT(OnSurfaceWidthChanged(int)));
- connect(surface_height_control, SIGNAL(valueChanged(int)), this,
- SLOT(OnSurfaceHeightChanged(int)));
- connect(surface_format_control, SIGNAL(currentIndexChanged(int)), this,
- SLOT(OnSurfaceFormatChanged(int)));
- connect(surface_picker_x_control, SIGNAL(valueChanged(int)), this,
- SLOT(OnSurfacePickerXChanged(int)));
- connect(surface_picker_y_control, SIGNAL(valueChanged(int)), this,
- SLOT(OnSurfacePickerYChanged(int)));
- connect(save_surface, SIGNAL(clicked()), this, SLOT(SaveSurface()));
+ connect(this, &GraphicsSurfaceWidget::Update, this, &GraphicsSurfaceWidget::OnUpdate);
+ connect(surface_source_list,
+ static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
+ &GraphicsSurfaceWidget::OnSurfaceSourceChanged);
+ connect(surface_address_control, &CSpinBox::ValueChanged, this,
+ &GraphicsSurfaceWidget::OnSurfaceAddressChanged);
+ connect(surface_width_control, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ this, &GraphicsSurfaceWidget::OnSurfaceWidthChanged);
+ connect(surface_height_control, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ this, &GraphicsSurfaceWidget::OnSurfaceHeightChanged);
+ connect(surface_format_control,
+ static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
+ &GraphicsSurfaceWidget::OnSurfaceFormatChanged);
+ connect(surface_picker_x_control, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ this, &GraphicsSurfaceWidget::OnSurfacePickerXChanged);
+ connect(surface_picker_y_control, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ this, &GraphicsSurfaceWidget::OnSurfacePickerYChanged);
+ connect(save_surface, &QPushButton::clicked, this, &GraphicsSurfaceWidget::SaveSurface);
auto main_widget = new QWidget;
auto main_layout = new QVBoxLayout;
diff --git a/src/yuzu/debugger/graphics/graphics_surface.h b/src/yuzu/debugger/graphics/graphics_surface.h
index 6a344bdfc..58f9db465 100644
--- a/src/yuzu/debugger/graphics/graphics_surface.h
+++ b/src/yuzu/debugger/graphics/graphics_surface.h
@@ -65,16 +65,15 @@ public slots:
void OnSurfacePickerYChanged(int new_value);
void OnUpdate();
-private slots:
+signals:
+ void Update();
+
+private:
void OnBreakPointHit(Tegra::DebugContext::Event event, void* data) override;
void OnResumed() override;
void SaveSurface();
-signals:
- void Update();
-
-private:
QComboBox* surface_source_list;
CSpinBox* surface_address_control;
QSpinBox* surface_width_control;
diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h
index 10fc9e968..6cbce6856 100644
--- a/src/yuzu/debugger/wait_tree.h
+++ b/src/yuzu/debugger/wait_tree.h
@@ -9,7 +9,7 @@
#include <QTreeView>
#include <boost/container/flat_set.hpp>
#include "core/core.h"
-#include "core/hle/kernel/kernel.h"
+#include "core/hle/kernel/object.h"
class EmuThread;
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 34d4f0754..eac41553a 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -403,7 +403,7 @@ bool GMainWindow::LoadROM(const QString& filename) {
system.SetGPUDebugContext(debug_context);
- const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())};
+ const Core::System::ResultStatus result{system.Load(*render_window, filename.toStdString())};
render_window->DoneCurrent();