]> git.sesse.net Git - nageru/blobdiff - main.cpp
Hook up white balance into the theme.
[nageru] / main.cpp
index cc554cf6efbee78d79df4bde1c3c7321d5bb75af..53ba77d1441b1b5db1f705a7a4d6d941ab961d5f 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,3 +1,8 @@
+extern "C" {
+#include <libavformat/avformat.h>
+}
+#include <stdbool.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <epoxy/gl.h>
 
@@ -8,6 +13,7 @@
 #include <QSurfaceFormat>
 
 #include "context.h"
+#include "flags.h"
 #include "mainwindow.h"
 #include "mixer.h"
 
@@ -15,6 +21,8 @@ int main(int argc, char *argv[])
 {
        setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0);
        setlinebuf(stdout);
+       av_register_all();
+       parse_flags(argc, argv);
 
        QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
        QApplication app(argc, argv);
@@ -32,9 +40,11 @@ int main(int argc, char *argv[])
        global_share_widget = new QGLWidget();
 
        MainWindow mainWindow;
-       mainWindow.resize(QSize(1500, 670));
+       mainWindow.resize(QSize(1500, 685));
        mainWindow.show();
 
+       app.installEventFilter(&mainWindow);  // For white balance color picking.
+
        int rc = app.exec();
        global_mixer->quit();
        delete global_mixer;