[MPlayer-cvslog] CVS: main/libvo vo_macosx.m, 1.23, 1.24 vo_macosx.h, 1.6, 1.7
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Wed Jun 29 23:54:51 CEST 2005
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv2179/libvo
Modified Files:
vo_macosx.m vo_macosx.h
Log Message:
keep window size when changing aspect
Index: vo_macosx.m
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_macosx.m,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- vo_macosx.m 29 Jun 2005 21:49:58 -0000 1.23
+++ vo_macosx.m 29 Jun 2005 21:54:48 -0000 1.24
@@ -288,6 +288,7 @@
[window setTitle:@"MPlayer - The Movie Player"];
isFullscreen = 0;
+ winSizeMult = 1;
}
- (id) config
@@ -359,7 +360,7 @@
kDoubleScreenCmd = menuItem;
menuItem = [[NSMenuItem alloc] initWithTitle:@"Full Size" action:@selector(menuAction:) keyEquivalent:@"f"]; [menu addItem:menuItem];
kFullScreenCmd = menuItem;
- menuItem = (NSMenuItem *)[NSMenuItem separatorItem]; [menu addItem:menuItem];
+ //menuItem = (NSMenuItem *)[NSMenuItem separatorItem]; [menu addItem:menuItem];
NSMenu *aspectMenu;
aspectMenu = [[NSMenu alloc] initWithTitle:@"Aspect Ratio"];
@@ -424,8 +425,9 @@
vo_fs = (!(vo_fs)); [self fullscreen:YES];
}
- frame.size.width = (d_width/2);
- frame.size.height = ((d_width/movie_aspect)/2);
+ winSizeMult = 0.5;
+ frame.size.width = (d_width*winSizeMult);
+ frame.size.height = ((d_width/movie_aspect)*winSizeMult);
[window setContentSize: frame.size];
[self reshape];
}
@@ -435,6 +437,7 @@
vo_fs = (!(vo_fs)); [self fullscreen:YES];
}
+ winSizeMult = 1;
frame.size.width = d_width;
frame.size.height = d_width/movie_aspect;
[window setContentSize: frame.size];
@@ -446,8 +449,9 @@
vo_fs = (!(vo_fs)); [self fullscreen:YES];
}
- frame.size.width = d_width*2;
- frame.size.height = (d_width/movie_aspect)*2;
+ winSizeMult = 2;
+ frame.size.width = d_width*winSizeMult;
+ frame.size.height = (d_width/movie_aspect)*winSizeMult;
[window setContentSize: frame.size];
[self reshape];
}
@@ -478,8 +482,8 @@
if(sender == kAspectOrgCmd)
{
movie_aspect = old_movie_aspect;
- frame.size.width = d_width;
- frame.size.height = d_width/movie_aspect;
+ frame.size.width = d_width*winSizeMult;
+ frame.size.height = (d_width/movie_aspect)*winSizeMult;
[window setContentSize: frame.size];
[self reshape];
}
@@ -487,8 +491,8 @@
if(sender == kAspectFullCmd)
{
movie_aspect = 4.0f/3.0f;
- frame.size.width = d_width;
- frame.size.height = d_width/movie_aspect;
+ frame.size.width = d_width*winSizeMult;
+ frame.size.height = (d_width/movie_aspect)*winSizeMult;
[window setContentSize: frame.size];
[self reshape];
}
@@ -496,8 +500,8 @@
if(sender == kAspectWideCmd)
{
movie_aspect = 16.0f/9.0f;
- frame.size.width = d_width;
- frame.size.height = d_width/movie_aspect;
+ frame.size.width = d_width*winSizeMult;
+ frame.size.height = (d_width/movie_aspect)*winSizeMult;
[window setContentSize: frame.size];
[self reshape];
}
Index: vo_macosx.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_macosx.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vo_macosx.h 15 Jun 2005 21:49:50 -0000 1.6
+++ vo_macosx.h 29 Jun 2005 21:54:48 -0000 1.7
@@ -31,6 +31,7 @@
GLfloat upperLeft[2];
BOOL mouseHide;
+ float winSizeMult;
//menu command id
NSMenuItem *kQuitCmd;
More information about the MPlayer-cvslog
mailing list