summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideoController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-03-06 09:37:35 +0100
committerDamiano Galassi <[email protected]>2019-03-06 09:37:35 +0100
commit8d78f7d001b06872b1c31620c6387da239ae51eb (patch)
tree2a53fb0c98c211fd11f62d0c2f16b3529f801bec /macosx/HBVideoController.m
parent371fa07a23b86c7099b838f996896d791e5e01b2 (diff)
MacGui: fix quality slider granularity prefs when the app is localized.
Diffstat (limited to 'macosx/HBVideoController.m')
-rw-r--r--macosx/HBVideoController.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m
index e5bc66ad5..95619247d 100644
--- a/macosx/HBVideoController.m
+++ b/macosx/HBVideoController.m
@@ -49,7 +49,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
// Observe the x264 slider granularity, to update the slider when the pref is changed.
[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self
- forKeyPath:@"values.x264CqSliderFractional"
+ forKeyPath:@"values.HBx264CqSliderFractional"
options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial
context:HBVideoControllerContext];
@@ -124,7 +124,7 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
fDisplayX264PresetsUnparseTextField.stringValue = @"";
}
}
- else if ([keyPath isEqualToString:@"values.x264CqSliderFractional"])
+ else if ([keyPath isEqualToString:@"values.HBx264CqSliderFractional"])
{
[self setupQualitySlider];
}
@@ -151,8 +151,8 @@ static void *HBVideoControllerContext = &HBVideoControllerContext;
{
// Encoders that allow fractional CQ values often have a low granularity
// which makes the slider hard to use, so use a value from preferences.
- granularity = [[NSUserDefaults standardUserDefaults]
- floatForKey:@"x264CqSliderFractional"];
+ granularity = 1.0f / [[NSUserDefaults standardUserDefaults]
+ integerForKey:@"HBx264CqSliderFractional"];
}
fVidQualitySlider.minValue = minValue;
fVidQualitySlider.maxValue = maxValue;