From f6a137785b4ef7bd364438e50ffde3f21dd6b5e2 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 7 Jun 2021 09:08:10 -0700 Subject: [PATCH] Address PR feedback --- RedBookPlayer/MainWindow.xaml.cs | 2 +- RedBookPlayer/Player.cs | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/RedBookPlayer/MainWindow.xaml.cs b/RedBookPlayer/MainWindow.xaml.cs index 6e5ea24..f6166cc 100644 --- a/RedBookPlayer/MainWindow.xaml.cs +++ b/RedBookPlayer/MainWindow.xaml.cs @@ -30,7 +30,7 @@ namespace RedBookPlayer return; // If the theme name is "default", we assume the internal theme is used - if(theme.Equals("default", StringComparison.OrdinalIgnoreCase)) + if(theme.Equals("default", StringComparison.CurrentCultureIgnoreCase)) { Instance.ContentControl.Content = new PlayerView(); } diff --git a/RedBookPlayer/Player.cs b/RedBookPlayer/Player.cs index db0c40c..d65b127 100644 --- a/RedBookPlayer/Player.cs +++ b/RedBookPlayer/Player.cs @@ -159,11 +159,11 @@ namespace RedBookPlayer } } - foreach(KeyValuePair item in track.Indexes.Reverse()) + foreach((ushort key, int i) in track.Indexes.Reverse()) { - if((int)CurrentSector >= item.Value) + if((int)CurrentSector >= i) { - CurrentIndex = item.Key; + CurrentIndex = key; return; } } @@ -676,16 +676,16 @@ namespace RedBookPlayer // This seems to be constant? It should not exist on CD-ROM but CloneCD creates them anyway // Format seems like ATIP, but ATIP should not be as 0xC0 in TOC... - trackDescriptors.Add(new TrackDataDescriptor - { - SessionNumber = currentSession, - POINT = 0xC0, - ADR = 5, - CONTROL = 0, - Min = 128, - PMIN = 97, - PSEC = 25 - }); + //trackDescriptors.Add(new TrackDataDescriptor + //{ + // SessionNumber = currentSession, + // POINT = 0xC0, + // ADR = 5, + // CONTROL = 0, + // Min = 128, + // PMIN = 97, + // PSEC = 25 + //}); } // Lead-in