summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-17 15:49:54 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-17 15:49:54 +0000
commit891a1f1451487deba3c17019c09a5780823f97c8 (patch)
tree3262c9c6890940649322d21a1d9f1b55d1d34992 /libvo
parent1c154cd853ae8c0c6f42b3044c57bf756ad9111d (diff)
downloadmpv-891a1f1451487deba3c17019c09a5780823f97c8.tar.bz2
mpv-891a1f1451487deba3c17019c09a5780823f97c8.tar.xz
Record screen size and display size in vo_ variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25442 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_macosx.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index d251547b36..0cc3645061 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -111,6 +111,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
screen_id = 0;
}
screen_frame = [screen_handle frame];
+ vo_screenwidth = screen_frame.size.width;
+ vo_screenheight = screen_frame.size.height;
//misc mplayer setup
image_width = width;
@@ -669,6 +671,8 @@ static int control(uint32_t request, void *data, ...)
int padding = 0;
NSRect frame = [self frame];
+ vo_dwidth = frame.size.width;
+ vo_dheight = frame.size.height;
glViewport(0, 0, frame.size.width, frame.size.height);
glMatrixMode(GL_PROJECTION);
@@ -820,8 +824,11 @@ static int control(uint32_t request, void *data, ...)
old_frame = [window frame]; //save main window size & position
if(screen_force)
screen_frame = [screen_handle frame];
- else
+ else {
screen_frame = [[window screen] frame];
+ vo_screenwidth = screen_frame.size.width;
+ vo_screenheight = screen_frame.size.height;
+ }
[window setFrame:screen_frame display:YES animate:animate]; //zoom-in window with nice useless sfx
old_view_frame = [self bounds];