mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2024-11-10 06:00:07 +00:00
commit
0147763114
@ -1,5 +1,4 @@
|
|||||||
menu "Device Support"
|
menu "Device Support"
|
||||||
|
|
||||||
config APPLE_N61AP
|
config APPLE_N61AP
|
||||||
bool "Support for Apple iPhone 6"
|
bool "Support for Apple iPhone 6"
|
||||||
default n
|
default n
|
||||||
@ -143,4 +142,10 @@ menu "Device Specific Addresses"
|
|||||||
default 3 if SAMSUNG_J5LTE
|
default 3 if SAMSUNG_J5LTE
|
||||||
default 4 if SAMSUNG_J4LTE
|
default 4 if SAMSUNG_J4LTE
|
||||||
|
|
||||||
|
config FRAMEBUFFER_BGRA
|
||||||
|
bool "Framebuffer BGRA (for SimpleFB)"
|
||||||
|
depends on SIMPLE_FB
|
||||||
|
default y if SAMSUNG_J4LTE
|
||||||
|
default n
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
#define SIMPLEFB_H_
|
#define SIMPLEFB_H_
|
||||||
|
|
||||||
typedef struct _color {
|
typedef struct _color {
|
||||||
unsigned char a;
|
|
||||||
unsigned char r;
|
unsigned char r;
|
||||||
unsigned char g;
|
unsigned char g;
|
||||||
unsigned char b;
|
unsigned char b;
|
||||||
|
unsigned char a;
|
||||||
} color;
|
} color;
|
||||||
|
|
||||||
typedef struct _font_params {
|
typedef struct _font_params {
|
||||||
|
@ -18,10 +18,14 @@ void clean_fb(volatile char *fb, int width, int height, int stride) {
|
|||||||
/* Unlike ARGB8888, we explicitly use 3 bytes to represent each pixel, making sure no extra padding byte is added. */
|
/* Unlike ARGB8888, we explicitly use 3 bytes to represent each pixel, making sure no extra padding byte is added. */
|
||||||
void draw_pixel(volatile char *fb, int x, int y, int width, int stride, color c) {
|
void draw_pixel(volatile char *fb, int x, int y, int width, int stride, color c) {
|
||||||
long int location = (x * stride) + (y * width * stride);
|
long int location = (x * stride) + (y * width * stride);
|
||||||
|
#ifdef CONFIG_FRAMEBUFFER_BGRA
|
||||||
|
*(fb + location) = c.b;
|
||||||
|
*(fb + location + 2) = c.r;
|
||||||
|
#else
|
||||||
*(fb + location) = c.r;
|
*(fb + location) = c.r;
|
||||||
*(fb + location + 1) = c.g;
|
|
||||||
*(fb + location + 2) = c.b;
|
*(fb + location + 2) = c.b;
|
||||||
|
#endif
|
||||||
|
*(fb + location + 1) = c.g;
|
||||||
#if CONFIG_FRAMEBUFFER_STRIDE == 4
|
#if CONFIG_FRAMEBUFFER_STRIDE == 4
|
||||||
*(fb + location + 3) = c.a;
|
*(fb + location + 3) = c.a;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user