handle multibuffering better
[sdl_omap.git] / src / video / omapdss / omapsdl.h
index b34caa3..12a6f6e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Gražvydas "notaz" Ignotas, 2010
+ * (C) Gražvydas "notaz" Ignotas, 2010-2012
  *
  * 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.
 struct SDL_PrivateVideoData {
        struct vout_fbdev *fbdev;
        void *saved_layer;
-       unsigned int oshide_done:1;
+       /* physical screen size, should match touchscreen */
+       int phys_w, phys_h;
+       /* layer */
+       int layer_x, layer_y, layer_w, layer_h;
+       /* SDL surface borders to hide */
+       int border_l, border_r, border_t, border_b;
+       /* phys -> layer coord multipliers (16.16) */
+       int ts_xmul, ts_ymul;
+       /* misc/config */
+       unsigned int xenv_up:1;
+       unsigned int app_uses_flip:1;
+       unsigned int cfg_force_vsync:1;
+       unsigned int cfg_force_doublebuf:1;
+       unsigned int cfg_no_ts_translate:1;
 };
 
-int   osdl_video_set_mode(struct SDL_PrivateVideoData *pdata, int width, int height, int bpp);
+void *osdl_video_set_mode(struct SDL_PrivateVideoData *pdata,
+                         int border_l, int border_r, int border_t, int border_b,
+                         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);
@@ -43,11 +59,9 @@ int  omapsdl_input_get_events(int timeout_ms,
                void *cb_arg);
 void omapsdl_input_finish(void);
 
-void omapsdl_config(void);
-void omapsdl_config_from_env(void);
+void omapsdl_config(struct SDL_PrivateVideoData *pdata);
+void omapsdl_config_from_env(struct SDL_PrivateVideoData *pdata);
 
 /* functions for standalone */
 void do_clut(void *dest, void *src, unsigned short *pal, int count);
 
-/* config */
-extern int gcfg_force_vsync;