[MPlayer-cvslog] r38352 - trunk/libvo/osx_objc_common.m
Alexander Strasser
eclipse7 at gmx.net
Sun Feb 27 12:58:16 EET 2022
On 2022-02-27 12:01 +0200, reimar wrote:
> Author: reimar
> Date: Sun Feb 27 12:01:01 2022
> New Revision: 38352
>
> Log:
> libvo/osx_objc_common: Fix window initial pos for retina displays.
>
> Would end up on top right corner always due to
> incorrect coordinate scaling.
>
> Modified:
> trunk/libvo/osx_objc_common.m
>
> Modified: trunk/libvo/osx_objc_common.m
> ==============================================================================
> --- trunk/libvo/osx_objc_common.m Sun Feb 27 11:51:24 2022 (r38351)
> +++ trunk/libvo/osx_objc_common.m Sun Feb 27 12:01:01 2022 (r38352)
> @@ -229,9 +229,12 @@ void vo_osx_swap_buffers(void)
> // not aware of it.
> // Also flip vo_dy since the screen origin is in the bottom left on OSX.
> [self update_screen_info];
> - [window setFrameTopLeftPoint:NSMakePoint(
> - vo_dx,
> - 2*xinerama_y + vo_screenheight - vo_dy)];
> + NSPoint topleft = NSMakePoint(vo_dx, 2*xinerama_y + vo_screenheight - vo_dy);
> +#ifndef __POWER__
Depending on __POWER__ to indicate the code is needed looks
a bit strange to me.
It's done like that in other places too, so not a problem in
this commmit.
Anyway I don't really understand why it's solved this way.
Was the API not present in older versions?
Or did it do something unwanted in older versions?
Alexander
> + if ([self respondsToSelector:@selector(convertPointFromBacking:)])
> + topleft = [self convertPointFromBacking:topleft];
> +#endif
> + [window setFrameTopLeftPoint:topleft];
>
> vo_fs = flags & VOFLAG_FULLSCREEN;
More information about the MPlayer-cvslog
mailing list