From d3075f049dc745020fa8b28238a1886bde4030f0 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Fri, 3 Oct 2014 12:58:44 +1000 Subject: [PATCH] Clean up OpenGL/BrokenGL startup messages a bit, remove unused Angle related stuff --- sleepyhead/docs/release_notes.html | 1 + sleepyhead/main.cpp | 38 +++++++++++++----------------- sleepyhead/scripts/build_number | 1 - 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/sleepyhead/docs/release_notes.html b/sleepyhead/docs/release_notes.html index 30edc097..c7c62b4a 100644 --- a/sleepyhead/docs/release_notes.html +++ b/sleepyhead/docs/release_notes.html @@ -27,6 +27,7 @@ to set minimum/maximum values (that SleepyHead wasn't honouring properly anyway)
Bug fixes in v0.9.8-1 +
  • Made daily view left panel, and the right sidebar size changes persitent
  • Windows build related fixes
  • Increase brightness steps between barchart segments
  • Put Export CSV back
  • diff --git a/sleepyhead/main.cpp b/sleepyhead/main.cpp index 6c294f76..75af6027 100644 --- a/sleepyhead/main.cpp +++ b/sleepyhead/main.cpp @@ -155,33 +155,29 @@ int main(int argc, char *argv[]) bool bad_graphics = !opengl2supported; bool intel_graphics = getOpenGLVersionString().contains("INTEL", Qt::CaseInsensitive); -#if defined(Q_OS_WIN) - bool angle_supported = getGraphicsEngine().contains(CSTR_GFX_ANGLE, Qt::CaseInsensitive) && (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA); - if (bad_graphics) { - bad_graphics = !angle_supported; - } -#endif +//#if defined(Q_OS_WIN) +// bool angle_supported = getGraphicsEngine().contains(CSTR_GFX_ANGLE, Qt::CaseInsensitive) && (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA); +// if (bad_graphics) { +// bad_graphics = !angle_supported; +// } +//#endif #ifdef BROKEN_OPENGL_BUILD Q_UNUSED(bad_graphics) Q_UNUSED(intel_graphics) - QString betterbuild = "Settings/BetterBuild"; - - QString fasterbuildavailable = QObject::tr("A faster build of SleepyHead may be available"); - QString notbotheragain = QObject::tr("You will not be bothered with this message again."); - QString betterresults = QObject::tr("This version will run fine, but a \"%1\" tagged build of SleepyHead will likely run much smoother on your computer."); + const QString BetterBuild = "Settings/BetterBuild"; if (opengl2supported) { - if (!settings.value(betterbuild, false).toBool()) { - QMessageBox::information(nullptr, fasterbuildavailable, - QObject::tr("This build of SleepyHead was designed to work with older computers lacking OpenGL 2.0 support, but it looks like your computer has full support for it.") + "

    "+ - betterresults.arg("-OpenGL")+"

    "+ - lookfor + "

    "+ - notbotheragain, QMessageBox::Ok, QMessageBox::Ok); - settings.setValue(betterbuild, true); + if (!settings.value(BetterBuild, false).toBool()) { + QMessageBox::information(nullptr, QObject::tr("A faster build of SleepyHead may be available"), + QObject::tr("This build of SleepyHead is a compatability version that also works on computers lacking OpenGL 2.0 support.")+"

    "+ + QObject::tr("However it looks like your computer has full support for OpenGL 2.0!") + "

    "+ + QObject::tr("This version will run fine, but a \"%1\" tagged build of SleepyHead will likely run a bit faster on your computer.").arg("-OpenGL")+"

    "+ + QObject::tr("You will not be bothered with this message again."), QMessageBox::Ok, QMessageBox::Ok); + settings.setValue(BetterBuild, true); } - } else { + } /*else { #if defined(Q_OS_WIN) if (angle_supported) { if (!settings.value(betterbuild, false).toBool()) { @@ -195,7 +191,7 @@ int main(int argc, char *argv[]) } } #endif - } + } */ #else if (bad_graphics) { QMessageBox::warning(nullptr, QObject::tr("Incompatible Graphics Hardware"), @@ -204,8 +200,6 @@ int main(int argc, char *argv[]) arg(intel_graphics ? QObject::tr("(Intel's support site)") : "")+"

    "+ QObject::tr("Because graphs will not render correctly, and it may cause crashes, this build will now exit.")+"

    "+ QObject::tr("There is another build available tagged \"-BrokenGL\" that should work on your computer.") - - ,QMessageBox::Ok, QMessageBox::Ok); exit(1); } diff --git a/sleepyhead/scripts/build_number b/sleepyhead/scripts/build_number index 0d66ea1a..d00491fd 100644 --- a/sleepyhead/scripts/build_number +++ b/sleepyhead/scripts/build_number @@ -1,2 +1 @@ -0 1