Ubuntu Pastebin

Paste from ogra at Fri, 8 Sep 2017 15:12:42 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 20 
 21 #include "psplash.h"
 22 #include "psplash-config.h"
 23 #include "psplash-colors.h"
 24 #include "psplash-poky-img.h"
 25 #include "psplash-bar-img.h"
 26 #include "radeon-font.h"
 27 
 28 #define SPLIT_LINE_POS(fb)                                  \
 29         (  (fb)->height                                     \
 30          - ((  PSPLASH_IMG_SPLIT_DENOMINATOR                \
 31              - PSPLASH_IMG_SPLIT_NUMERATOR)                 \
 32             * (fb)->height / PSPLASH_IMG_SPLIT_DENOMINATOR) \
 33         )
 34   
 35 void
 36 psplash_exit (int UNUSED(signum))
 37 {
 38   DBG("mark");
 39 
 40   psplash_console_reset (); 
 41 }
 42   
 43 void
 44 psplash_draw_msg (PSplashFB *fb, const char *msg)
 45 {
 46   int w, h;
 47 
 48   psplash_fb_text_size (&w, &h, &radeon_font, msg);
 49 
 50   DBG("displaying '%s' %ix%i\n", msg, w, h);
 51 
 52   /* Clear */
 53   
 54   psplash_fb_draw_rect (fb, 
 55                         0, 
 56                         SPLIT_LINE_POS(fb) - h, 
 57                         fb->width,
 58                         h,
 59                         PSPLASH_BACKGROUND_COLOR);
 60   
 61   psplash_fb_draw_text (fb,
 62                         (fb->width-w)/2, 
 63                         SPLIT_LINE_POS(fb) - h, 
 64                         PSPLASH_TEXT_COLOR,
 65                         &radeon_font,
 66                         msg);
 67 }
Download as text