]> git.sesse.net Git - nageru/blobdiff - main.cpp
Release Nageru 1.3.3.
[nageru] / main.cpp
index 75ae9a7f7cbfa6354d7c7553dfa28070d89cfab7..dd94d7335cd80065a5290829404fc140fc7ffd69 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -41,6 +41,11 @@ int main(int argc, char *argv[])
        fmt.setProfile(QSurfaceFormat::CoreProfile);
        fmt.setMajorVersion(3);
        fmt.setMinorVersion(1);
+
+       // Turn off vsync, since Qt generally gives us at most frame rate
+       // (display frequency) / (number of QGLWidgets active).
+       fmt.setSwapInterval(0);
+
        QSurfaceFormat::setDefaultFormat(fmt);
 
        QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt));
@@ -62,6 +67,9 @@ int main(int argc, char *argv[])
                fprintf(stderr, "Failed to lock Nageru into RAM. You probably want to\n");
                fprintf(stderr, "increase \"memlock\" for your user in limits.conf\n");
                fprintf(stderr, "for better realtime behavior.\n");
+               uses_mlock = false;
+       } else {
+               uses_mlock = true;
        }
 
        int rc = app.exec();