mirror of https://code.videolan.org/videolan/vlc
macosx: do vertical flip after picture placement
Vertically swapping the position of the video keeps the place "height". The vertical position use the inverted position of the bottom position rather than the top position of the video.
This commit is contained in:
parent
9a321d7cb7
commit
012381510b
|
@ -333,6 +333,8 @@ static void UpdatePlace (vout_display_t *vd, const vout_display_cfg_t *cfg)
|
|||
vout_display_place_t place;
|
||||
/* We never receive resize from the core, so provide the size ourselves */
|
||||
vout_display_PlacePicture(&place, vd->source, &cfg->display);
|
||||
/* Reverse vertical alignment as the GL tex are Y inverted */
|
||||
place.y = cfg->display.height - (place.y + place.height);
|
||||
sys->place = place;
|
||||
}
|
||||
|
||||
|
@ -358,11 +360,6 @@ static int Control (vout_display_t *vd, int query)
|
|||
@synchronized(sys->glView) {
|
||||
vout_display_cfg_t cfg;
|
||||
cfg = *vd->cfg;
|
||||
/* Reverse vertical alignment as the GL tex are Y inverted */
|
||||
if (cfg.display.align.vertical == VLC_VIDEO_ALIGN_TOP)
|
||||
cfg.display.align.vertical = VLC_VIDEO_ALIGN_BOTTOM;
|
||||
else if (cfg.display.align.vertical == VLC_VIDEO_ALIGN_BOTTOM)
|
||||
cfg.display.align.vertical = VLC_VIDEO_ALIGN_TOP;
|
||||
cfg.display.width = sys->cfg.display.width;
|
||||
cfg.display.height = sys->cfg.display.height;
|
||||
sys->cfg = cfg;
|
||||
|
@ -583,7 +580,6 @@ static void OpenglSwap (vlc_gl_t *gl)
|
|||
|
||||
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
|
||||
NSRect bounds = [self convertRectToBacking:[self bounds]];
|
||||
vout_display_place_t place;
|
||||
|
||||
@synchronized(self) {
|
||||
if (vd == NULL) return;
|
||||
|
|
Loading…
Reference in New Issue