From 83eee353a88c70478980626b3cfcfdcfd204d743 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Mon, 10 Feb 2003 00:16:51 +0000 Subject: [PATCH 1/1] * restored old deinterlace menu. The on the fly code does not work as long as the vout.m issue exists. but this is better then the current 'dummy' code we have. --- modules/gui/macosx/controls.m | 45 +++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m index 00aa465deb..48af1e2888 100644 --- a/modules/gui/macosx/controls.m +++ b/modules/gui/macosx/controls.m @@ -2,7 +2,7 @@ * controls.m: MacOS X interface plugin ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: controls.m,v 1.25 2003/02/09 01:50:35 massiot Exp $ + * $Id: controls.m,v 1.26 2003/02/10 00:16:51 hartman Exp $ * * Authors: Jon Lech Johansen * Christophe Massiot @@ -428,7 +428,19 @@ - (IBAction)deinterlace:(id)sender { - + intf_thread_t * p_intf = [NSApp getIntf]; + BOOL bEnable = [sender state] == NSOffState; + + if( bEnable ) + { + config_PutPsz( p_intf, "filter", "deinterlace" ); + config_PutPsz( p_intf, "deinterlace-mode", + [[sender title] lossyCString] ); Ê + } + else + { + config_PutPsz( p_intf, "filter", NULL ); + } } - (IBAction)toggleProgram:(id)sender @@ -752,8 +764,33 @@ } else if( o_menu != nil && [[o_menu title] isEqualToString: _NS("Deinterlace")] ) - { - + { + char * psz_filter = config_GetPsz( p_intf, "filter" ); Ê + + if( psz_filter != NULL ) Ê + { Ê + free( psz_filter ); Ê + + psz_filter = config_GetPsz( p_intf, "deinterlace-mode" ); Ê + } Ê + Ê Ê + if( psz_filter != NULL ) Ê + { Ê + if( strcmp( psz_filter, [[o_mi title] lossyCString] ) == 0 ) Ê + { Ê + [o_mi setState: NSOnState]; Ê + } Ê + else Ê + { Ê + [o_mi setState: NSOffState]; Ê + } Ê + + free( psz_filter ); Ê + } Ê + else Ê + { Ê + [o_mi setState: NSOffState]; Ê + } } if( p_playlist != NULL ) -- 2.20.1