2 * (C) GraÅžvydas "notaz" Ignotas, 2010
4 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
5 * See the COPYING file in the top-level directory.
8 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
10 #define err(fmt, ...) \
11 fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__)
12 #define err_perror(fmt, ...) do { \
13 fprintf(stderr, "omapsdl: " fmt ": ", ##__VA_ARGS__); \
16 #define log(fmt, ...) \
17 fprintf(stdout, "omapsdl: " fmt "\n", ##__VA_ARGS__)
18 #define not_supported() \
19 fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__)
21 #define trace(fmt, ...) printf(" %s(" fmt ")\n", __FUNCTION__, ##__VA_ARGS__)
28 struct SDL_PrivateVideoData {
29 struct vout_fbdev *fbdev;
31 int screen_w, screen_h;
32 unsigned int oshide_done:1;
35 int osdl_video_set_mode(struct SDL_PrivateVideoData *pdata, int width, int height, int bpp);
36 void *osdl_video_flip(struct SDL_PrivateVideoData *pdata);
37 int osdl_video_detect_screen(struct SDL_PrivateVideoData *pdata);
38 void osdl_video_finish(struct SDL_PrivateVideoData *pdata);
40 void omapsdl_input_init(void);
41 void omapsdl_input_bind(const char *kname, const char *sdlname);
42 int omapsdl_input_get_events(int timeout_ms,
43 int (*key_cb)(void *cb_arg, int sdl_kc, int is_pressed),
44 int (*ts_cb)(void *cb_arg, int x, int y, unsigned int pressure),
46 void omapsdl_input_finish(void);
48 void omapsdl_config(void);
49 void omapsdl_config_from_env(void);
51 /* functions for standalone */
52 void do_clut(void *dest, void *src, unsigned short *pal, int count);
55 extern int gcfg_force_vsync;