diff options
| author | 2021-05-16 20:09:54 -0700 | |
|---|---|---|
| committer | 2021-05-16 20:09:54 -0700 | |
| commit | 0a74d8490ad935e6aed68abfd6f994860d3026ce (patch) | |
| tree | f98c5fdd46a058c930731db9c9942fb654a3756a /src | |
| parent | Merge pull request #6319 from Morph1984/no-install-base (diff) | |
| parent | yuzu/main: Fix version info in logging and about dialog (diff) | |
| download | yuzu-0a74d8490ad935e6aed68abfd6f994860d3026ce.tar.gz yuzu-0a74d8490ad935e6aed68abfd6f994860d3026ce.tar.xz yuzu-0a74d8490ad935e6aed68abfd6f994860d3026ce.zip | |
Merge pull request #6326 from Morph1984/fix-version
yuzu/main: Fix version info in logging and about dialog
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/about_dialog.cpp | 16 | ||||
| -rw-r--r-- | src/yuzu/aboutdialog.ui | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 13 |
3 files changed, 17 insertions, 14 deletions
diff --git a/src/yuzu/about_dialog.cpp b/src/yuzu/about_dialog.cpp index 695b2ef5f..a2e0e6962 100644 --- a/src/yuzu/about_dialog.cpp +++ b/src/yuzu/about_dialog.cpp | |||
| @@ -9,17 +9,19 @@ | |||
| 9 | #include "yuzu/about_dialog.h" | 9 | #include "yuzu/about_dialog.h" |
| 10 | 10 | ||
| 11 | AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) { | 11 | AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) { |
| 12 | const auto branch_name = std::string(Common::g_scm_branch); | ||
| 13 | const auto description = std::string(Common::g_scm_desc); | ||
| 12 | const auto build_id = std::string(Common::g_build_id); | 14 | const auto build_id = std::string(Common::g_build_id); |
| 13 | const auto fmt = std::string(Common::g_title_bar_format_idle); | 15 | |
| 14 | const auto yuzu_build_version = | 16 | const auto yuzu_build = fmt::format("yuzu Development Build | {}-{}", branch_name, description); |
| 15 | fmt::format(fmt.empty() ? "yuzu Development Build" : fmt, std::string{}, std::string{}, | 17 | const auto override_build = fmt::format(std::string(Common::g_title_bar_format_idle), build_id); |
| 16 | std::string{}, std::string{}, std::string{}, build_id); | 18 | const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; |
| 17 | 19 | ||
| 18 | ui->setupUi(this); | 20 | ui->setupUi(this); |
| 19 | ui->labelLogo->setPixmap(QIcon::fromTheme(QStringLiteral("yuzu")).pixmap(200)); | 21 | ui->labelLogo->setPixmap(QIcon::fromTheme(QStringLiteral("yuzu")).pixmap(200)); |
| 20 | ui->labelBuildInfo->setText(ui->labelBuildInfo->text().arg( | 22 | ui->labelBuildInfo->setText( |
| 21 | QString::fromStdString(yuzu_build_version), QString::fromUtf8(Common::g_scm_branch), | 23 | ui->labelBuildInfo->text().arg(QString::fromStdString(yuzu_build_version), |
| 22 | QString::fromUtf8(Common::g_scm_desc), QString::fromUtf8(Common::g_build_date).left(10))); | 24 | QString::fromUtf8(Common::g_build_date).left(10))); |
| 23 | } | 25 | } |
| 24 | 26 | ||
| 25 | AboutDialog::~AboutDialog() = default; | 27 | AboutDialog::~AboutDialog() = default; |
diff --git a/src/yuzu/aboutdialog.ui b/src/yuzu/aboutdialog.ui index 1b320630c..27d81cd13 100644 --- a/src/yuzu/aboutdialog.ui +++ b/src/yuzu/aboutdialog.ui | |||
| @@ -70,7 +70,7 @@ | |||
| 70 | </sizepolicy> | 70 | </sizepolicy> |
| 71 | </property> | 71 | </property> |
| 72 | <property name="text"> | 72 | <property name="text"> |
| 73 | <string><html><head/><body><p>%1 | %2-%3 (%4)</p></body></html></string> | 73 | <string><html><head/><body><p>%1 (%2)</p></body></html></string> |
| 74 | </property> | 74 | </property> |
| 75 | </widget> | 75 | </widget> |
| 76 | </item> | 76 | </item> |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 2c8649793..1d36cc02d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -241,14 +241,15 @@ GMainWindow::GMainWindow() | |||
| 241 | ConnectMenuEvents(); | 241 | ConnectMenuEvents(); |
| 242 | ConnectWidgetEvents(); | 242 | ConnectWidgetEvents(); |
| 243 | 243 | ||
| 244 | const auto branch_name = std::string(Common::g_scm_branch); | ||
| 245 | const auto description = std::string(Common::g_scm_desc); | ||
| 244 | const auto build_id = std::string(Common::g_build_id); | 246 | const auto build_id = std::string(Common::g_build_id); |
| 245 | const auto fmt = std::string(Common::g_title_bar_format_idle); | ||
| 246 | const auto yuzu_build_version = | ||
| 247 | fmt::format(fmt.empty() ? "yuzu Development Build" : fmt, std::string{}, std::string{}, | ||
| 248 | std::string{}, std::string{}, std::string{}, build_id); | ||
| 249 | 247 | ||
| 250 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", yuzu_build_version, Common::g_scm_branch, | 248 | const auto yuzu_build = fmt::format("yuzu Development Build | {}-{}", branch_name, description); |
| 251 | Common::g_scm_desc); | 249 | const auto override_build = fmt::format(std::string(Common::g_title_bar_format_idle), build_id); |
| 250 | const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; | ||
| 251 | |||
| 252 | LOG_INFO(Frontend, "yuzu Version: {}", yuzu_build_version); | ||
| 252 | #ifdef ARCHITECTURE_x86_64 | 253 | #ifdef ARCHITECTURE_x86_64 |
| 253 | const auto& caps = Common::GetCPUCaps(); | 254 | const auto& caps = Common::GetCPUCaps(); |
| 254 | std::string cpu_string = caps.cpu_string; | 255 | std::string cpu_string = caps.cpu_string; |