summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-11-02 16:16:31 +0000
committerjstebbins <[email protected]>2010-11-02 16:16:31 +0000
commit0da4572351cd8749d34000fc45b446bb23e62307 (patch)
treea546e64a2328cce8f6ef6c322d41513b79c032d4 /gtk/src
parent2271024db19c83607c07f68bf698b4e1c89725d8 (diff)
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
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/x264handler.c16
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);