diff src/rcfile.c @ 413:9e521adbf312

Add two new options to control image read buffer at runtime. They are available in Preferences > Advanced > Image loading and caching. Default read buffer size was set to 4096 instead of 512. These options are saved to rc file.
author zas_
date Fri, 18 Apr 2008 22:15:01 +0000
parents 2649a28d31b6
children 5ddcf93278c7
line wrap: on
line diff
--- a/src/rcfile.c	Fri Apr 18 21:53:33 2008 +0000
+++ b/src/rcfile.c	Fri Apr 18 22:15:01 2008 +0000
@@ -397,7 +397,8 @@
 	WRITE_BOOL(image.exif_rotate_enable);
 	WRITE_BOOL(image.use_custom_border_color);
 	WRITE_COLOR(image.border_color);
-
+	WRITE_INT(image.read_buffer_size);
+	WRITE_INT(image.idle_read_loop_count);
 
 	WRITE_SUBTITLE("Thumbnails Options");
 
@@ -666,7 +667,9 @@
 		READ_BOOL(image.exif_rotate_enable);
 		READ_BOOL(image.use_custom_border_color);
 		READ_COLOR(image.border_color);
-
+		READ_INT_CLAMP(image.read_buffer_size, IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX);
+		READ_INT_CLAMP(image.idle_read_loop_count, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX);
+		
 
 		/* thumbnails options */
 		READ_INT_CLAMP(thumbnails.max_width, 16, 512);