summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-06-09 15:46:11 +0200
committerGitHub <noreply@github.com>2023-06-09 15:46:11 +0200
commit4d395b3b72b56510f49e28d2bbe1a7ca94377a0b (patch)
tree99482b8014750174ead01df91526545c8dcd435e /src
parentMerge pull request #10623 from german77/backup (diff)
parentyuzu: add opengl shader backend info in status bar (diff)
downloadyuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar
yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.gz
yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.bz2
yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.lz
yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.xz
yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.zst
yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/config.cpp6
-rw-r--r--src/yuzu/configuration/config.h1
-rw-r--r--src/yuzu/main.cpp8
3 files changed, 14 insertions, 1 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 6288fef62..fe12fa8f3 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -101,6 +101,12 @@ const std::map<Settings::RendererBackend, QString> Config::renderer_backend_text
{Settings::RendererBackend::Null, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Null"))},
};
+const std::map<Settings::ShaderBackend, QString> Config::shader_backend_texts_map = {
+ {Settings::ShaderBackend::GLSL, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLSL"))},
+ {Settings::ShaderBackend::GLASM, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLASM"))},
+ {Settings::ShaderBackend::SPIRV, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "SPIRV"))},
+};
+
// This shouldn't have anything except static initializers (no functions). So
// QKeySequence(...).toString() is NOT ALLOWED HERE.
// This must be in alphabetical order according to action name as it must have the same order as
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h
index ad590ea9e..0fd4baf6b 100644
--- a/src/yuzu/configuration/config.h
+++ b/src/yuzu/configuration/config.h
@@ -54,6 +54,7 @@ public:
static const std::map<bool, QString> use_docked_mode_texts_map;
static const std::map<Settings::GPUAccuracy, QString> gpu_accuracy_texts_map;
static const std::map<Settings::RendererBackend, QString> renderer_backend_texts_map;
+ static const std::map<Settings::ShaderBackend, QString> shader_backend_texts_map;
static constexpr UISettings::Theme default_theme{
#ifdef _WIN32
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 145fea5f1..9d06b21b6 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -4116,7 +4116,13 @@ void GMainWindow::UpdateDockedButton() {
void GMainWindow::UpdateAPIText() {
const auto api = Settings::values.renderer_backend.GetValue();
const auto renderer_status_text = Config::renderer_backend_texts_map.find(api)->second;
- renderer_status_button->setText(renderer_status_text.toUpper());
+ renderer_status_button->setText(
+ api == Settings::RendererBackend::OpenGL
+ ? tr("%1 %2").arg(
+ renderer_status_text.toUpper(),
+ Config::shader_backend_texts_map.find(Settings::values.shader_backend.GetValue())
+ ->second)
+ : renderer_status_text.toUpper());
}
void GMainWindow::UpdateFilterText() {