forked from eden-emu/eden
[meta] allow customisation of auto-updater, remove hardcoded title names and fix dup title names (#2588)
Right now on all platforms, sdl2 will display something like "Eden Eden | master-8gd8fg8", this fixes so it only displays `Eden` (the REPO_NAME) once. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: eden-emu/eden#2588 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
43a7470a7d
commit
91fb1df624
8 changed files with 43 additions and 19 deletions
|
@ -4192,23 +4192,25 @@ void GMainWindow::OnEmulatorUpdateAvailable() {
|
|||
update_prompt.addButton(QMessageBox::Yes);
|
||||
update_prompt.addButton(QMessageBox::Ignore);
|
||||
update_prompt.setText(
|
||||
tr("Update %1 for Eden is available.\nWould you like to download it?").arg(version_string));
|
||||
tr("Download the %1 update?").arg(version_string));
|
||||
update_prompt.exec();
|
||||
if (update_prompt.button(QMessageBox::Yes) == update_prompt.clickedButton()) {
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(QString::fromStdString("https://github.com/eden-emulator/Releases/releases/tag/") +
|
||||
version_string));
|
||||
auto const full_url = fmt::format("{}/{}/releases/tag/",
|
||||
std::string{Common::g_build_auto_update_website},
|
||||
std::string{Common::g_build_auto_update_repo}
|
||||
);
|
||||
QDesktopServices::openUrl(QUrl(QString::fromStdString(full_url) + version_string));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_view title_version,
|
||||
std::string_view gpu_vendor) {
|
||||
static const std::string description = std::string{Common::g_build_version};
|
||||
static const std::string build_id = std::string{Common::g_build_id};
|
||||
static const std::string compiler = std::string{Common::g_compiler_id};
|
||||
|
||||
static const std::string yuzu_title = fmt::format("Eden | {} | {}", description, compiler);
|
||||
static const std::string yuzu_title = fmt::format("{} | {} | {}",
|
||||
std::string{Common::g_build_name},
|
||||
std::string{Common::g_build_version},
|
||||
std::string{Common::g_compiler_id}
|
||||
);
|
||||
|
||||
const auto override_title =
|
||||
fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue