]> git.sesse.net Git - nageru/blobdiff - main.cpp
Update the queue length metric after trimming, not before.
[nageru] / main.cpp
index e156c5964722755872d218696686d7cb81a7bec9..dcaf2a6936ce7fb84532457c515f36ddcc7ed2e2 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -52,6 +52,10 @@ int main(int argc, char *argv[])
        QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt));
 
        global_share_widget = new QGLWidget();
+       if (!global_share_widget->isValid()) {
+               fprintf(stderr, "Failed to initialize OpenGL. Nageru needs at least OpenGL 3.1 to function properly.\n");
+               exit(1);
+       }
 
        MainWindow mainWindow;
        mainWindow.resize(QSize(1500, 850));