# include <sys/ipc.h>
#endif
-#ifdef HAVE_XSP
-#include <X11/extensions/Xsp.h>
-#endif
-
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xmd.h>
static int X11ErrorHandler( Display *, XErrorEvent * );
-#ifdef HAVE_XSP
-static void EnablePixelDoubling( vout_thread_t *p_vout );
-static void DisablePixelDoubling( vout_thread_t *p_vout );
-#endif
-
-
-
/*****************************************************************************
* Activate: allocate X11 video thread output method
*****************************************************************************
/* Misc init */
p_vout->p_sys->i_time_button_last_pressed = 0;
-#ifdef HAVE_XSP
- p_vout->p_sys->i_hw_scale = 1;
-#endif
-
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
var_TriggerCallback( p_vout, "video-on-top" );
ToggleCursor( p_vout );
}
-#ifdef HAVE_XSP
- DisablePixelDoubling(p_vout);
-#endif
-
DestroyCursor( p_vout );
EnableXScreenSaver( p_vout );
DestroyWindow( p_vout, &p_vout->p_sys->window );
free( p_vout->p_sys );
}
-#ifdef HAVE_XSP
-/*****************************************************************************
- * EnablePixelDoubling: Enables pixel doubling
- *****************************************************************************
- * Checks if the double size image fits in current window, and enables pixel
- * doubling accordingly. The i_hw_scale is the integer scaling factor.
- *****************************************************************************/
-static void EnablePixelDoubling( vout_thread_t *p_vout )
-{
- int i_hor_scale = ( p_vout->p_sys->window.i_width ) / p_vout->render.i_width;
- int i_vert_scale = ( p_vout->p_sys->window.i_height ) / p_vout->render.i_height;
- if ( ( i_hor_scale > 1 ) && ( i_vert_scale > 1 ) ) {
- p_vout->p_sys->i_hw_scale = 2;
- msg_Dbg( p_vout, "Enabling pixel doubling, scaling factor %d", p_vout->p_sys->i_hw_scale );
- XSPSetPixelDoubling( p_vout->p_sys->p_display, 0, 1 );
- }
-}
-
-/*****************************************************************************
- * DisablePixelDoubling: Disables pixel doubling
- *****************************************************************************
- * The scaling factor i_hw_scale is reset to the no-scaling value 1.
- *****************************************************************************/
-static void DisablePixelDoubling( vout_thread_t *p_vout )
-{
- if ( p_vout->p_sys->i_hw_scale > 1 ) {
- msg_Dbg( p_vout, "Disabling pixel doubling" );
- XSPSetPixelDoubling( p_vout->p_sys->p_display, 0, 0 );
- p_vout->p_sys->i_hw_scale = 1;
- }
-}
-#endif
-
-
/*****************************************************************************
* ManageVideo: handle X11 events
*****************************************************************************
p_vout->b_fullscreen = !p_vout->b_fullscreen;
vout_window_SetFullScreen( p_vout->p_sys->window.owner_window,
p_vout->b_fullscreen );
-
-#ifdef HAVE_XSP
- if( p_vout->b_fullscreen )
- EnablePixelDoubling( p_vout );
- else
- DisablePixelDoubling( p_vout );
-#endif
}
/*****************************************************************************