changeset 8276:f9c18cda60b2

fix(?) cache
author pontscho
date Mon, 25 Nov 2002 16:22:58 +0000
parents 1fb6b78d62d6
children db673d118d3f
files Gui/cfg.c Gui/mplayer/gtk/opts.c
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/cfg.c	Mon Nov 25 14:17:15 2002 +0000
+++ b/Gui/cfg.c	Mon Nov 25 16:22:58 2002 +0000
@@ -107,7 +107,7 @@
  { "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 },
--- a/Gui/mplayer/gtk/opts.c	Mon Nov 25 14:17:15 2002 +0000
+++ b/Gui/mplayer/gtk/opts.c	Mon Nov 25 16:22:58 2002 +0000
@@ -311,10 +311,10 @@
  }
 
  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 @@
 	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;