diff options
Diffstat (limited to 'lib/logo/logo.c')
-rw-r--r-- | lib/logo/logo.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/logo/logo.c b/lib/logo/logo.c index 9edf212232..a64f489939 100644 --- a/lib/logo/logo.c +++ b/lib/logo/logo.c @@ -1,9 +1,6 @@ /* * Copyright (c) 2015 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. @@ -35,8 +32,16 @@ static void load_logo(int width, void *start, void *end) { char *filename; size_t size = end - start; + char *ext = ""; + + if (IS_ENABLED(CONFIG_BAREBOX_LOGO_PNG)) + ext = "png"; + else if (IS_ENABLED(CONFIG_BAREBOX_LOGO_BMP)) + ext = "bmp"; + else if (IS_ENABLED(CONFIG_BAREBOX_LOGO_QOI)) + ext = "qoi"; - filename = basprintf("/logo/barebox-logo-%d.png", width); + filename = basprintf("/logo/barebox-logo-%d.%s", width, ext); write_file(filename, start, size); free(filename); } |