summaryrefslogtreecommitdiff
path: root/common/cmd_bmp.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2013-07-02 00:04:05 +0200
committerAnatolij Gustschin <agust@denx.de>2013-07-08 20:21:24 +0200
commitff8fb56b6f7edafc1bcba8ef008b3f368cabe60d (patch)
tree2db117f992892120bab9ab04b212700642adf0e7 /common/cmd_bmp.c
parent327598945b13000065ca6ba3fe96c9bd45320999 (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 <agust@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'common/cmd_bmp.c')
-rw-r--r--common/cmd_bmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 946031deaab..a7c5fbd2691 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -31,6 +31,7 @@
#include <command.h>
#include <asm/byteorder.h>
#include <malloc.h>
+#include <splash.h>
#include <video.h>
static int bmp_info (ulong addr);
@@ -125,6 +126,8 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
ulong addr;
int x = 0, y = 0;
+ splash_get_pos(&x, &y);
+
switch (argc) {
case 1: /* use load_addr as default address */
addr = load_addr;