Skip to content

Commit

Permalink
Draw the touch bar gradient if we cannot draw image
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfugil committed Jul 20, 2024
1 parent b45389f commit 4fd1f81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/payload/bootscreend.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ static int height = 0;
static int width = 0;
//#define BSD_LOG_TO_FILE

static int bootscreend_draw_gradient(void);

#if !defined(TESTMAIN)
static int bsd_printf(const char* fmt, ...) {
va_list va;
Expand Down Expand Up @@ -177,6 +179,7 @@ int bootscreend_draw_cgimage(const char* image_path) {
cgImage = CGImageSourceCreateImageAtIndex(cgImageSource, 0, NULL);
if (!cgImage) {
bsd_printf("could not create image\n");
bootscreend_draw_gradient();
goto finish;
}
rgbColorSpace = CGColorSpaceCreateDeviceRGB();
Expand Down

0 comments on commit 4fd1f81

Please sign in to comment.