[MPlayer-cvslog] r38352 - trunk/libvo/osx_objc_common.m

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 27 13:07:12 EET 2022



> On 27 Feb 2022, at 11:58, Alexander Strasser <eclipse7 at gmx.net> wrote:
> 
> 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?

It's a bit messy...
Possibly it should all be replaced with a version check.
Essentially the feature is check for via

>> +	if ([self respondsToSelector:@selector(convertPointFromBacking:)])

The problem is, respondsToSelector is not available and causes problems on my PowerPC test platform.
So that was the quick hack to make it work on all platforms available to me.
So essentially I'd need the proper thing to check whether respondsToSelector is available...


More information about the MPlayer-cvslog mailing list