diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 10:31:31 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 658026e6267277b27d297c481728f74d160a8481 (patch) | |
tree | 915a9d2bb48469bdd5b9127dc19a61f230721a6c /apps/plugins/lib/highscore.c | |
parent | 8cb555460ff79e636a7907fb2589e16db98c8600 (diff) | |
download | rockbox-658026e626.tar.gz rockbox-658026e626.zip |
[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
Diffstat (limited to 'apps/plugins/lib/highscore.c')
-rw-r--r-- | apps/plugins/lib/highscore.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index ff7a166222..3aae955bfc 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c @@ -119,7 +119,6 @@ bool highscore_would_update(int score, struct highscore *scores, return (num_scores > 0) && (score > scores[num_scores-1].score); } -#ifdef HAVE_LCD_BITMAP #define MARGIN 5 void highscore_show(int position, struct highscore *scores, int num_scores, bool show_level) @@ -179,37 +178,3 @@ void highscore_show(int position, struct highscore *scores, int num_scores, rb->lcd_set_foreground(fgcolor); #endif } -#else -struct scoreinfo { - struct highscore *scores; - int position; - bool show_level; -}; -static const char* get_score(int selected, void * data, - char * buffer, size_t buffer_len) -{ - struct scoreinfo *scoreinfo = (struct scoreinfo *) data; - int len; - len = rb->snprintf(buffer, buffer_len, "%c%d) %4d", - (scoreinfo->position == selected?'*':' '), - selected+1, scoreinfo->scores[selected].score); - - if (scoreinfo->show_level) - rb->snprintf(buffer + len, buffer_len - len, " %d", - scoreinfo->scores[selected].level); - return buffer; -} - -void highscore_show(int position, struct highscore *scores, int num_scores, - bool show_level) -{ - struct simplelist_info info; - struct scoreinfo scoreinfo = {scores, position, show_level}; - rb->simplelist_info_init(&info, "High Scores", num_scores, &scoreinfo); - if (position >= 0) - info.selection = position; - info.hide_selection = true; - info.get_name = get_score; - rb->simplelist_show_list(&info); -} -#endif /* HAVE_LCD_BITMAP */ |