From 03fad5ebe86309cf22732ec9b8d3caf3da63f7b9 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 6 Jun 2020 15:56:14 -0400 Subject: yuzu/frontend: Remove internal resolution option --- src/yuzu/main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 270cccc77..4119d7907 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -689,10 +689,7 @@ void GMainWindow::InitializeHotkeys() { Settings::values.use_frame_limit = !Settings::values.use_frame_limit; UpdateStatusBar(); }); - // TODO: Remove this comment/static whenever the next major release of - // MSVC occurs and we make it a requirement (see: - // https://developercommunity.visualstudio.com/content/problem/93922/constexprs-are-trying-to-be-captured-in-lambda-fun.html) - static constexpr u16 SPEED_LIMIT_STEP = 5; + constexpr u16 SPEED_LIMIT_STEP = 5; connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Increase Speed Limit"), this), &QShortcut::activated, this, [&] { if (Settings::values.frame_limit < 9999 - SPEED_LIMIT_STEP) { -- 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