]> granicus.if.org Git - handbrake/commitdiff
WinGui
authorsr55 <sr55.hb@outlook.com>
Thu, 11 Jun 2009 18:27:10 +0000 (18:27 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 11 Jun 2009 18:27:10 +0000 (18:27 +0000)
- Fix a culture issue in the new picture settings code.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2515 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Controls/PictureSettings.cs

index 6a1fbfc6d4fdcdcc927ba369213b2238909c962c..54a80eefd4032a43c8562a6799cc2040c388f4f0 100644 (file)
@@ -1,5 +1,6 @@
 using System;\r
 using System.Drawing;\r
+using System.Globalization;\r
 using System.Windows.Forms;\r
 using Handbrake.Parsing;\r
 \r
@@ -10,6 +11,8 @@ namespace Handbrake.Controls
     \r
     public partial class PictureSettings : UserControl\r
     {\r
+        private static readonly CultureInfo Culture = new CultureInfo("en-US", false);\r
+\r
         // Globals\r
         public int maxWidth, maxHeight;\r
         int widthVal, heightVal;\r
@@ -596,12 +599,12 @@ namespace Handbrake.Controls
             {\r
                 int aw = 0;\r
                 int ah = 0;\r
-                if (selectedTitle.AspectRatio.ToString() == "1.78")\r
+                if (selectedTitle.AspectRatio.ToString(Culture) == "1.78")\r
                 {\r
                     aw = 16;\r
                     ah = 9;\r
                 }\r
-                else if (selectedTitle.AspectRatio.ToString() == "1.33")\r
+                else if (selectedTitle.AspectRatio.ToString(Culture) == "1.33")\r
                 {\r
                     aw = 4;\r
                     ah = 3;\r
@@ -638,12 +641,12 @@ namespace Handbrake.Controls
         {\r
             int aw = 0;\r
             int ah = 0;\r
-            if (selectedTitle.AspectRatio.ToString() == "1.78")\r
+            if (selectedTitle.AspectRatio.ToString(Culture) == "1.78")\r
             {\r
                 aw = 16;\r
                 ah = 9;\r
             }\r
-            else if (selectedTitle.AspectRatio.ToString() == "1.33")\r
+            else if (selectedTitle.AspectRatio.ToString(Culture) == "1.33")\r
             {\r
                 aw = 4;\r
                 ah = 3;\r