From a6a81bb76a848b9820940f753948a5f0e3043a3f Mon Sep 17 00:00:00 2001 From: brandman211 Date: Thu, 16 Feb 2012 00:55:07 +0000 Subject: [PATCH] -Subtitles seem to work perfectly now. -Included System.Globalization in a using statement to be more consistent with the rest of the uses of System. -Removed trailing whitespace while I was at it. I'm OCD and it deeply bothers me, so I'll remove it on all the files that I commit in the future. Can't imagine anyone would object. --- BizHawk.MultiClient/movie/SubtitleList.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BizHawk.MultiClient/movie/SubtitleList.cs b/BizHawk.MultiClient/movie/SubtitleList.cs index be369a0981..c6681fd992 100644 --- a/BizHawk.MultiClient/movie/SubtitleList.cs +++ b/BizHawk.MultiClient/movie/SubtitleList.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using System.Drawing; @@ -58,7 +59,7 @@ namespace BizHawk.MultiClient /// /// /// - public string GetSubtitleMessage(int frame) + public string GetSubtitleMessage(int frame) { if (subs.Count == 0) return ""; @@ -110,13 +111,13 @@ namespace BizHawk.MultiClient //remove "subtitle" string str = subtitleStr.Substring(x + 1, subtitleStr.Length - x - 1); - + x = str.IndexOf(' '); if (x <= 0) return false; - + string frame = str.Substring(0, x); str = str.Substring(x + 1, str.Length - x - 1); - + try { s.Frame = int.Parse(frame); @@ -165,20 +166,19 @@ namespace BizHawk.MultiClient return false; } - //TODO: parse hex! x = str.IndexOf(' '); if (x <= 0) return false; string Color = str.Substring(0, x); str = str.Substring(x + 1, str.Length - x - 1); try { - s.Color = uint.Parse(Color, System.Globalization.NumberStyles.HexNumber); + s.Color = uint.Parse(Color, NumberStyles.HexNumber); } catch { return false; } - + s.Message = str; subs.Add(s); @@ -211,4 +211,4 @@ namespace BizHawk.MultiClient } } } -} +} \ No newline at end of file