if( config_GetInt( p_vlc, "daemon" ) )
{
#if HAVE_DAEMON
- if( daemon( 0, 0) != 0 )
+ if( daemon( 1, 0) != 0 )
{
msg_Err( p_vlc, "Unable to fork vlc to daemon mode" );
b_exit = VLC_TRUE;
}
/*
- * Allways load the hotkeys interface if it exists
+ * Always load the hotkeys interface if it exists
*/
VLC_AddIntf( 0, "hotkeys,none", VLC_FALSE, VLC_FALSE );
+ /*
+ * If needed, load the Xscreensaver interface
+ * Currently, only for X
+ */
+#ifdef HAVE_X11_XLIB_H
+ if( config_GetInt( p_vlc, "disable-screensaver" ) == 1 )
+ {
+ VLC_AddIntf( 0, "screensaver", VLC_FALSE, VLC_FALSE );
+ }
+#endif
+
/*
* FIXME: kludge to use a p_vlc-local variable for the Mozilla plugin
*/
var_Create( p_vlc, "drawableh", VLC_VAR_INTEGER );
var_Create( p_vlc, "drawableportx", VLC_VAR_INTEGER );
var_Create( p_vlc, "drawableporty", VLC_VAR_INTEGER );
- var_Create( p_vlc, "width", VLC_VAR_INTEGER );
- var_Create( p_vlc, "height", VLC_VAR_INTEGER );
/*
* Get input filenames given as commandline arguments
AllocConsole();
+ freopen( "CONOUT$", "w", stderr );
+ freopen( "CONIN$", "r", stdin );
+
if( (f_help = fopen( "vlc-help.txt", "wt" )) )
{
fclose( f_help );
else freopen( "CONOUT$", "w", stdout );
- freopen( "CONOUT$", "w", stderr );
- freopen( "CONIN$", "r", stdin );
-
# endif
}
#endif
while( vlc_iconv( libvlc.from_locale, &iptr, &inb, &optr, &outb )
== (size_t)-1 )
{
- *optr++ = '?';
- *iptr++;
+ *optr = '?';
+ optr++;
+ iptr++;
vlc_iconv( libvlc.from_locale, NULL, NULL, NULL, NULL );
}
vlc_mutex_unlock( &libvlc.from_locale_lock );
while( vlc_iconv( libvlc.to_locale, &iptr, &inb, &optr, &outb )
== (size_t)-1 )
{
- *optr++ = '?'; /* should not happen, and yes, it sucks */
- *iptr++;
+ *optr = '?'; /* should not happen, and yes, it sucks */
+ optr++;
+ iptr++;
vlc_iconv( libvlc.to_locale, NULL, NULL, NULL, NULL );
}
vlc_mutex_unlock( &libvlc.to_locale_lock );