diff options
-rw-r--r-- | gtk/src/x264handler.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c index 72883d85a..24fd339ae 100644 --- a/gtk/src/x264handler.c +++ b/gtk/src/x264handler.c @@ -666,10 +666,13 @@ gchar* get_psy_val(signal_user_data_t *ud) { gdouble rd, trell; + gchar rd_str[8], trell_str[8]; gchar *result; rd = ghb_settings_get_double(ud->settings, "x264_psy_rd"); trell = ghb_settings_get_double(ud->settings, "x264_psy_trell"); - result = g_strdup_printf("%g,%g", rd, trell); + g_ascii_formatd(rd_str, 8, "%g", rd); + g_ascii_formatd(trell_str, 8, "%g", trell); + result = g_strdup_printf("%s,%s", rd_str, trell_str); return result; } @@ -739,6 +742,17 @@ x264_opt_update(signal_user_data_t *ud, GtkWidget *widget) else val = g_strdup("0"); } + else if (G_VALUE_TYPE(gval) == G_TYPE_BOOLEAN) + { + // x264 doesn't accept internationalized + // decimal points. So force '.' when converting + // doubles. + gchar str[20]; + gdouble dd; + + dd = ghb_widget_double(widget); + val = g_strdup(g_ascii_formatd(str, 20, "%g", dd)); + } else { val = ghb_widget_string(widget); |