diff options
| author | 2023-06-09 09:46:11 -0400 | |
|---|---|---|
| committer | 2023-06-09 09:46:11 -0400 | |
| commit | 4d395b3b72b56510f49e28d2bbe1a7ca94377a0b (patch) | |
| tree | 99482b8014750174ead01df91526545c8dcd435e | |
| parent | Merge pull request #10623 from german77/backup (diff) | |
| parent | yuzu: add opengl shader backend info in status bar (diff) | |
| download | yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.gz yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.tar.xz yuzu-4d395b3b72b56510f49e28d2bbe1a7ca94377a0b.zip | |
Merge pull request #10614 from xcfrg/shader-backend-status-bar
yuzu: add opengl shader backend info in status bar
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.h | 1 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 8 |
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 | |||
| 101 | {Settings::RendererBackend::Null, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Null"))}, | 101 | {Settings::RendererBackend::Null, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Null"))}, |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | const std::map<Settings::ShaderBackend, QString> Config::shader_backend_texts_map = { | ||
| 105 | {Settings::ShaderBackend::GLSL, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLSL"))}, | ||
| 106 | {Settings::ShaderBackend::GLASM, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLASM"))}, | ||
| 107 | {Settings::ShaderBackend::SPIRV, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "SPIRV"))}, | ||
| 108 | }; | ||
| 109 | |||
| 104 | // This shouldn't have anything except static initializers (no functions). So | 110 | // This shouldn't have anything except static initializers (no functions). So |
| 105 | // QKeySequence(...).toString() is NOT ALLOWED HERE. | 111 | // QKeySequence(...).toString() is NOT ALLOWED HERE. |
| 106 | // This must be in alphabetical order according to action name as it must have the same order as | 112 | // 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: | |||
| 54 | static const std::map<bool, QString> use_docked_mode_texts_map; | 54 | static const std::map<bool, QString> use_docked_mode_texts_map; |
| 55 | static const std::map<Settings::GPUAccuracy, QString> gpu_accuracy_texts_map; | 55 | static const std::map<Settings::GPUAccuracy, QString> gpu_accuracy_texts_map; |
| 56 | static const std::map<Settings::RendererBackend, QString> renderer_backend_texts_map; | 56 | static const std::map<Settings::RendererBackend, QString> renderer_backend_texts_map; |
| 57 | static const std::map<Settings::ShaderBackend, QString> shader_backend_texts_map; | ||
| 57 | 58 | ||
| 58 | static constexpr UISettings::Theme default_theme{ | 59 | static constexpr UISettings::Theme default_theme{ |
| 59 | #ifdef _WIN32 | 60 | #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() { | |||
| 4116 | void GMainWindow::UpdateAPIText() { | 4116 | void GMainWindow::UpdateAPIText() { |
| 4117 | const auto api = Settings::values.renderer_backend.GetValue(); | 4117 | const auto api = Settings::values.renderer_backend.GetValue(); |
| 4118 | const auto renderer_status_text = Config::renderer_backend_texts_map.find(api)->second; | 4118 | const auto renderer_status_text = Config::renderer_backend_texts_map.find(api)->second; |
| 4119 | renderer_status_button->setText(renderer_status_text.toUpper()); | 4119 | renderer_status_button->setText( |
| 4120 | api == Settings::RendererBackend::OpenGL | ||
| 4121 | ? tr("%1 %2").arg( | ||
| 4122 | renderer_status_text.toUpper(), | ||
| 4123 | Config::shader_backend_texts_map.find(Settings::values.shader_backend.GetValue()) | ||
| 4124 | ->second) | ||
| 4125 | : renderer_status_text.toUpper()); | ||
| 4120 | } | 4126 | } |
| 4121 | 4127 | ||
| 4122 | void GMainWindow::UpdateFilterText() { | 4128 | void GMainWindow::UpdateFilterText() { |