Commit Graph

7 Commits

Author SHA1 Message Date
Stefano Pigozzi e70b5ee2fd cocoa_common: add HiDPI/retina support
With a HiDPI screen, for performance and backwards compatibility
reasons, AppKit requests an OpenGL surface with a pixel number that
equals the user points number. After the image is rendered to this
smaller surface, it is upscaled so that its dimensions are comparable
across screens of different DPIs. The applied scaling is not that good
and makes the video/subtitles blurry; this is not acceptable for a
video player.

Request AppKit to use a high resolution OpenGL surface to back the
mplayer2 OpenGL view. Also set the window pixel size information
correctly in the VO object by converting user points to actual pixels.

All the system version checks are done at runtime so that the feature
is available on OSX 10.7 even with a binary compiled with older SDKs.

Also replace is_lion_or_better() with is_osx_version_at_least(10, 7, 0)
which is defined in osx_common.
2012-08-16 22:41:09 +02:00
Stefano Pigozzi 13675fc7dc cleanup: osx_common: remove unused functions
Remove functions that aren't called anymore:

 *  `osx_foreground_hack` was replaced by the NSApplication's
    activateIgnoringOtherApps: in cocoa_common.
 *  Aspect ratio functions were not called by the "new" cocoa backend,
    since the corresponding menu item was deleted.
2012-08-16 22:29:42 +02:00
wm4 f3bb6692c7 osx_common: remove old VO include, modify change_movie_aspect()
The only reason the old VO related header old_vo_defines.h was included
was probably to gain access to the current VO struct in the function
change_movie_aspect(). Make that function take a parameter instead.

This function seems to be unused.
2012-08-07 01:13:25 +02:00
diego 3e7a2bd8c3 Refactor OS X foreground process setting into a separate function.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30964 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-26 15:02:14 +00:00
diego 1e4bf6639e Add missing license header and multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30456 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 13:22:24 +00:00
reimar 4ce7a48748 Move aspect change handling from vo_quartz to osx_common.
This could probably be even moved to video_out, though the names should
be improved.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29574 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-28 13:25:30 +00:00
reimar 0dadcc7bf0 Add osx_common.c and move the keycode conversion (OSX to MPlayer) there.
Also get rid of our own defines for the keycodes and instead use the
predefined ones from Carbon.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29573 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-28 12:54:33 +00:00