Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 comments
  • 1 contributor
Jan 14, 2012
Werner Almesberger gui/performance.c: make dt_mode work again, except for the first patch
Titles were not displayed, probably due to an oversight in some
earlier code rearranging. This commit fixes it for all but the
first patch.
b7a8144
Werner Almesberger gui/performance.c: make dt_mode also work for the first patch
This is a bit tricky because we can't just call osd_event in
start_rendering. Instead we have to defer this to event_callback.
f680dbf

Showing 1 changed file with 11 additions and 4 deletions. Show diff stats Hide diff stats

  1. 15  src/gui/performance.c
15  src/gui/performance.c
@@ -179,6 +179,7 @@ static void add_simple_patches(void)
179 179
 
180 180
 static int appid;
181 181
 static int started;
  182
+static int first_event;
182 183
 
183 184
 static void close_callback(mtk_event *e, void *arg)
184 185
 {
@@ -431,6 +432,8 @@ static void simple_mode_next(int next)
431 432
 	renderer_pulse_patch(patches[simple_mode_current].p);
432 433
 	if(as_mode)
433 434
 		update_next_as_time();
  435
+	if(dt_mode)
  436
+		osd_event(patches[simple_mode_current].filename);
434 437
 }
435 438
 
436 439
 static void configured_mode_event(mtk_event *e)
@@ -481,12 +484,16 @@ static void configured_mode_event(mtk_event *e)
481 484
 static void event_callback(mtk_event *e, int count)
482 485
 {
483 486
 	int i;
484  
-	int index;
485 487
 	int next;
486 488
 	rtems_interval t;
487 489
 
488  
-	index = -1;
489 490
 	if(simple_mode) {
  491
+		/*
  492
+		 * We can can't show the first title in start_rendering
  493
+		 * because the renderer isn't up yet. So we do it here.
  494
+		 */
  495
+		if (first_event && dt_mode)
  496
+			osd_event(patches[simple_mode_current].filename);
490 497
 		next = 0;
491 498
 		for(i=0;i<count;i++)
492 499
 			simple_mode_event(e+i, &next);
@@ -497,12 +504,11 @@ static void event_callback(mtk_event *e, int count)
497 504
 		}
498 505
 		if(next)
499 506
 			simple_mode_next(next);
500  
-		if(dt_mode && (index != -1))
501  
-			osd_event(patches[index].filename);
502 507
 	} else {
503 508
 		for(i=0;i<count;i++)
504 509
 			configured_mode_event(e+i);
505 510
 	}
  511
+	first_event = 0;
506 512
 }
507 513
 
508 514
 static void stop_callback(void)
@@ -525,6 +531,7 @@ static void start_rendering(void)
525 531
 		index = simple_mode_current;
526 532
 	}
527 533
 
  534
+	first_event = 1;
528 535
 	if(!guirender(appid, patches[index].p, stop_callback))
529 536
 		stop_callback();
530 537
 }

No commit comments for this range

Something went wrong with that request. Please try again.