summaryrefslogtreecommitdiffstats
path: root/gtk/src/presets.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-05-29 22:18:15 +0000
committerjstebbins <[email protected]>2015-05-29 22:18:15 +0000
commit1538772d963815afb194a80fe73e751d75badb99 (patch)
treecd09c2c5a752035446e042b9d80583b92d9974f7 /gtk/src/presets.c
parentb75714ec3263ecd0e1b1bb410edb5616c4addfe2 (diff)
LinGui: fix setting "autoscale" widget value from preset
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7242 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/presets.c')
-rw-r--r--gtk/src/presets.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index d75f9f9ef..1676f7056 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -276,6 +276,10 @@ ghb_preset_to_settings(GhbValue *settings, GhbValue *preset)
ghb_dict_set_bool(settings, "PictureDeinterlaceDecomb",
!ghb_dict_get_bool(settings, "PictureDecombDeinterlace"));
+ int width, height;
+ width = ghb_dict_get_int(settings, "PictureWidth");
+ height = ghb_dict_get_int(settings, "PictureHeight");
+
ghb_dict_set(settings, "scale_height", ghb_value_dup(
ghb_dict_get_value(settings, "PictureHeight")));
@@ -288,8 +292,8 @@ ghb_preset_to_settings(GhbValue *settings, GhbValue *preset)
uses_pic = ghb_dict_get_int(settings, "UsesPictureSettings");
vqtype = ghb_dict_get_int(settings, "VideoQualityType");
- // "Use max" or "strict anamorphic" imply autoscale
- ghb_dict_set_bool(settings, "autoscale", uses_pic == 2);
+ ghb_dict_set_bool(settings, "autoscale",
+ uses_pic == 2 || (width == 0 && height == 0));
// VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant
// *note: target is no longer used