2
0
Эх сурвалжийг харах

Add support for display_width/display_height on OSX

rdb 16 жил өмнө
parent
commit
ee6d1b113d

+ 3 - 0
panda/src/osxdisplay/osxGraphicsPipe.cxx

@@ -27,6 +27,9 @@ TypeHandle osxGraphicsPipe::_type_handle;
 ////////////////////////////////////////////////////////////////////
 osxGraphicsPipe::
 osxGraphicsPipe() {
+  CGRect display_bounds = CGDisplayBounds(kCGDirectMainDisplay);
+  _display_width = CGRectGetWidth(display_bounds);
+  _display_height = CGRectGetHeight(display_bounds);
 }
 
 ////////////////////////////////////////////////////////////////////