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

reimar subversion at mplayerhq.hu
Tue Dec 29 06:43:38 EET 2020


Author: reimar
Date: Tue Dec 29 06:43:38 2020
New Revision: 38205

Log:
osx_objc_common: Fix video size on "retina" displays.

Modified:
   trunk/libvo/osx_objc_common.m

Modified: trunk/libvo/osx_objc_common.m
==============================================================================
--- trunk/libvo/osx_objc_common.m	Mon Dec 28 21:05:45 2020	(r38204)
+++ trunk/libvo/osx_objc_common.m	Tue Dec 29 06:43:38 2020	(r38205)
@@ -20,6 +20,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#define GL_SILENCE_DEPRECATION
+
 #import "osx_objc_common.h"
 #include <Carbon/Carbon.h>
 #include <CoreServices/CoreServices.h>
@@ -241,9 +243,13 @@ void vo_osx_swap_buffers(void)
 
 - (void)reshape
 {
+	[super reshape];
 	NSRect frame = [self frame];
-	vo_dwidth  = frame.size.width;
-	vo_dheight = frame.size.height;
+	NSSize size = frame.size;
+	if ([self respondsToSelector:@selector(convertSizeToBacking:)])
+		size = [self convertSizeToBacking:size];
+	vo_dwidth  = size.width;
+	vo_dheight = size.height;
 	event_flags |= VO_EVENT_RESIZE;
 }
 


More information about the MPlayer-cvslog mailing list