summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-03-16 12:06:04 -0600
committerJohn Stebbins <[email protected]>2018-03-16 12:06:04 -0600
commit462362a16a4e592424fa0f662f36921ec942d052 (patch)
treedc7615da8175ce1c67a33fdea1e4251ace1e28fd /gtk/src/callbacks.c
parentc03887672673ffd9b03cddf0f6b1317fbf5b1eaa (diff)
LinGui: fix rounding error in display aspect
This is only a cosmetic display problem. The values used during encoding are correct.
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 0bdb9c08b..b399090ab 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2674,7 +2674,8 @@ ghb_update_summary_info(signal_user_data_t *ud)
gtk_label_set_text(GTK_LABEL(widget), text);
g_free(text);
- int width, height, display_width, display_height, par_width, par_height;
+ double display_width;
+ int width, height, display_height, par_width, par_height;
char * display_aspect;
width = ghb_dict_get_int(ud->settings, "scale_width");
@@ -2684,12 +2685,15 @@ ghb_update_summary_info(signal_user_data_t *ud)
par_width = ghb_dict_get_int(ud->settings, "PicturePARWidth");
par_height = ghb_dict_get_int(ud->settings, "PicturePARHeight");
+ display_width = (double)width * par_width / par_height;
display_aspect = ghb_get_display_aspect_string(display_width,
display_height);
+
+ display_width = ghb_dict_get_int(ud->settings, "PictureDisplayWidth");
text = g_strdup_printf("%dx%d storage, %dx%d display\n"
"%d:%d Pixel Aspect Ratio\n"
"%s Display Aspect Ratio",
- width, height, display_width, display_height,
+ width, height, (int)display_width, display_height,
par_width, par_height, display_aspect);
widget = GHB_WIDGET(ud->builder, "dimensions_summary");
gtk_label_set_text(GTK_LABEL(widget), text);