2
2
* macosx.m: MacOS X OpenGL provider
3
3
*****************************************************************************
4
4
* Copyright (C) 2001-2012 the VideoLAN team
5
* $Id: c64895091e6fd45beaae035f8c506dc8d6af91c6 $
5
* $Id: 0f81da79a8ca12ab506ca484979b342bd29e7d98 $
7
7
* Authors: Colin Delacroix <colin@zoy.org>
8
8
* Florian G. Pflug <fgp@phlo.org>
379
379
&& vout_window_SetSize (sys->embed, cfg->display.width, cfg->display.height))
380
380
return VLC_EGENERIC;
382
/* for the case that the core wants to resize below minimum window size we correct the size here
383
to ensure a centered picture */
382
/* we always use our current frame here, because we have some size constraints
383
in the ui vout provider */
384
384
vout_display_cfg_t cfg_tmp = *cfg;
385
if (cfg_tmp.display.width < windowMinSize.width)
386
cfg_tmp.display.width = windowMinSize.width;
387
if (cfg_tmp.display.height < 70)
388
cfg_tmp.display.height = 70;
386
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
388
bounds = [sys->glView convertRectToBacking:[sys->glView bounds]];
390
bounds = [sys->glView bounds];
391
cfg_tmp.display.width = bounds.size.width;
392
cfg_tmp.display.height = bounds.size.height;
390
if (!config_GetInt(vd, "macosx-video-autoresize"))
393
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
395
bounds = [sys->glView convertRectToBacking:[sys->glView bounds]];
397
bounds = [sys->glView bounds];
398
cfg_tmp.display.width = bounds.size.width;
399
cfg_tmp.display.height = bounds.size.height;
401
394
vout_display_place_t place;
402
395
vout_display_PlacePicture (&place, source, &cfg_tmp, false);
403
396
@synchronized (sys->glView) {