mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-21 22:53:52 +08:00
* cleanup include path * continue * format includes * fix testraw.cc * remove include path from SConstruct * regroup * rebase master * almost done * apply review * rename FileReader.xx to filereader.xx * rename Unlogger.x->unlogger.x * rename FrameReader.xx -> framereader.xx * apply reviews * ui.h * continue * fix framebuffer.cc build error:mv util.h up * full path to msm_media_info * fix qcom2 camerad Co-authored-by: Comma Device <device@comma.ai>
32 lines
896 B
C++
32 lines
896 B
C++
#include <QApplication>
|
|
#include <QSslConfiguration>
|
|
|
|
#include "selfdrive/hardware/hw.h"
|
|
#include "selfdrive/ui/qt/qt_window.h"
|
|
#include "selfdrive/ui/qt/window.h"
|
|
|
|
int main(int argc, char *argv[]) {
|
|
QSurfaceFormat fmt;
|
|
#ifdef __APPLE__
|
|
fmt.setVersion(3, 2);
|
|
fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGL);
|
|
#else
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGLES);
|
|
#endif
|
|
QSurfaceFormat::setDefaultFormat(fmt);
|
|
|
|
if (Hardware::EON()) {
|
|
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
|
QSslConfiguration ssl = QSslConfiguration::defaultConfiguration();
|
|
ssl.setCaCertificates(QSslCertificate::fromPath("/usr/etc/tls/cert.pem"));
|
|
QSslConfiguration::setDefaultConfiguration(ssl);
|
|
}
|
|
|
|
QApplication a(argc, argv);
|
|
MainWindow w;
|
|
setMainWindow(&w);
|
|
a.installEventFilter(&w);
|
|
return a.exec();
|
|
}
|