/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 08:09:59	527
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 08:19:24	530
@@ -2267,13 +2267,15 @@
                             //    }
                             //}
                             //SearchGuid = new_SearchGuid;
-                            #endregion
-                            
+                            #endregion                           
+
                             new_SearchGuid = GuidTools.IncrementGuid(SearchGuid);
                             using (SearchResultWriter writer = new SearchResultWriter(0, new_SearchGuid))
                             {
+                                int index = 0;
                                 foreach (var k in reader.GetResults(SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress)))
                                 {
+                                    int Last_Whole_Percent_Done = 0;
                                     provider.OpenProvider();
                                     int bytesRead = 0;
                                     byte[] data = new byte[STEP_SIZE];
@@ -2281,6 +2283,16 @@
                                     provider.CloseProvider();
 
                                     uint address_index = k.Address;
+
+                                    string message = string.Format(" -> Reading Address 0x{0:x8} from index 0x{1}", k.Address, index.ToString("X"));
+                                    double double_percent_done = 100.0 * (double)((double)index / (double)reader.ResultCount);
+                                    int int_percent_done = (int)double_percent_done;
+                                    if ((int_percent_done != Last_Whole_Percent_Done) && (index % 10000) == 0)
+                                    {
+                                        UpdateProgress((int)double_percent_done, message);
+                                        Last_Whole_Percent_Done = int_percent_done;
+                                    }
+
                                     #region comparison and serialization
                                     switch (sdt)
                                     {
@@ -2620,6 +2632,7 @@
                                     }
                                     #endregion
 
+                                    index++;
                                 }
 
 

 

  ViewVC Help
Powered by ViewVC 1.1.22