From 9f82a9a2444a232e746992fa89084b928255cb63 Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Wed, 20 May 2020 21:28:16 +0200 Subject: crypto: Make KeyManager a singleton class Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list. With this change, it is only loaded once. On my system, this decreased game list loading times by a factor of 20. --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0a6839b2d..62f9d2ab2 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2116,7 +2116,7 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) { "title.keys_autogenerated"); } - Core::Crypto::KeyManager keys{}; + Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::instance(); if (keys.BaseDeriveNecessary()) { Core::Crypto::PartitionDataManager pdm{vfs->OpenDirectory( FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir), FileSys::Mode::Read)}; -- cgit v1.2.3 From 20a779299a62808b4e4bbc7bfde6e9e4487a857d Mon Sep 17 00:00:00 2001 From: unknown <27208977+FreddyFunk@users.noreply.github.com> Date: Mon, 8 Jun 2020 23:58:04 +0200 Subject: Add game versio to title bar --- src/yuzu/main.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 270cccc77..f552b9401 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1037,17 +1037,19 @@ void GMainWindow::BootGame(const QString& filename) { const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID(); std::string title_name; + std::string title_version; const auto res = Core::System::GetInstance().GetGameName(title_name); - if (res != Loader::ResultStatus::Success) { - const auto metadata = FileSys::PatchManager(title_id).GetControlMetadata(); - if (metadata.first != nullptr) - title_name = metadata.first->GetApplicationName(); - if (title_name.empty()) - title_name = FileUtil::GetFilename(filename.toStdString()); + const auto metadata = FileSys::PatchManager(title_id).GetControlMetadata(); + if (metadata.first != nullptr) { + title_version = metadata.first->GetVersionString(); + title_name = metadata.first->GetApplicationName(); } - LOG_INFO(Frontend, "Booting game: {:016X} | {}", title_id, title_name); - UpdateWindowTitle(QString::fromStdString(title_name)); + if (res != Loader::ResultStatus::Success || title_name.empty()) { + title_name = FileUtil::GetFilename(filename.toStdString()); + } + LOG_INFO(Frontend, "Booting game: {:016X} | {} | {}", title_id, title_name, title_version); + UpdateWindowTitle(title_name, title_version); loading_screen->Prepare(Core::System::GetInstance().GetAppLoader()); loading_screen->show(); @@ -1995,7 +1997,8 @@ void GMainWindow::OnCaptureScreenshot() { OnStartGame(); } -void GMainWindow::UpdateWindowTitle(const QString& title_name) { +void GMainWindow::UpdateWindowTitle(const std::string& title_name, + const std::string& title_version) { const auto full_name = std::string(Common::g_build_fullname); const auto branch_name = std::string(Common::g_scm_branch); const auto description = std::string(Common::g_scm_desc); @@ -2004,7 +2007,7 @@ void GMainWindow::UpdateWindowTitle(const QString& title_name) { const auto date = QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd")).toStdString(); - if (title_name.isEmpty()) { + if (title_name.empty()) { const auto fmt = std::string(Common::g_title_bar_format_idle); setWindowTitle(QString::fromStdString(fmt::format(fmt.empty() ? "yuzu {0}| {1}-{2}" : fmt, full_name, branch_name, description, @@ -2012,8 +2015,8 @@ void GMainWindow::UpdateWindowTitle(const QString& title_name) { } else { const auto fmt = std::string(Common::g_title_bar_format_running); setWindowTitle(QString::fromStdString( - fmt::format(fmt.empty() ? "yuzu {0}| {3} | {1}-{2}" : fmt, full_name, branch_name, - description, title_name.toStdString(), date, build_id))); + fmt::format(fmt.empty() ? "yuzu {0}| {3} | {4} | {1}-{2}" : fmt, full_name, branch_name, + description, title_name, title_version, date, build_id))); } } -- cgit v1.2.3 From 9bb5bf0b2bf62207c117f05aa76d0540b6e106fd Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 16 May 2020 07:35:15 -0400 Subject: main: Append AVX and FMA instructions to cpu string Append AVX and FMA instructions to cpu string if the host cpu supports them --- src/yuzu/main.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 4119d7907..059b96e70 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -217,7 +217,20 @@ GMainWindow::GMainWindow() LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", yuzu_build_version, Common::g_scm_branch, Common::g_scm_desc); #ifdef ARCHITECTURE_x86_64 - LOG_INFO(Frontend, "Host CPU: {}", Common::GetCPUCaps().cpu_string); + const auto& caps = Common::GetCPUCaps(); + std::string cpu_string = caps.cpu_string; + if (caps.avx || caps.avx2 || caps.avx512) { + cpu_string += " | AVX"; + if (caps.avx512) { + cpu_string += "512"; + } else if (caps.avx2) { + cpu_string += '2'; + } + if (caps.fma || caps.fma4) { + cpu_string += " | FMA"; + } + } + LOG_INFO(Frontend, "Host CPU: {}", cpu_string); #endif LOG_INFO(Frontend, "Host OS: {}", QSysInfo::prettyProductName().toStdString()); LOG_INFO(Frontend, "Host RAM: {:.2f} GB", -- cgit v1.2.3 From b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Sun, 21 Jun 2020 06:09:28 +0200 Subject: Add a "Open Mods Page" button to the GUI --- src/yuzu/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 270cccc77..826f8903b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -57,6 +57,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include #include #include +#include #include #include "common/common_paths.h" @@ -826,6 +827,7 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); + connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnSwitchModsPage); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); @@ -1797,6 +1799,17 @@ void GMainWindow::OnMenuReportCompatibility() { } } +void GMainWindow::OnSwitchModsPage() { + const std::string mods_page_url = "https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"; + const QString mods_page_url_qs = QString::fromStdString(mods_page_url); + const QUrl mods_page(mods_page_url_qs); + const bool open = QDesktopServices::openUrl(mods_page); + if (!open) { + QMessageBox::warning(this, tr("Error opening URL"), + tr("Unable to open the URL \"%1\".").arg(mods_page_url_qs)); + } +} + void GMainWindow::ToggleFullscreen() { if (!emulation_running) { return; -- cgit v1.2.3 From 606e833d26a279dc1621b48b21994f1a6de3bf17 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Sun, 21 Jun 2020 06:12:23 +0200 Subject: Address review comment by Lioncash Co-authored-by: LC --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 826f8903b..0ce7cd62a 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1800,7 +1800,7 @@ void GMainWindow::OnMenuReportCompatibility() { } void GMainWindow::OnSwitchModsPage() { - const std::string mods_page_url = "https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"; + const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"); const QString mods_page_url_qs = QString::fromStdString(mods_page_url); const QUrl mods_page(mods_page_url_qs); const bool open = QDesktopServices::openUrl(mods_page); -- cgit v1.2.3 From d11b04ed46b2c6720e9bb222e98482097274a1f5 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Sun, 21 Jun 2020 06:16:03 +0200 Subject: Remove unnecessary conversion --- src/yuzu/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0ce7cd62a..6e6e5dffe 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1801,12 +1801,11 @@ void GMainWindow::OnMenuReportCompatibility() { void GMainWindow::OnSwitchModsPage() { const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"); - const QString mods_page_url_qs = QString::fromStdString(mods_page_url); - const QUrl mods_page(mods_page_url_qs); + const QUrl mods_page(mods_page_url); const bool open = QDesktopServices::openUrl(mods_page); if (!open) { QMessageBox::warning(this, tr("Error opening URL"), - tr("Unable to open the URL \"%1\".").arg(mods_page_url_qs)); + tr("Unable to open the URL \"%1\".").arg(mods_page_url)); } } -- cgit v1.2.3 From 23d57ed4f733731206abcd4d9db7d8bdb34208e7 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Sun, 21 Jun 2020 06:17:46 +0200 Subject: Clang-format --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 6e6e5dffe..e53c65f81 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -56,8 +56,8 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include #include #include -#include #include +#include #include #include "common/common_paths.h" -- cgit v1.2.3 From 409fedaf974f6c6add862a518c8fa5e7c8a341b1 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Sun, 21 Jun 2020 18:10:23 +0200 Subject: Correct function name (2/2) --- src/yuzu/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e53c65f81..cb36bb869 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -827,7 +827,7 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); - connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnSwitchModsPage); + connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); @@ -1799,7 +1799,7 @@ void GMainWindow::OnMenuReportCompatibility() { } } -void GMainWindow::OnSwitchModsPage() { +void GMainWindow::OnOpenModsPage() { const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"); const QUrl mods_page(mods_page_url); const bool open = QDesktopServices::openUrl(mods_page); -- cgit v1.2.3 From 8cf6efe6776d8c931ede4e5e74b25b70e3619903 Mon Sep 17 00:00:00 2001 From: unknown <27208977+FreddyFunk@users.noreply.github.com> Date: Mon, 22 Jun 2020 15:56:41 +0200 Subject: Reorder variables to comply with the Auzure build pipeline --- src/yuzu/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f552b9401..42bbf8b35 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2015,8 +2015,8 @@ void GMainWindow::UpdateWindowTitle(const std::string& title_name, } else { const auto fmt = std::string(Common::g_title_bar_format_running); setWindowTitle(QString::fromStdString( - fmt::format(fmt.empty() ? "yuzu {0}| {3} | {4} | {1}-{2}" : fmt, full_name, branch_name, - description, title_name, title_version, date, build_id))); + fmt::format(fmt.empty() ? "yuzu {0}| {3} | {6} | {1}-{2}" : fmt, full_name, branch_name, + description, title_name, date, build_id, title_version))); } } -- cgit v1.2.3 From 57b93395a87fae470ef489aa89f1f38633028c4b Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:02:33 +0200 Subject: Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu While we're at it, also refactor the function used by OnOpenModsPage to be compatible with other URLs --- src/yuzu/main.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 270cccc77..ecafbfb00 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -56,6 +56,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include #include #include +#include #include #include @@ -826,6 +827,9 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); + connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); + connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, &GMainWindow::OnQuickstartGuide); + connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnFAQ); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); @@ -1797,6 +1801,28 @@ void GMainWindow::OnMenuReportCompatibility() { } } +void GMainWindow::OpenURL(QString const& url_str) { + + const QUrl url{url_str}; + const bool open = QDesktopServices::openUrl(url); + if (!open) { + QMessageBox::warning(this, tr("Error opening URL"), + tr("Unable to open the URL \"%1\".").arg(url_str)); + } +} + +void GMainWindow::OnOpenModsPage() { + this->OpenURL(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods")); +} + +void GMainWindow::OnQuickstartGuide() { + this->OpenURL(QStringLiteral("https://yuzu-emu.org/help/quickstart/")); +} + +void GMainWindow::OnFAQ() { + this->OpenURL(QStringLiteral("https://yuzu-emu.org/wiki/faq/")); +} + void GMainWindow::ToggleFullscreen() { if (!emulation_running) { return; -- cgit v1.2.3 From 5f6e44552a65421f88dc79133aa8fa1d202ab7ff Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:07:58 +0200 Subject: Fix typo --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ecafbfb00..e454347d9 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1801,7 +1801,7 @@ void GMainWindow::OnMenuReportCompatibility() { } } -void GMainWindow::OpenURL(QString const& url_str) { +void GMainWindow::OpenURL(const QString& url_str) { const QUrl url{url_str}; const bool open = QDesktopServices::openUrl(url); -- cgit v1.2.3 From 9e7ac6a009002aacba48f9c167efc58cfe34241d Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:31:01 +0200 Subject: Use QUrl (2/2) --- src/yuzu/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e454347d9..a2f637b96 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1801,26 +1801,25 @@ void GMainWindow::OnMenuReportCompatibility() { } } -void GMainWindow::OpenURL(const QString& url_str) { +void GMainWindow::OpenURL(QUrl const& url) { - const QUrl url{url_str}; const bool open = QDesktopServices::openUrl(url); if (!open) { QMessageBox::warning(this, tr("Error opening URL"), - tr("Unable to open the URL \"%1\".").arg(url_str)); + tr("Unable to open the URL \"%1\".").arg(url.toString())); } } void GMainWindow::OnOpenModsPage() { - this->OpenURL(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods")); + OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"))); } void GMainWindow::OnQuickstartGuide() { - this->OpenURL(QStringLiteral("https://yuzu-emu.org/help/quickstart/")); + OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); } void GMainWindow::OnFAQ() { - this->OpenURL(QStringLiteral("https://yuzu-emu.org/wiki/faq/")); + OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/"))); } void GMainWindow::ToggleFullscreen() { -- cgit v1.2.3 From a46df409397855812812e83ae3ed6ce6261b72cb Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:32:43 +0200 Subject: Fix typo 2: electric boogaloo --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index a2f637b96..b78f81095 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1801,7 +1801,7 @@ void GMainWindow::OnMenuReportCompatibility() { } } -void GMainWindow::OpenURL(QUrl const& url) { +void GMainWindow::OpenURL(const QUrl& url) { const bool open = QDesktopServices::openUrl(url); if (!open) { -- cgit v1.2.3 From 6582857356445d515aa70fb93c72c03c7c3d7928 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:38:38 +0200 Subject: Remove unnecessary newline --- src/yuzu/main.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 4810b161a..9f552e3d2 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1812,7 +1812,6 @@ void GMainWindow::OnMenuReportCompatibility() { } void GMainWindow::OpenURL(const QUrl& url) { - const bool open = QDesktopServices::openUrl(url); if (!open) { QMessageBox::warning(this, tr("Error opening URL"), -- cgit v1.2.3 From b9f0b9dd06f7bdbbc701261ffa8cb2688569fc40 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:40:53 +0200 Subject: Clang-format --- src/yuzu/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 9f552e3d2..3d8f8e534 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -838,7 +838,8 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); - connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, &GMainWindow::OnQuickstartGuide); + connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, + &GMainWindow::OnQuickstartGuide); connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnFAQ); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); -- cgit v1.2.3 From 7d08d548a94377e4794acb770bc9b5bb2dac9130 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:44:41 +0200 Subject: Clang-format again --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3d8f8e534..267b0e75d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -838,7 +838,7 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); - connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, + connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, &GMainWindow::OnQuickstartGuide); connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnFAQ); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); -- cgit v1.2.3 From 3eb8efc09574f7a49d11cccecc245674b7282fa2 Mon Sep 17 00:00:00 2001 From: Kewlan Date: Thu, 25 Jun 2020 21:05:03 +0200 Subject: Add a "Mute Audio" hotkey --- src/yuzu/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 059b96e70..6516f279a 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -736,6 +736,9 @@ void GMainWindow::InitializeHotkeys() { Settings::values.use_docked_mode); dock_status_button->setChecked(Settings::values.use_docked_mode); }); + connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Mute Audio"), this), + &QShortcut::activated, this, + [] { Settings::values.audio_muted = !Settings::values.audio_muted; }); } void GMainWindow::SetDefaultUIGeometry() { -- cgit v1.2.3 From 0b86c7eb6a22528f41e94500bb7eba55cd3c3217 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Fri, 26 Jun 2020 18:50:28 +0200 Subject: Update function name (2/2) --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 267b0e75d..d12f7c074 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1824,7 +1824,7 @@ void GMainWindow::OnOpenModsPage() { OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"))); } -void GMainWindow::OnQuickstartGuide() { +void GMainWindow::OnOpenQuickstartGuide() { OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); } -- cgit v1.2.3 From 9e1975a166c686980420672bbfe1da9aee3fa57f Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Fri, 26 Jun 2020 18:51:12 +0200 Subject: Update function name again --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index d12f7c074..e597f9733 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -839,7 +839,7 @@ void GMainWindow::ConnectMenuEvents() { &GMainWindow::OnMenuReportCompatibility); connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, - &GMainWindow::OnQuickstartGuide); + &GMainWindow::OnOpenQuickstartGuide); connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnFAQ); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); -- cgit v1.2.3 From b1f4de78741108d0df3a03ae5ba0482e1d2d531e Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Sat, 27 Jun 2020 02:14:29 +0200 Subject: Update FAQ function name (2/2) --- src/yuzu/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e597f9733..e83843a03 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -840,7 +840,7 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, &GMainWindow::OnOpenQuickstartGuide); - connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnFAQ); + connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnOpenFAQ); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); @@ -1828,7 +1828,7 @@ void GMainWindow::OnOpenQuickstartGuide() { OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); } -void GMainWindow::OnFAQ() { +void GMainWindow::OnOpenFAQ() { OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/"))); } -- cgit v1.2.3 From 323eb86c9fc5ad415b7a33c0f0699aa7a1095e4b Mon Sep 17 00:00:00 2001 From: Kewlan Date: Thu, 25 Jun 2020 22:54:05 +0200 Subject: Fix issues caused when changing the fullscreen hotkey --- src/yuzu/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 059b96e70..0820f8c7e 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -666,6 +666,11 @@ void GMainWindow::InitializeHotkeys() { ui.action_Capture_Screenshot->setShortcutContext( hotkey_registry.GetShortcutContext(main_window, capture_screenshot)); + ui.action_Fullscreen->setShortcut( + hotkey_registry.GetHotkey(main_window, fullscreen, this)->key()); + ui.action_Fullscreen->setShortcutContext( + hotkey_registry.GetShortcutContext(main_window, fullscreen)); + connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Load File"), this), &QShortcut::activated, this, &GMainWindow::OnMenuLoadFile); connect( @@ -849,10 +854,6 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Reset_Window_Size, &QAction::triggered, this, &GMainWindow::ResetWindowSize); // Fullscreen - ui.action_Fullscreen->setShortcut( - hotkey_registry - .GetHotkey(QStringLiteral("Main Window"), QStringLiteral("Fullscreen"), this) - ->key()); connect(ui.action_Fullscreen, &QAction::triggered, this, &GMainWindow::ToggleFullscreen); // Movie -- cgit v1.2.3 From dc580582034fb5937aa53176fdaa4bd0fc4acce8 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 25 Feb 2020 11:12:46 -0400 Subject: General: Setup yuzu threads' microprofile, naming and registry. --- src/yuzu/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ba69139e5..de0c7fe8c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -925,6 +925,8 @@ bool GMainWindow::LoadROM(const QString& filename) { nullptr, // E-Commerce }); + system.RegisterHostThread(); + const Core::System::ResultStatus result{system.Load(*render_window, filename.toStdString())}; const auto drd_callout = -- cgit v1.2.3 From 5d3a2be04f265c2d6a8687431593029f7329060f Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 15 Mar 2020 21:34:22 -0400 Subject: GUI: Make multicore only work with Async and add GUI for multicore. --- src/yuzu/main.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index de0c7fe8c..f1d9ec326 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -534,14 +534,34 @@ void GMainWindow::InitializeWidgets() { if (emulation_running) { return; } - Settings::values.use_asynchronous_gpu_emulation = - !Settings::values.use_asynchronous_gpu_emulation; + bool is_async = !Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; + Settings::values.use_asynchronous_gpu_emulation = is_async; async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); Settings::Apply(); }); async_status_button->setText(tr("ASYNC")); async_status_button->setCheckable(true); async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); + + // Setup Multicore button + multicore_status_button = new QPushButton(); + multicore_status_button->setObjectName(QStringLiteral("TogglableStatusBarButton")); + multicore_status_button->setFocusPolicy(Qt::NoFocus); + connect(multicore_status_button, &QPushButton::clicked, [&] { + if (emulation_running) { + return; + } + Settings::values.use_multi_core = !Settings::values.use_multi_core; + bool is_async = Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; + Settings::values.use_asynchronous_gpu_emulation = is_async; + async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); + multicore_status_button->setChecked(Settings::values.use_multi_core); + Settings::Apply(); + }); + multicore_status_button->setText(tr("MULTICORE")); + multicore_status_button->setCheckable(true); + multicore_status_button->setChecked(Settings::values.use_multi_core); + statusBar()->insertPermanentWidget(0, multicore_status_button); statusBar()->insertPermanentWidget(0, async_status_button); // Setup Renderer API button @@ -1043,6 +1063,7 @@ void GMainWindow::BootGame(const QString& filename) { } status_bar_update_timer.start(2000); async_status_button->setDisabled(true); + multicore_status_button->setDisabled(true); renderer_status_button->setDisabled(true); if (UISettings::values.hide_mouse) { @@ -1130,6 +1151,7 @@ void GMainWindow::ShutdownGame() { game_fps_label->setVisible(false); emu_frametime_label->setVisible(false); async_status_button->setEnabled(true); + multicore_status_button->setEnabled(true); #ifdef HAS_VULKAN renderer_status_button->setEnabled(true); #endif @@ -1935,7 +1957,10 @@ void GMainWindow::OnConfigure() { } dock_status_button->setChecked(Settings::values.use_docked_mode); + multicore_status_button->setChecked(Settings::values.use_multi_core); + Settings::values.use_asynchronous_gpu_emulation = Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); + #ifdef HAS_VULKAN renderer_status_button->setChecked(Settings::values.renderer_backend == Settings::RendererBackend::Vulkan); -- cgit v1.2.3 From 467d43570e10b98fa33067352d35fe62ceb3cb9e Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 8 May 2020 18:53:13 -0400 Subject: Clang Format. --- src/yuzu/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f1d9ec326..53790c89c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -534,7 +534,8 @@ void GMainWindow::InitializeWidgets() { if (emulation_running) { return; } - bool is_async = !Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; + bool is_async = + !Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; Settings::values.use_asynchronous_gpu_emulation = is_async; async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); Settings::Apply(); @@ -552,7 +553,8 @@ void GMainWindow::InitializeWidgets() { return; } Settings::values.use_multi_core = !Settings::values.use_multi_core; - bool is_async = Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; + bool is_async = + Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; Settings::values.use_asynchronous_gpu_emulation = is_async; async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); multicore_status_button->setChecked(Settings::values.use_multi_core); @@ -1958,7 +1960,8 @@ void GMainWindow::OnConfigure() { dock_status_button->setChecked(Settings::values.use_docked_mode); multicore_status_button->setChecked(Settings::values.use_multi_core); - Settings::values.use_asynchronous_gpu_emulation = Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; + Settings::values.use_asynchronous_gpu_emulation = + Settings::values.use_asynchronous_gpu_emulation || Settings::values.use_multi_core; async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation); #ifdef HAS_VULKAN -- cgit v1.2.3 From 0e4c35c591bec72525b128336254feb76c4adc73 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 9 May 2020 15:02:23 -0400 Subject: YuzuQT: Hide Speed UI on Multicore. --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 53790c89c..82625e67f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2090,7 +2090,7 @@ void GMainWindow::UpdateStatusBar() { game_fps_label->setText(tr("Game: %1 FPS").arg(results.game_fps, 0, 'f', 0)); emu_frametime_label->setText(tr("Frame: %1 ms").arg(results.frametime * 1000.0, 0, 'f', 2)); - emu_speed_label->setVisible(true); + emu_speed_label->setVisible(!Settings::values.use_multi_core); game_fps_label->setVisible(true); emu_frametime_label->setVisible(true); } -- cgit v1.2.3 From fb13f053bb6ef304bc7656b521727c87eff697f1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 1 Jul 2020 00:28:49 -0400 Subject: key_manager: Correct casing of instance() Our codebase uppercases member function names. --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f586950e7..fb299a39b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2226,7 +2226,7 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) { "title.keys_autogenerated"); } - Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::instance(); + Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::Instance(); if (keys.BaseDeriveNecessary()) { Core::Crypto::PartitionDataManager pdm{vfs->OpenDirectory( FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir), FileSys::Mode::Read)}; -- cgit v1.2.3