You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							31 lines
						
					
					
						
							896 B
						
					
					
				
			
		
		
	
	
							31 lines
						
					
					
						
							896 B
						
					
					
				#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();
 | 
						|
}
 | 
						|
 |