[bugfix] FS#13709 - Mpegplayer conflicts with additional fonts in the theme

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 86f5665cd07a8629c38fbabc8e3dd6cb7bbf60e7
Author: William Wilgus <[email protected]>
Date:   Mon Mar 9 10:58:24 2026 -0400

    [bugfix] FS#13709 - Mpegplayer conflicts with additional fonts in the theme
    
    FONT_UI is a placeholder when it gets assigned it isn't resolved
    immediately
    
    when its time to resolve the font it is processed with font_get(int font)
    first it sets it to the last slot
    and then decrements till it gets a valid font
    
    I think this is intended to allow the largest
    chance of getting a loaded font
    
    instead if global_status->font_id has been set use that
    similar to how the screen helper does
    
    Change-Id: If97e504466265fafecbe07b7b72adb4808b67e6a

diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 02eeb6455d..cdf65be817 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -763,6 +763,12 @@ static void draw_scrollbar_draw_rect(const struct vo_rect *rc, int min,
 
 static void draw_setfont(int font)
 {
+    if (font == FONT_UI)
+    {
+        int uifont = rb->global_status->font_id[SCREEN_MAIN];
+        if (uifont != FONT_SYSFIXED)
+            font = uifont;
+    }
     osd.font = font;
     mylcd_setfont(font);
 }
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.