diff options
-rw-r--r-- | macosx/Controller.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 0e1359a07..287b4944b 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -4092,16 +4092,17 @@ the user is using "Custom" settings by determining the sender*/ float sliderRfInverse = ([fVidQualitySlider maxValue] - [fVidQualitySlider floatValue]) + [fVidQualitySlider minValue]; /* If the encoder is theora, use the float, otherwise use the inverse float*/ + float sliderRfToPercent; if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA) { - [fVidQualityRFField setStringValue: [NSString stringWithFormat: @"%.2f", [fVidQualitySlider floatValue]]]; + [fVidQualityRFField setStringValue: [NSString stringWithFormat: @"%.2f", [fVidQualitySlider floatValue]]]; + sliderRfToPercent = [fVidQualityRFField floatValue] / ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]); } else { [fVidQualityRFField setStringValue: [NSString stringWithFormat: @"%.2f", sliderRfInverse]]; + sliderRfToPercent = ( ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) - ([fVidQualityRFField floatValue] - [fVidQualitySlider minValue])) / ([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]); } - - float sliderRfToPercent = ( [fVidQualitySlider maxValue] - sliderRfInverse ) / [fVidQualitySlider maxValue]; [fVidConstantCell setTitle: [NSString stringWithFormat: NSLocalizedString( @"Constant quality: %.2f %%", @"" ), 100 * sliderRfToPercent]]; |