From 26a1d4fc371da91c11cb0a33a2a07cfdc822165b Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Wed, 26 Oct 2022 15:03:55 +0200 Subject: yuzu/compatdb: Rework compatibility submission system Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com> --- src/yuzu/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 7b16d7f7e..ee7de910f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2803,6 +2803,20 @@ void GMainWindow::ErrorDisplayDisplayError(QString error_code, QString error_tex } void GMainWindow::OnMenuReportCompatibility() { + const auto& caps = Common::GetCPUCaps(); + const bool has_fma = caps.fma || caps.fma4; + const auto processor_count = std::thread::hardware_concurrency(); + const bool has_4threads = processor_count == 0 || processor_count >= 4; + const bool has_8gb_ram = Common::GetMemInfo().TotalPhysicalMemory >= 8000000000; + const bool has_broken_vulkan = UISettings::values.has_broken_vulkan; + + if (!has_fma || !has_4threads || !has_8gb_ram || has_broken_vulkan) { + QMessageBox::critical(this, tr("Hardware requirements not met"), + tr("Your system does not meet the recommended hardware requirements. " + "Compatibility reporting has been disabled.")); + return; + } + if (!Settings::values.yuzu_token.GetValue().empty() && !Settings::values.yuzu_username.GetValue().empty()) { CompatDB compatdb{system->TelemetrySession(), this}; -- cgit v1.2.3 From 211da31b34c754c69299f2553be4a42e4867f29c Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 11 Nov 2022 19:15:52 +0100 Subject: yuzu/main: Change to 8_GiB instead of magic number Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> --- 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 ee7de910f..ccae2b828 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2807,7 +2807,7 @@ void GMainWindow::OnMenuReportCompatibility() { const bool has_fma = caps.fma || caps.fma4; const auto processor_count = std::thread::hardware_concurrency(); const bool has_4threads = processor_count == 0 || processor_count >= 4; - const bool has_8gb_ram = Common::GetMemInfo().TotalPhysicalMemory >= 8000000000; + const bool has_8gb_ram = Common::GetMemInfo().TotalPhysicalMemory >= 8_GiB; const bool has_broken_vulkan = UISettings::values.has_broken_vulkan; if (!has_fma || !has_4threads || !has_8gb_ram || has_broken_vulkan) { -- cgit v1.2.3