Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Consolidated display restore code.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1836 a1c6a512-1295-4272-9138-f99709370657

+21 -39
+21 -39
apps/wps.c
··· 480 480 481 481 while ( 1 ) 482 482 { 483 + bool restore = false; 484 + 483 485 button = button_get_w_tmo(HZ/5); 484 486 485 487 /* discard first event if it's a button release */ ··· 503 505 if (keys_locked) 504 506 { 505 507 display_keylock_text(keys_locked); 506 - draw_screen(id3); 507 - if (mpeg_is_playing() && id3) 508 - display_file_time(id3->elapsed, id3->length); 508 + restore = true; 509 509 break; 510 510 } 511 511 ··· 520 520 if (keys_locked) 521 521 { 522 522 display_keylock_text(keys_locked); 523 - draw_screen(id3); 524 - if (mpeg_is_playing() && id3) 525 - display_file_time(id3->elapsed, id3->length); 523 + restore = true; 526 524 break; 527 525 } 528 526 ··· 556 554 if (keys_locked) 557 555 { 558 556 display_keylock_text(keys_locked); 559 - draw_screen(id3); 560 - if (mpeg_is_playing() && id3) 561 - display_file_time(id3->elapsed, id3->length); 557 + restore = true; 562 558 break; 563 559 } 564 560 ··· 578 574 if (keys_locked) 579 575 { 580 576 display_keylock_text(keys_locked); 581 - draw_screen(id3); 582 - if (mpeg_is_playing() && id3) 583 - display_file_time(id3->elapsed, id3->length); 577 + restore = true; 584 578 break; 585 579 } 586 580 ··· 692 686 #endif 693 687 { 694 688 display_keylock_text(keys_locked); 695 - draw_screen(id3); 696 - if (mpeg_is_playing() && id3) 697 - display_file_time(id3->elapsed, id3->length); 689 + restore = true; 698 690 } 699 691 break; 700 692 ··· 734 726 #endif 735 727 { 736 728 display_keylock_text(keys_locked); 737 - draw_screen(id3); 738 - if (mpeg_is_playing() && id3) 739 - display_file_time(id3->elapsed, id3->length); 729 + restore = true; 740 730 break; 741 731 } 742 732 break; ··· 772 762 if (keys_locked) 773 763 { 774 764 display_keylock_text(keys_locked); 775 - draw_screen(id3); 776 - if (mpeg_is_playing() && id3) 777 - display_file_time(id3->elapsed, id3->length); 765 + restore = true; 778 766 break; 779 767 } 780 768 lcd_stop_scroll(); ··· 843 831 if(keys_locked) 844 832 { 845 833 display_keylock_text(keys_locked); 846 - draw_screen(id3); 847 - if (mpeg_is_playing() && id3) 848 - display_file_time(id3->elapsed, id3->length); 834 + restore = true; 849 835 break; 850 836 } 851 837 ··· 858 844 else 859 845 mpeg_sound_set(SOUND_VOLUME, global_settings.volume); 860 846 display_mute_text(device_muted); 861 - if (mpeg_is_playing() && id3) 862 - display_file_time(id3->elapsed, id3->length); 863 - draw_screen(id3); 847 + restore = true; 864 848 } 865 849 dont_go_to_menu = true; 866 850 break; ··· 881 865 lcd_icon(ICON_RECORD, false); 882 866 #endif 883 867 display_keylock_text(keys_locked); 884 - draw_screen(id3); 885 - if (mpeg_is_playing() && id3) 886 - display_file_time(id3->elapsed, id3->length); 868 + restore = true; 887 869 } 888 870 889 871 dont_go_to_menu = true; ··· 905 887 old_release_mask = button_set_release(RELEASE_MASK); 906 888 ignore_keyup = true; 907 889 id3 = mpeg_current_track(); 908 - draw_screen(id3); 909 - if (mpeg_is_playing() && id3) 910 - display_file_time(id3->elapsed, id3->length); 890 + restore = true; 911 891 } 912 892 else 913 893 { ··· 928 908 lcd_setmargins(0, STATUSBAR_HEIGHT); 929 909 else 930 910 lcd_setmargins(0, 0); 931 - draw_screen(id3); 932 - if (mpeg_is_playing() && id3) 933 - display_file_time(id3->elapsed, id3->length); 911 + restore = true; 934 912 #endif 935 913 break; 936 914 #endif ··· 943 921 if (keys_locked) 944 922 { 945 923 display_keylock_text(keys_locked); 946 - draw_screen(id3); 947 - if (mpeg_is_playing() && id3) 948 - display_file_time(id3->elapsed, id3->length); 924 + restore = true; 949 925 break; 950 926 } 951 927 ··· 994 970 995 971 status_draw(); 996 972 break; 973 + } 974 + 975 + if(restore) { 976 + draw_screen(id3); 977 + if (mpeg_is_playing() && id3) 978 + display_file_time(id3->elapsed, id3->length); 997 979 } 998 980 } 999 981 }