Commit 52896a65 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix on the fly Opaqueness changing

parent 92115f28
......@@ -318,20 +318,21 @@ static VLCExtended *_o_sharedInstance = nil;
}
}
/* change the opaqueness of the vouts */
- (IBAction)adjImg_opaque:(id)sender
{
/* change the opaqueness of the vouts */
vlc_value_t val;
id o_window = [NSApp keyWindow];
NSArray *o_windows = [NSApp orderedWindows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator];
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, \
FIND_ANYWHERE );
vout_thread_t * p_vout = (vout_thread_t *)vlc_object_find( p_playlist, \
VLC_OBJECT_VOUT, FIND_ANYWHERE );
vout_thread_t * p_real_vout;
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
vout_thread_t *p_real_vout;
vlc_value_t val;
val.f_float = [o_sld_opaque floatValue] / 100;
/* Try to set on the fly */
if( p_vout )
if( p_vout != NULL )
{
if( p_vout->i_object_type == VLC_OBJECT_OPENGL )
{
......@@ -341,13 +342,15 @@ static VLCExtended *_o_sharedInstance = nil;
{
p_real_vout = p_vout;
}
/* FIXME: insert the correct pointer here */
/*[p_vout->p_sys->o_window setAlpha: var_CreateGetFloat( p_vout, \
"macosx-opaqueness")];*/
var_Set( p_vout, "macosx-opaqueness", val );
vlc_object_release( p_real_vout );
var_Set( p_real_vout, "macosx-opaqueness", val );
while ((o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] )
{
[o_window setAlphaValue: val.f_float];
}
}
vlc_object_release( p_vout );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment