]> git.sesse.net Git - vlc/commitdiff
macosx: auto-apply brightness-threshold value in video effects panel
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sat, 12 Jul 2014 17:05:52 +0000 (19:05 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 13 Jul 2014 15:43:15 +0000 (17:43 +0200)
modules/gui/macosx/VideoEffects.m

index 707b221110e9a779fa78e487bc37b353337e1e53..a514e0c5a02dbee629fa6e15ec81cca5011e6dc1 100644 (file)
@@ -796,8 +796,9 @@ static VLCVideoEffects *_o_sharedInstance = nil;
 
 - (IBAction)enableAdjustBrightnessThreshold:(id)sender
 {
+    VLCCoreInteraction *vci_si = [VLCCoreInteraction sharedInstance];
+
     if (sender == o_adjust_reset_btn) {
-        VLCCoreInteraction *vci_si = [VLCCoreInteraction sharedInstance];
         [o_adjust_brightness_sld setFloatValue: 1.0];
         [o_adjust_contrast_sld setFloatValue: 1.0];
         [o_adjust_gamma_sld setFloatValue: 1.0];
@@ -814,7 +815,8 @@ static VLCVideoEffects *_o_sharedInstance = nil;
         [vci_si setVideoFilterProperty: "hue" forFilter: "adjust" integer: 0.0];
         [vci_si setVideoFilterProperty: "saturation" forFilter: "adjust" float: 1.0];
     } else
-        config_PutInt(p_intf, "brightness-threshold", [o_adjust_brightness_ckb state]);
+        [vci_si setVideoFilterProperty: "brightness-threshold" forFilter: "adjust" boolean: [o_adjust_brightness_ckb state]];
+
 }
 
 - (IBAction)enableSharpen:(id)sender