-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 40a7352.
- Loading branch information
Showing
3 changed files
with
58 additions
and
69 deletions.
There are no files selected for viewing
Submodule buildroot
updated
6592 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
From 170d038d57203030499d8bc5285a7d70b8f8fc9c Mon Sep 17 00:00:00 2001 | ||
From: Raphael Jacob <[email protected]> | ||
Date: Sat, 31 Dec 2022 20:56:11 +0100 | ||
Subject: [PATCH] ft-splash | ||
|
||
--- | ||
psplash.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++++----- | ||
1 file changed, 136 insertions(+), 12 deletions(-) | ||
|
||
diff --git a/psplash.c b/psplash.c | ||
index ee1af6b..3bdad88 100644 | ||
--- a/psplash.c | ||
+++ b/psplash.c | ||
@@ -20,6 +20,11 @@ | ||
#endif | ||
#include FONT_HEADER | ||
--- psplash.orig/psplash.c 2016-06-05 23:14:59.000000000 +0200 | ||
+++ psplash-5b3c1cc28f5abdc2c33830150b48b278cc4f7bca/psplash.c 2018-04-29 15:17:44.726214920 +0200 | ||
@@ -25,6 +25,11 @@ | ||
#include "psplash-bar-img.h" | ||
#include "radeon-font.h" | ||
|
||
+int YPos = -1; | ||
+unsigned long BarCol=0xFFFFFFFF; | ||
|
@@ -23,36 +12,37 @@ index ee1af6b..3bdad88 100644 | |
#define SPLIT_LINE_POS(fb) \ | ||
( (fb)->height \ | ||
- (( PSPLASH_IMG_SPLIT_DENOMINATOR \ | ||
@@ -46,12 +51,27 @@ psplash_draw_msg (PSplashFB *fb, const char *msg) | ||
@@ -51,13 +56,28 @@ | ||
|
||
/* Clear */ | ||
|
||
- psplash_fb_draw_rect (fb, | ||
+ if(BkCol == 0xFFFFFFFF) | ||
+ psplash_fb_draw_rect (fb, | ||
+ psplash_fb_draw_rect (fb, | ||
0, | ||
SPLIT_LINE_POS(fb) - h, | ||
fb->width, | ||
h, | ||
PSPLASH_BACKGROUND_COLOR); | ||
+ else { | ||
+ uint8 r,g,b; | ||
+ | ||
+ | ||
+ b = (uint8)(BkCol & 0x000000FF); | ||
+ g = (uint8)((BkCol >> 8) & 0x000000FF); | ||
+ r = (uint8)((BkCol >> 16) & 0x000000FF); | ||
+ | ||
+ psplash_fb_draw_rect (fb, | ||
+ 0, | ||
+ SPLIT_LINE_POS(fb) - h, | ||
+ psplash_fb_draw_rect (fb, | ||
+ 0, | ||
+ SPLIT_LINE_POS(fb) - h, | ||
+ fb->width, | ||
+ h, | ||
+ r, g, b); | ||
+ } | ||
|
||
+ } | ||
+ | ||
psplash_fb_draw_text (fb, | ||
(fb->width-w)/2, | ||
@@ -69,28 +89,84 @@ psplash_draw_progress (PSplashFB *fb, int value) | ||
SPLIT_LINE_POS(fb) - h, | ||
@@ -73,28 +93,84 @@ | ||
|
||
/* 4 pix border */ | ||
x = ((fb->width - BAR_IMG_WIDTH)/2) + 4 ; | ||
|
@@ -70,36 +60,36 @@ index ee1af6b..3bdad88 100644 | |
barwidth = (CLAMP(value,0,100) * width) / 100; | ||
- psplash_fb_draw_rect (fb, x + barwidth, y, | ||
+ if(BarBkCol == 0xFFFFFFFF) | ||
+ psplash_fb_draw_rect (fb, x + barwidth, y, | ||
+ psplash_fb_draw_rect (fb, x + barwidth, y, | ||
width - barwidth, height, | ||
PSPLASH_BAR_BACKGROUND_COLOR); | ||
- psplash_fb_draw_rect (fb, x, y, barwidth, | ||
+ else { | ||
+ uint8 r,g,b; | ||
+ | ||
+ | ||
+ b = (uint8)(BarBkCol & 0x000000FF); | ||
+ g = (uint8)((BarBkCol >> 8) & 0x000000FF); | ||
+ r = (uint8)((BarBkCol >> 16) & 0x000000FF); | ||
+ psplash_fb_draw_rect (fb, x + barwidth, y, | ||
+ width - barwidth, height, | ||
+ psplash_fb_draw_rect (fb, x + barwidth, y, | ||
+ width - barwidth, height, | ||
+ r, g, b); | ||
+ } | ||
+ | ||
+ | ||
+ | ||
+ if(BarCol == 0xFFFFFFFF) | ||
+ | ||
+ | ||
+ | ||
+ if(BarCol == 0xFFFFFFFF) | ||
+ psplash_fb_draw_rect (fb, x, y, barwidth, | ||
height, PSPLASH_BAR_COLOR); | ||
+ else { | ||
+ uint8 r,g,b; | ||
+ | ||
+ | ||
+ b = (uint8)(BarCol & 0x000000FF); | ||
+ g = (uint8)((BarCol >> 8) & 0x000000FF); | ||
+ r = (uint8)((BarCol >> 16) & 0x000000FF); | ||
+ psplash_fb_draw_rect (fb, x, y, barwidth, | ||
+ height, r, g, b); | ||
+ | ||
+ | ||
+ | ||
+ | ||
+ } | ||
} | ||
else | ||
|
@@ -109,18 +99,18 @@ index ee1af6b..3bdad88 100644 | |
+ | ||
+ | ||
+ if(BarBkCol == 0xFFFFFFFF) | ||
+ psplash_fb_draw_rect (fb, x, y, | ||
+ psplash_fb_draw_rect (fb, x, y, | ||
width - barwidth, height, | ||
PSPLASH_BAR_BACKGROUND_COLOR); | ||
- psplash_fb_draw_rect (fb, x + width - barwidth, | ||
+ else { | ||
+ uint8 r,g,b; | ||
+ | ||
+ | ||
+ b = (uint8)(BarBkCol & 0x000000FF); | ||
+ g = (uint8)((BarBkCol >> 8) & 0x000000FF); | ||
+ r = (uint8)((BarBkCol >> 16) & 0x000000FF); | ||
+ psplash_fb_draw_rect (fb, x, y, | ||
+ width - barwidth, height, | ||
+ psplash_fb_draw_rect (fb, x, y, | ||
+ width - barwidth, height, | ||
+ r, g, b); | ||
+ } | ||
+ | ||
|
@@ -131,18 +121,18 @@ index ee1af6b..3bdad88 100644 | |
PSPLASH_BAR_COLOR); | ||
+ else { | ||
+ uint8 r,g,b; | ||
+ | ||
+ | ||
+ b = (uint8)(BarCol & 0x000000FF); | ||
+ g = (uint8)((BarCol >> 8) & 0x000000FF); | ||
+ r = (uint8)((BarCol >> 16) & 0x000000FF); | ||
+ psplash_fb_draw_rect (fb, x + width - barwidth, | ||
+ y, barwidth, height, | ||
+ r, g, b); | ||
+ } | ||
+ } | ||
} | ||
|
||
DBG("value: %i, width: %i, barwidth :%i\n", value, | ||
@@ -227,6 +303,9 @@ main (int argc, char** argv) | ||
@@ -209,6 +285,9 @@ | ||
PSplashFB *fb; | ||
bool disable_console_switch = FALSE; | ||
|
||
|
@@ -152,7 +142,7 @@ index ee1af6b..3bdad88 100644 | |
signal(SIGHUP, psplash_exit); | ||
signal(SIGINT, psplash_exit); | ||
signal(SIGQUIT, psplash_exit); | ||
@@ -251,10 +330,46 @@ main (int argc, char** argv) | ||
@@ -233,10 +312,46 @@ | ||
fbdev_id = atoi(argv[i]); | ||
continue; | ||
} | ||
|
@@ -172,18 +162,18 @@ index ee1af6b..3bdad88 100644 | |
+ | ||
+ if (!strcmp(argv[i],"--BarBkCol")) | ||
+ { | ||
+ if (++i >= argc) goto fail; | ||
+ sscanf(argv[i],"%lX", &BarBkCol); | ||
+ continue; | ||
+ } | ||
+ if (++i >= argc) goto fail; | ||
+ sscanf(argv[i],"%lX", &BarBkCol); | ||
+ continue; | ||
+ } | ||
+ | ||
+ if (!strcmp(argv[i],"--BkCol")) | ||
+ { | ||
+ if (++i >= argc) goto fail; | ||
+ sscanf(argv[i],"%lX", &BkCol); | ||
+ continue; | ||
+ } | ||
+ | ||
+ continue; | ||
+ } | ||
+ | ||
+ if (!strcmp(argv[i],"--filename")) | ||
+ { | ||
+ if (++i >= argc) goto fail; | ||
|
@@ -199,8 +189,8 @@ index ee1af6b..3bdad88 100644 | |
argv[0]); | ||
exit(-1); | ||
} | ||
@@ -297,11 +412,12 @@ main (int argc, char** argv) | ||
#endif | ||
@@ -275,11 +390,12 @@ | ||
} | ||
|
||
/* Clear the background with #ecece1 */ | ||
- psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height, | ||
|
@@ -215,37 +205,36 @@ index ee1af6b..3bdad88 100644 | |
(fb->width - POKY_IMG_WIDTH)/2, | ||
#if PSPLASH_IMG_FULLSCREEN | ||
(fb->height - POKY_IMG_HEIGHT)/2, | ||
@@ -315,11 +431,19 @@ main (int argc, char** argv) | ||
@@ -292,21 +408,29 @@ | ||
POKY_IMG_BYTES_PER_PIXEL, | ||
POKY_IMG_ROWSTRIDE, | ||
POKY_IMG_RLE_PIXEL_DATA); | ||
|
||
+ } else { | ||
+ char Cmd[512]; | ||
+ memset(Cmd, 0, sizeof(Cmd)); | ||
+ sprintf(Cmd,"fbv -s1 %s", FileName); | ||
+ system(Cmd); /* Draw file with fbv command */ | ||
+ } | ||
+ | ||
#ifdef PSPLASH_SHOW_PROGRESS_BAR | ||
|
||
/* Draw progress bar border */ | ||
- psplash_fb_draw_image (fb, | ||
+ if ( BkCol == 0xFFFFFFFF) | ||
+ psplash_fb_draw_image (fb, | ||
+ psplash_fb_draw_image (fb, | ||
(fb->width - BAR_IMG_WIDTH)/2, | ||
- SPLIT_LINE_POS(fb), | ||
+ (YPos < 0)?SPLIT_LINE_POS(fb):YPos, | ||
+ (YPos < 0)?SPLIT_LINE_POS(fb):YPos, | ||
BAR_IMG_WIDTH, | ||
BAR_IMG_HEIGHT, | ||
BAR_IMG_BYTES_PER_PIXEL, | ||
@@ -330,7 +454,7 @@ main (int argc, char** argv) | ||
#endif | ||
BAR_IMG_ROWSTRIDE, | ||
BAR_IMG_RLE_PIXEL_DATA); | ||
|
||
+ | ||
psplash_draw_progress (fb, 0); | ||
|
||
#ifdef PSPLASH_STARTUP_MSG | ||
- psplash_draw_msg (fb, PSPLASH_STARTUP_MSG); | ||
+ if(strlen(FileName) == 0) psplash_draw_msg (fb, PSPLASH_STARTUP_MSG); | ||
#endif | ||
|
||
/* Scene set so let's flip the buffers. */ | ||
-- | ||
2.30.2 | ||
|
||
psplash_main (fb, pipe_fd, 0); |