Commit 7c26f655 authored by Eric Petit's avatar Eric Petit

modules/gui/beos/* : fixed the screenshot format selection I broke lately

parent fd8929f6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* beos.cpp : BeOS plugin for vlc * beos.cpp : BeOS plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: BeOS.cpp,v 1.10 2003/05/07 14:49:19 titer Exp $ * $Id: BeOS.cpp,v 1.11 2003/06/03 12:06:29 titer Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -46,10 +46,12 @@ void E_(CloseVideo) ( vlc_object_t * ); ...@@ -46,10 +46,12 @@ void E_(CloseVideo) ( vlc_object_t * );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
static char * ppsz_screenshotformat[] = { "TGA", "PPM", "PNG", "JPEG", "BMP", NULL };
vlc_module_begin(); vlc_module_begin();
add_bool( "beos-dvdmenus", 0, NULL, "Use DVD Menus", "", VLC_TRUE ); add_bool( "beos-dvdmenus", 0, NULL, "Use DVD Menus", "", VLC_TRUE );
add_string( "beos-screenshotpath", "/boot/home/", NULL, "Screenshot Path", "", VLC_TRUE ); add_string( "beos-screenshotpath", "/boot/home/", NULL, "Screenshot Path", "", VLC_TRUE );
add_string( "beos-screenshotformat", NULL, NULL, "Screenshot Format", "", VLC_TRUE ); add_string_from_list( "beos-screenshotformat", "PNG", ppsz_screenshotformat, NULL, "Screenshot Format", "", VLC_TRUE );
set_description( _("BeOS standard API interface") ); set_description( _("BeOS standard API interface") );
add_submodule(); add_submodule();
set_capability( "interface", 100 ); set_capability( "interface", 100 );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method * vout_beos.cpp: beos video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: VideoOutput.cpp,v 1.19 2003/05/08 10:40:31 titer Exp $ * $Id: VideoOutput.cpp,v 1.20 2003/06/03 12:06:29 titer Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -383,12 +383,23 @@ VideoWindow::MessageReceived( BMessage *p_message ) ...@@ -383,12 +383,23 @@ VideoWindow::MessageReceived( BMessage *p_message )
dst += dstBpr; dst += dstBpr;
src += srcBpr; src += srcBpr;
} }
char* path = config_GetPsz( p_vout, "beos-screenshotpath" ); char * path = config_GetPsz( p_vout, "beos-screenshotpath" );
if ( !path ) if ( !path )
path = strdup( DEFAULT_SCREEN_SHOT_PATH ); path = strdup( DEFAULT_SCREEN_SHOT_PATH );
/* TODO: handle the format */
/* config_GetPsz( p_vout, "beos-screenshotformat" ); */ /* FIXME - we should check which translators are
actually available */
char * psz_format = config_GetPsz( p_vout, "beos-screenshotformat" );
int32 format = DEFAULT_SCREEN_SHOT_FORMAT; int32 format = DEFAULT_SCREEN_SHOT_FORMAT;
if( !strcmp( psz_format, "TGA" ) )
format = 'TGA ';
else if( !strcmp( psz_format, "PPM" ) )
format = 'PPM ';
else if( !strcmp( psz_format, "JPEG" ) )
format = 'JPEG';
else if( !strcmp( psz_format, "BMP" ) )
format = 'BMP ';
_SaveScreenShot( temp, path, format ); _SaveScreenShot( temp, path, format );
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment