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.
		
		
		
		
		
			
		
			
				
					
					
						
							25 lines
						
					
					
						
							758 B
						
					
					
				
			
		
		
	
	
							25 lines
						
					
					
						
							758 B
						
					
					
				#include "selfdrive/ui/qt/qt_window.h"
 | 
						|
 | 
						|
void setMainWindow(QWidget *w) {
 | 
						|
  const bool wide = (QGuiApplication::primaryScreen()->size().width() >= WIDE_WIDTH) ^
 | 
						|
                    (getenv("INVERT_WIDTH") != NULL);
 | 
						|
  const float scale = util::getenv("SCALE", 1.0f);
 | 
						|
 | 
						|
  w->setFixedSize(QSize(wide ? WIDE_WIDTH : 1920, 1080) * scale);
 | 
						|
  w->show();
 | 
						|
 | 
						|
#ifdef QCOM2
 | 
						|
  QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
 | 
						|
  wl_surface *s = reinterpret_cast<wl_surface*>(native->nativeResourceForWindow("surface", w->windowHandle()));
 | 
						|
  wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
 | 
						|
  wl_surface_commit(s);
 | 
						|
  w->showFullScreen();
 | 
						|
#endif
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
extern "C" {
 | 
						|
  void set_main_window(void *w) {
 | 
						|
    setMainWindow((QWidget*)w);
 | 
						|
  }
 | 
						|
}
 | 
						|
 |