X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fmga%2Fintf_mga.c;h=1c6172e4fa962f66c5cbd2734b4aa374bd15e18a;hb=3bb7a5371e29b608e29851b9f1366a12a3505afe;hp=8f560ff70e8226293f5b27d59e8b939fcf541271;hpb=9ac8c0ec7d1ca8c58e3b90f3e435ca0fe1d57ad2;p=vlc diff --git a/plugins/mga/intf_mga.c b/plugins/mga/intf_mga.c index 8f560ff70e..1c6172e4fa 100644 --- a/plugins/mga/intf_mga.c +++ b/plugins/mga/intf_mga.c @@ -2,6 +2,7 @@ * intf_mga.c: MGA interface ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN + * $Id: intf_mga.c,v 1.7 2001/01/15 06:18:23 sam Exp $ * * Authors: * @@ -28,8 +29,6 @@ #include /* ENOMEM */ #include /* free() */ #include /* strerror() */ -#include /* on BSD, uio.h needs types.h */ -#include /* for input.h */ #include #include @@ -41,7 +40,9 @@ #include "mtime.h" #include "plugins.h" -#include "input.h" +#include "stream_control.h" +#include "input_ext-intf.h" + #include "video.h" #include "video_output.h" @@ -100,7 +101,7 @@ int intf_MGACreate( intf_thread_t *p_intf ) p_intf->p_sys = malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) { - intf_ErrMsg("error: %s\n", strerror(ENOMEM)); + intf_ErrMsg("error: %s", strerror(ENOMEM)); return( 1 ); } @@ -109,7 +110,7 @@ int intf_MGACreate( intf_thread_t *p_intf ) p_intf->p_sys->p_display = XOpenDisplay( psz_display ); if( !p_intf->p_sys->p_display ) /* error */ { - intf_ErrMsg("error: can't open display %s\n", psz_display ); + intf_ErrMsg("error: can't open display %s", psz_display ); free( p_intf->p_sys ); return( 1 ); } @@ -119,7 +120,7 @@ int intf_MGACreate( intf_thread_t *p_intf ) * but also command buttons, subtitles and other indicators */ if( X11CreateWindow( p_intf ) ) { - intf_ErrMsg("error: can't create interface window\n" ); + intf_ErrMsg("error: can't create interface window" ); XCloseDisplay( p_intf->p_sys->p_display ); free( p_intf->p_sys ); return( 1 ); @@ -133,7 +134,7 @@ int intf_MGACreate( intf_thread_t *p_intf ) p_intf->p_sys->i_height, NULL, 0, NULL ); if( p_intf->p_vout == NULL ) /* error */ { - intf_ErrMsg("error: can't create video output thread\n" ); + intf_ErrMsg("error: can't create video output thread" ); X11DestroyWindow( p_intf ); XCloseDisplay( p_intf->p_sys->p_display ); free( p_intf->p_sys ); @@ -248,7 +249,7 @@ static int X11CreateWindow( intf_thread_t *p_intf ) &p_intf->p_sys->wm_delete_window, 1 ) ) { /* WM_DELETE_WINDOW is not supported by window manager */ - intf_Msg("error: missing or bad window manager - please exit program kindly.\n"); + intf_Msg("intf error: missing or bad window manager - please exit program kindly."); } /* Creation of a graphic context that doesn't generate a GraphicsExpose event @@ -353,7 +354,7 @@ static void X11ManageWindow( intf_thread_t *p_intf ) /* DestroyNotify event: window has been destroyed */ else if( xevent.type == DestroyNotify ) { - intf_ErrMsg( "vout: window destroyed !\n"); + intf_ErrMsg( "vout: window destroyed !"); } /* Keyboard event */ else if( xevent.type == KeyPress ) @@ -362,7 +363,7 @@ static void X11ManageWindow( intf_thread_t *p_intf ) { if( intf_ProcessKey( p_intf, i_key ) ) { - intf_DbgMsg("unhandled key '%c' (%i)\n", (char) i_key, i_key ); + intf_DbgMsg("unhandled key '%c' (%i)", (char) i_key, i_key ); } } } @@ -396,13 +397,13 @@ static void X11ManageWindow( intf_thread_t *p_intf ) && (xevent.xclient.data.l[0] == p_intf->p_sys->wm_delete_window ) ) { /* FIXME: this never happens :( how to receive wm messages ?? */ - intf_DbgMsg("ClientMessage received\n"); + intf_DbgMsg("ClientMessage received"); } #ifdef DEBUG /* Other event */ else { - intf_DbgMsg("%p -> unhandled event type %d received\n", p_intf, xevent.type ); + intf_DbgMsg("%p -> unhandled event type %d received", p_intf, xevent.type ); } #endif } @@ -415,7 +416,7 @@ static void X11ManageWindow( intf_thread_t *p_intf ) if( b_resized ) { /* If interface window has been resized, change vout size */ - intf_DbgMsg("resizing output window\n"); + intf_DbgMsg("resizing output window"); vlc_mutex_lock( &p_intf->p_vout->change_lock ); p_intf->p_vout->i_width = p_intf->p_sys->i_width; p_intf->p_vout->i_height = p_intf->p_sys->i_height; @@ -426,7 +427,7 @@ static void X11ManageWindow( intf_thread_t *p_intf ) (p_intf->p_vout->i_height != p_intf->p_sys->i_height) ) { /* If video output size has changed, change interface window size */ - intf_DbgMsg("resizing interface window\n"); + intf_DbgMsg("resizing interface window"); p_intf->p_sys->i_width = p_intf->p_vout->i_width; p_intf->p_sys->i_height = p_intf->p_vout->i_height; XResizeWindow( p_intf->p_sys->p_display, p_intf->p_sys->window, @@ -448,7 +449,7 @@ void X11EnableScreenSaver( intf_thread_t *p_intf ) { if( p_intf->p_sys->i_ss_count++ == 0 ) { - intf_Msg("Enabling screen saver\n"); + intf_DbgMsg("intf: enabling screen saver"); XSetScreenSaver( p_intf->p_sys->p_display, p_intf->p_sys->i_ss_timeout, p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking, p_intf->p_sys->i_ss_exposure ); @@ -470,7 +471,7 @@ void X11DisableScreenSaver( intf_thread_t *p_intf ) &p_intf->p_sys->i_ss_exposure ); /* Disable screen saver */ - intf_Msg("Disabling screen saver\n"); + intf_DbgMsg("intf: disabling screen saver"); XSetScreenSaver( p_intf->p_sys->p_display, 0, p_intf->p_sys->i_ss_interval, p_intf->p_sys->i_ss_blanking, p_intf->p_sys->i_ss_exposure );