diff options
| author | Anatolij Gustschin <[email protected]> | 2013-07-02 00:04:05 +0200 |
|---|---|---|
| committer | Anatolij Gustschin <[email protected]> | 2013-07-08 20:21:24 +0200 |
| commit | ff8fb56b6f7edafc1bcba8ef008b3f368cabe60d (patch) | |
| tree | 2db117f992892120bab9ab04b212700642adf0e7 /drivers | |
| parent | 327598945b13000065ca6ba3fe96c9bd45320999 (diff) | |
video: consolidate splash screen alignment code
Code for checking "splashpos" environment variable is
duplicated in drivers, move it to the common function.
Call this function also in the bmp display command to
consider "splashpos" settings.
Signed-off-by: Anatolij Gustschin <[email protected]>
Acked-by: Otavio Salvador <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/cfb_console.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 785bbcfc320..e384b71401f 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -222,11 +222,7 @@ #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) #include <watchdog.h> #include <bmp_layout.h> - -#ifdef CONFIG_SPLASH_SCREEN_ALIGN -#define BMP_ALIGN_CENTER 0x7FFF -#endif - +#include <splash.h> #endif /* @@ -1976,23 +1972,7 @@ static void *video_logo(void) __maybe_unused ulong addr; __maybe_unused char *s; -#ifdef CONFIG_SPLASH_SCREEN_ALIGN - s = getenv("splashpos"); - if (s != NULL) { - if (s[0] == 'm') - video_logo_xpos = BMP_ALIGN_CENTER; - else - video_logo_xpos = simple_strtol(s, NULL, 0); - - s = strchr(s + 1, ','); - if (s != NULL) { - if (s[1] == 'm') - video_logo_ypos = BMP_ALIGN_CENTER; - else - video_logo_ypos = simple_strtol(s + 1, NULL, 0); - } - } -#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ + splash_get_pos(&video_logo_xpos, &video_logo_ypos); #ifdef CONFIG_SPLASH_SCREEN s = getenv("splashimage"); |
