summaryrefslogtreecommitdiffstats
path: root/win/C#/Controls
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Controls')
-rw-r--r--win/C#/Controls/PictureSettings.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs
index 1d54c9867..eed7ba560 100644
--- a/win/C#/Controls/PictureSettings.cs
+++ b/win/C#/Controls/PictureSettings.cs
@@ -67,10 +67,15 @@ namespace Handbrake.Controls
labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;
}
- updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;
+ //updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;
updownParWidth.Value = _sourceTitle.ParVal.Width;
updownParHeight.Value = _sourceTitle.ParVal.Height;
- _cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;
+ //_cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;
+
+
+ Size croppedDar = CalculateAnamorphicSizes();
+ _cachedDar = (double) croppedDar.Width/croppedDar.Height;
+ updownDisplayWidth.Value = croppedDar.Width;
}
}
@@ -263,8 +268,9 @@ namespace Handbrake.Controls
// DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)
// Calculate new Height Value
- int modulus = 16;
- int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus);
+ int modulus;
+ if(!int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus))
+ modulus = 16;
int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / _cachedDar);
int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);