X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvideo%2Fomapdss%2Fomapsdl.h;h=3f15bb742409a2f7fc00ee9844d99980b8caf826;hb=0bb19c41766026c798f9c2aa9dc433a9403c8e39;hp=250099f29950ca7aeb40b8bc2bc9eeac58af6bb0;hpb=17e19802bcb08b2a79e39f84e93750f912f56609;p=sdl_omap.git diff --git a/src/video/omapdss/omapsdl.h b/src/video/omapdss/omapsdl.h index 250099f..3f15bb7 100644 --- a/src/video/omapdss/omapsdl.h +++ b/src/video/omapdss/omapsdl.h @@ -1,8 +1,22 @@ +/* + * (C) Gražvydas "notaz" Ignotas, 2010, 2011 + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. + * See the COPYING file in the top-level directory. + */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) -#define err(fmt, ...) fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__) -#define not_supported() fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__) +#define err(fmt, ...) \ + fprintf(stderr, "omapsdl: " fmt "\n", ##__VA_ARGS__) +#define err_perror(fmt, ...) do { \ + fprintf(stderr, "omapsdl: " fmt ": ", ##__VA_ARGS__); \ + perror(NULL); \ +} while (0) +#define log(fmt, ...) \ + fprintf(stdout, "omapsdl: " fmt "\n", ##__VA_ARGS__) +#define not_supported() \ + fprintf(stderr, "omapsdl: %s not supported\n", __FUNCTION__) #if 0 #define trace(fmt, ...) printf(" %s(" fmt ")\n", __FUNCTION__, ##__VA_ARGS__) #define dbg err @@ -11,6 +25,19 @@ #define dbg(...) #endif +struct SDL_PrivateVideoData { + struct vout_fbdev *fbdev; + void *saved_layer; + int screen_w, screen_h; + unsigned int xenv_up:1; +}; + +int osdl_video_set_mode(struct SDL_PrivateVideoData *pdata, + int width, int height, int bpp, int doublebuf); +void *osdl_video_flip(struct SDL_PrivateVideoData *pdata); +int osdl_video_detect_screen(struct SDL_PrivateVideoData *pdata); +void osdl_video_finish(struct SDL_PrivateVideoData *pdata); + void omapsdl_input_init(void); void omapsdl_input_bind(const char *kname, const char *sdlname); int omapsdl_input_get_events(int timeout_ms, @@ -20,9 +47,11 @@ int omapsdl_input_get_events(int timeout_ms, void omapsdl_input_finish(void); void omapsdl_config(void); +void omapsdl_config_from_env(void); /* functions for standalone */ void do_clut(void *dest, void *src, unsigned short *pal, int count); /* config */ extern int gcfg_force_vsync; +extern int gcfg_force_doublebuf;