mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-22 09:16:19 +00:00
233dbefde2
Signed-off-by: Stephan Raue <stephan@openelec.tv>
111 lines
3.0 KiB
Diff
111 lines
3.0 KiB
Diff
diff -urN plymouth-lite-0.6.0/ply-frame-buffer.c plymouth-lite-0.6.0.change/ply-frame-buffer.c
|
|
--- plymouth-lite-0.6.0/ply-frame-buffer.c 2009-02-19 19:14:24.000000000 +0800
|
|
+++ plymouth-lite-0.6.0.change/ply-frame-buffer.c 2009-06-13 17:44:05.000000000 +0800
|
|
@@ -47,41 +47,6 @@
|
|
#define PLY_FRAME_BUFFER_DEFAULT_FB_DEVICE_NAME "/dev/fb0"
|
|
#endif
|
|
|
|
-struct _ply_frame_buffer
|
|
-{
|
|
- char *device_name;
|
|
- int device_fd;
|
|
-
|
|
- char *map_address;
|
|
- size_t size;
|
|
-
|
|
- uint32_t *shadow_buffer;
|
|
-
|
|
- uint32_t red_bit_position;
|
|
- uint32_t green_bit_position;
|
|
- uint32_t blue_bit_position;
|
|
- uint32_t alpha_bit_position;
|
|
-
|
|
- uint32_t bits_for_red;
|
|
- uint32_t bits_for_green;
|
|
- uint32_t bits_for_blue;
|
|
- uint32_t bits_for_alpha;
|
|
-
|
|
- int32_t dither_red;
|
|
- int32_t dither_green;
|
|
- int32_t dither_blue;
|
|
-
|
|
- unsigned int bytes_per_pixel;
|
|
- unsigned int row_stride;
|
|
-
|
|
- ply_frame_buffer_area_t area;
|
|
- ply_frame_buffer_area_t area_to_flush;
|
|
-
|
|
- void (*flush)(ply_frame_buffer_t *buffer);
|
|
-
|
|
- int pause_count;
|
|
-};
|
|
-
|
|
static bool ply_frame_buffer_open_device (ply_frame_buffer_t *buffer);
|
|
static void ply_frame_buffer_close_device (ply_frame_buffer_t *buffer);
|
|
static bool ply_frame_buffer_query_device (ply_frame_buffer_t *buffer);
|
|
diff -urN plymouth-lite-0.6.0/ply-frame-buffer.h plymouth-lite-0.6.0.change/ply-frame-buffer.h
|
|
--- plymouth-lite-0.6.0/ply-frame-buffer.h 2009-02-19 17:35:54.000000000 +0800
|
|
+++ plymouth-lite-0.6.0.change/ply-frame-buffer.h 2009-06-13 17:31:42.000000000 +0800
|
|
@@ -38,6 +38,41 @@
|
|
unsigned long height;
|
|
};
|
|
|
|
+struct _ply_frame_buffer
|
|
+{
|
|
+ char *device_name;
|
|
+ int device_fd;
|
|
+
|
|
+ char *map_address;
|
|
+ size_t size;
|
|
+
|
|
+ uint32_t *shadow_buffer;
|
|
+
|
|
+ uint32_t red_bit_position;
|
|
+ uint32_t green_bit_position;
|
|
+ uint32_t blue_bit_position;
|
|
+ uint32_t alpha_bit_position;
|
|
+
|
|
+ uint32_t bits_for_red;
|
|
+ uint32_t bits_for_green;
|
|
+ uint32_t bits_for_blue;
|
|
+ uint32_t bits_for_alpha;
|
|
+
|
|
+ int32_t dither_red;
|
|
+ int32_t dither_green;
|
|
+ int32_t dither_blue;
|
|
+
|
|
+ unsigned int bytes_per_pixel;
|
|
+ unsigned int row_stride;
|
|
+
|
|
+ ply_frame_buffer_area_t area;
|
|
+ ply_frame_buffer_area_t area_to_flush;
|
|
+
|
|
+ void (*flush)(ply_frame_buffer_t *buffer);
|
|
+
|
|
+ int pause_count;
|
|
+};
|
|
+
|
|
#define PLY_FRAME_BUFFER_COLOR_TO_PIXEL_VALUE(r,g,b,a) \
|
|
(((uint8_t) (CLAMP (a * 255.0, 0.0, 255.0)) << 24) \
|
|
| ((uint8_t) (CLAMP (r * 255.0, 0.0, 255.0)) << 16) \
|
|
diff -urN plymouth-lite-0.6.0/ply-image.c plymouth-lite-0.6.0.change/ply-image.c
|
|
--- plymouth-lite-0.6.0/ply-image.c 2009-02-19 19:16:36.000000000 +0800
|
|
+++ plymouth-lite-0.6.0.change/ply-image.c 2009-06-13 17:42:52.000000000 +0800
|
|
@@ -43,6 +43,7 @@
|
|
#include <png.h>
|
|
|
|
#include <linux/fb.h>
|
|
+#include "ply-frame-buffer.h"
|
|
|
|
#define MIN(a,b) ((a) <= (b)? (a) : (b))
|
|
#define MAX(a,b) ((a) >= (b)? (a) : (b))
|
|
@@ -464,6 +465,8 @@
|
|
return exit_code;
|
|
}
|
|
|
|
+ image = ply_image_resize(image, buffer->area.width, buffer->area.height);
|
|
+
|
|
animate_at_time (buffer, image);
|
|
|
|
ply_frame_buffer_close (buffer);
|