summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/settings.h1
-rw-r--r--src/yuzu/main.cpp42
-rw-r--r--src/yuzu/main.h2
3 files changed, 45 insertions, 0 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index ca1c3c1aa..c7610ef1c 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -76,6 +76,7 @@ enum class ScalingFilter : u32 {
enum class AntiAliasing : u32 {
None = 0,
Fxaa = 1,
+ LastAA = Fxaa,
};
struct ResolutionScalingInfo {
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 379bd0b17..d057dc889 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -774,6 +774,26 @@ void GMainWindow::InitializeWidgets() {
tas_label->setFocusPolicy(Qt::NoFocus);
statusBar()->insertPermanentWidget(0, tas_label);
+ // setup AA button
+ aa_status_button = new QPushButton();
+ aa_status_button->setObjectName(QStringLiteral("TogglableStatusBarButton"));
+ aa_status_button->setFocusPolicy(Qt::NoFocus);
+ connect(aa_status_button, &QPushButton::clicked, [&] {
+ auto aa_mode = Settings::values.anti_aliasing.GetValue();
+ if (aa_mode == Settings::AntiAliasing::LastAA) {
+ aa_mode = Settings::AntiAliasing::None;
+ } else {
+ aa_mode = static_cast<Settings::AntiAliasing>(static_cast<u32>(aa_mode) + 1);
+ }
+ Settings::values.anti_aliasing.SetValue(aa_mode);
+ aa_status_button->setChecked(true);
+ UpdateAAText();
+ });
+ UpdateAAText();
+ aa_status_button->setCheckable(true);
+ aa_status_button->setChecked(true);
+ statusBar()->insertPermanentWidget(0, aa_status_button);
+
// Setup Filter button
filter_status_button = new QPushButton();
filter_status_button->setObjectName(QStringLiteral("TogglableStatusBarButton"));
@@ -800,6 +820,7 @@ void GMainWindow::InitializeWidgets() {
}
UpdateFilterText();
filter_status_button->setCheckable(true);
+ filter_status_button->setChecked(true);
statusBar()->insertPermanentWidget(0, filter_status_button);
// Setup Dock button
@@ -872,6 +893,11 @@ void GMainWindow::InitializeWidgets() {
Settings::values.renderer_backend.SetValue(Settings::RendererBackend::Vulkan);
} else {
Settings::values.renderer_backend.SetValue(Settings::RendererBackend::OpenGL);
+ const auto filter = Settings::values.scaling_filter.GetValue();
+ if (filter == Settings::ScalingFilter::Fsr) {
+ Settings::values.scaling_filter.SetValue(Settings::ScalingFilter::NearestNeighbor);
+ UpdateFilterText();
+ }
}
system->ApplySettings();
@@ -3088,12 +3114,28 @@ void GMainWindow::UpdateFilterText() {
}
}
+void GMainWindow::UpdateAAText() {
+ const auto aa_mode = Settings::values.anti_aliasing.GetValue();
+ switch (aa_mode) {
+ case Settings::AntiAliasing::Fxaa:
+ aa_status_button->setText(tr("FXAA"));
+ break;
+ case Settings::AntiAliasing::None:
+ aa_status_button->setText(tr("NO AA"));
+ break;
+ default:
+ aa_status_button->setText(tr("FXAA"));
+ break;
+ }
+}
+
void GMainWindow::UpdateStatusButtons() {
dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue());
renderer_status_button->setChecked(Settings::values.renderer_backend.GetValue() ==
Settings::RendererBackend::Vulkan);
UpdateGPUAccuracyButton();
UpdateFilterText();
+ UpdateAAText();
}
void GMainWindow::UpdateUISettings() {
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index d4d2f3d58..24633ff2d 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -303,6 +303,7 @@ private:
void UpdateWindowTitle(std::string_view title_name = {}, std::string_view title_version = {},
std::string_view gpu_vendor = {});
void UpdateFilterText();
+ void UpdateAAText();
void UpdateStatusBar();
void UpdateGPUAccuracyButton();
void UpdateStatusButtons();
@@ -338,6 +339,7 @@ private:
QPushButton* renderer_status_button = nullptr;
QPushButton* dock_status_button = nullptr;
QPushButton* filter_status_button = nullptr;
+ QPushButton* aa_status_button = nullptr;
QTimer status_bar_update_timer;
std::unique_ptr<Config> config;