[AD] set_palette and vsync in X

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


It seems one of my patches that changes vsync slipped through. Unfortunately the patch was incomplete as set_palette no longer waits for vsync. This patch fixes that issue.

This version of vsync doesn't call XSync (and thus the XLOCK associated with it), since AFAICS XSync has nothing to do with the screen retrace. It uses the retrace_count variable to time the retrace.

- Kitty Cat
Index: src/x/xwin.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/x/xwin.c,v
retrieving revision 1.65
diff -u -r1.65 xwin.c
--- src/x/xwin.c	18 Aug 2004 13:03:46 -0000	1.65
+++ src/x/xwin.c	23 Aug 2004 01:47:28 -0000
@@ -205,7 +205,6 @@
 static void _xwin_private_set_palette_range(AL_CONST PALETTE p, int from, int to, int vsync);
 static void _xwin_private_set_window_defaults(void);
 static void _xwin_private_flush_buffers(void);
-static void _xwin_private_vsync(void);
 static void _xwin_private_resize_window(int w, int h);
 static void _xwin_private_process_event(XEvent *event);
 static void _xwin_private_set_warped_mouse_mode(int permanent);
@@ -1993,7 +1992,7 @@
 
    /* Wait for VBI.  */
    if (vsync)
-      _xwin_private_vsync();
+      _xwin_vsync();
 
    if (_xwin.set_colors != 0) {
       if (blitter_func) {
@@ -2096,21 +2095,8 @@
 /* _xwin_vsync:
  *  Emulation of vsync.
  */
-static void _xwin_private_vsync(void)
-{
-#if 0
-   _xwin_private_flush_buffers();
-#endif
-}
-
 void _xwin_vsync(void)
 {
-#if 0
-   XLOCK();
-   _xwin_private_vsync();
-   XUNLOCK();
-#endif
-
    if (_timer_installed) {
       int prev = retrace_count;
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/