littlestone0806 2 years ago
parent
commit
e59b84e2fa
1 changed files with 8 additions and 1 deletions
  1. 8 1
      sherpa-ncnn/csrc/display.h

+ 8 - 1
sherpa-ncnn/csrc/display.h

@@ -33,7 +33,14 @@ class Display {
   void Print(int32_t segment_id, const std::string &s) {
 #ifdef _MSC_VER
     if (segment_id != -1) {
-      fprintf(stderr, "%d:%s\n", segment_id, s.c_str());
+      if (last_segment_ != segment_id) 
+      {
+          fprintf(stderr, "\n%d:%s", segment_id, s.c_str());
+          last_segment_ = segment_id;
+      }
+      else{
+          fprintf(stderr, "%s", s.c_str());
+      }
     } else {
       fprintf(stderr, "%s\n", s.c_str());
     }