fix(?) cache

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8277 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-11-25 16:22:58 +00:00
parent 6dc1b1fd0c
commit 498b4bc3df
2 changed files with 5 additions and 5 deletions

View File

@ -107,7 +107,7 @@ static config_t gui_opts[] =
{ "font_autoscale",&subtitle_autoscale,CONF_TYPE_INT,CONF_RANGE,0,3,NULL },
#endif
{ "cache",&stream_cache_size,CONF_TYPE_INT,CONF_RANGE,0,65535,NULL },
{ "cache",&stream_cache_size,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL },
{ "load_fullscreen",&gtkLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL },
{ "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL },

View File

@ -311,10 +311,10 @@ void ShowPreferences( void )
}
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 );
if ( stream_cache_size )
if ( stream_cache_size > 0 )
{
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),1 );
gtk_adjustment_set_value( SBCacheadj,stream_cache_size );
gtk_adjustment_set_value( SBCacheadj,(float)stream_cache_size );
} else gtk_widget_set_sensitive( SBCache,FALSE );
// -- disables
@ -479,8 +479,8 @@ void prButton( GtkButton * button,gpointer user_data )
gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) );
gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL );
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) stream_cache_size=SBCacheadj->value;
else stream_cache_size=0;
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) stream_cache_size=(int)SBCacheadj->value;
else stream_cache_size=-1;
{
int i;