--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.
This commit is contained in:
mfeemster 2016-02-18 19:31:06 -08:00
parent c09457d5fe
commit f1dd20b0ca

View File

@ -17,6 +17,8 @@ FractoriumSettings::FractoriumSettings(QObject* p)
/// </summary>
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<QVariant> { 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.