From 0da4572351cd8749d34000fc45b446bb23e62307 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Tue, 2 Nov 2010 16:16:31 +0000 Subject: LinGui: Use '.' for all locales when passing floats to x264 x264 doesn't accept internationalized decimal points. So force '.' when converting floats. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3641 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/x264handler.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gtk/src') 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); -- cgit v1.2.3