Loading minui/graphics.c +10 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ * limitations under the License. */ #include <stdbool.h> #include <stdlib.h> #include <unistd.h> Loading Loading @@ -364,3 +365,12 @@ gr_pixel *gr_fb_data(void) { return (unsigned short *) gr_mem_surface.data; } void gr_fb_blank(bool blank) { int ret; ret = ioctl(gr_fb_fd, FBIOBLANK, blank ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK); if (ret < 0) perror("ioctl(): blank"); } minui/minui.h +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #ifndef _MINUI_H_ #define _MINUI_H_ #include <stdbool.h> typedef void* gr_surface; typedef unsigned short gr_pixel; Loading @@ -27,6 +29,7 @@ int gr_fb_width(void); int gr_fb_height(void); gr_pixel *gr_fb_data(void); void gr_flip(void); void gr_fb_blank(bool blank); void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a); void gr_fill(int x, int y, int w, int h); Loading Loading
minui/graphics.c +10 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ * limitations under the License. */ #include <stdbool.h> #include <stdlib.h> #include <unistd.h> Loading Loading @@ -364,3 +365,12 @@ gr_pixel *gr_fb_data(void) { return (unsigned short *) gr_mem_surface.data; } void gr_fb_blank(bool blank) { int ret; ret = ioctl(gr_fb_fd, FBIOBLANK, blank ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK); if (ret < 0) perror("ioctl(): blank"); }
minui/minui.h +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #ifndef _MINUI_H_ #define _MINUI_H_ #include <stdbool.h> typedef void* gr_surface; typedef unsigned short gr_pixel; Loading @@ -27,6 +29,7 @@ int gr_fb_width(void); int gr_fb_height(void); gr_pixel *gr_fb_data(void); void gr_flip(void); void gr_fb_blank(bool blank); void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a); void gr_fill(int x, int y, int w, int h); Loading