From f1dd20b0ca92761ec07a62a8482891f9289ed3c5 Mon Sep 17 00:00:00 2001 From: mfeemster Date: Thu, 18 Feb 2016 19:31:06 -0800 Subject: [PATCH] --Bug fixes -Devices settings was empty on first run, so switching to OpenCL had no effect until the user manually selected a device in the options dialog. Fix by defaulting to device 0 if present. --- Source/Fractorium/FractoriumSettings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Fractorium/FractoriumSettings.cpp b/Source/Fractorium/FractoriumSettings.cpp index f3cdc6e..a45b6a5 100644 --- a/Source/Fractorium/FractoriumSettings.cpp +++ b/Source/Fractorium/FractoriumSettings.cpp @@ -17,6 +17,8 @@ FractoriumSettings::FractoriumSettings(QObject* p) /// void FractoriumSettings::EnsureDefaults() { + auto info = OpenCLInfo::Instance(); + if (FinalQuality() == 0) FinalQuality(1000); @@ -38,6 +40,9 @@ void FractoriumSettings::EnsureDefaults() if (XmlSupersample() == 0) XmlSupersample(2); + if (Devices().empty() && !info->Devices().empty()) + Devices(QList { 0 }); + if (ThreadCount() == 0 || ThreadCount() > Timing::ProcessorCount()) ThreadCount(std::max(1u, Timing::ProcessorCount() - 1));//Default to one less to keep the UI responsive for first time users.