diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2021-01-31 21:18:40 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-08 10:57:05 +0100 |
commit | 12ad41f91f1824eb141e368294d97860644ab777 (patch) | |
tree | 032da73369f4cf1e2a4614c87b358a87fa64659b /arch/sandbox/mach-sandbox | |
parent | f38f34a2f41e5981f2995231d94688d31104befc (diff) | |
download | barebox-12ad41f91f1824eb141e368294d97860644ab777.tar.gz barebox-12ad41f91f1824eb141e368294d97860644ab777.tar.xz |
sandbox: migrate to SDL 2.0
SDL 2.0 has been released more than 7 years ago and should be available
everywhere. Replace barebox's SDL 1.2 with SDL 2.0 instead:
- better maintained
- At least on Debian, you can't install x86_64 and i386 libsdl-dev at
the same time, which makes a quick use of CONFIG_SANDBOX_LINUX_I386
harder as the user needs to reinstall libraries. With SDL 2.0, it
works
- SDL 2.0 has easier audio API, which will be used in a later commit
- Wayland support for sandbox video driver
Port to SDL 2.0 and as we touch everything anyway, rename the
sdl_ functions to start with sdl_video_ to differentiate from upcoming
sdl_sound_.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox/mach-sandbox')
-rw-r--r-- | arch/sandbox/mach-sandbox/include/mach/linux.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/sandbox/mach-sandbox/include/mach/linux.h b/arch/sandbox/mach-sandbox/include/mach/linux.h index b26bfc24a2..c636a9af9c 100644 --- a/arch/sandbox/mach-sandbox/include/mach/linux.h +++ b/arch/sandbox/mach-sandbox/include/mach/linux.h @@ -38,13 +38,16 @@ struct linux_console_data { extern int sdl_xres; extern int sdl_yres; -void sdl_close(void); -int sdl_open(int xres, int yres, int bpp, void* buf); -void sdl_stop_timer(void); -void sdl_start_timer(void); -void sdl_get_bitfield_rgba(struct fb_bitfield *r, struct fb_bitfield *g, - struct fb_bitfield *b, struct fb_bitfield *a); -void sdl_setpixel(int x, int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a); +struct sdl_fb_info { + void *screen_base; + int xres; + int yres; + int bpp; + int rmask, gmask, bmask, amask; +}; +int sdl_video_open(const struct sdl_fb_info *); +void sdl_video_pause(void); +void sdl_video_close(void); struct ft2232_bitbang; struct ft2232_bitbang *barebox_libftdi1_open(int vendor_id, int device_id, |