X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/c017be3c0b41865d049c8f09d09b7026fd848f13..e6994d8d0ef3a5ba6e7d7258e98b40d18883b20e:/src/mapcache.c diff --git a/src/mapcache.c b/src/mapcache.c index 5485f178..b6a2c2b3 100644 --- a/src/mapcache.c +++ b/src/mapcache.c @@ -42,7 +42,7 @@ static List *queue_tail = NULL; static int queue_count = 0; static guint32 queue_size = 0; -static guint32 max_queue_size = VIK_CONFIG_MAPCACHE_SIZE; +static guint32 max_queue_size = VIK_CONFIG_MAPCACHE_SIZE * 1024 * 1024; static GHashTable *cache = NULL; @@ -54,17 +54,17 @@ static GMutex *mc_mutex = NULL; static VikLayerParamScale params_scales[] = { /* min, max, step, digits (decimal places) */ - { 1, 300, 1, 0 }, + { 1, 1024, 1, 0 }, }; static VikLayerParam prefs[] = { - { VIKING_PREFERENCES_NAMESPACE "mapcache_size", VIK_LAYER_PARAM_UINT, VIK_LAYER_GROUP_NONE, N_("Mapcache memory size (MB):"), VIK_LAYER_WIDGET_HSCALE, params_scales, NULL }, + { VIKING_PREFERENCES_NAMESPACE "mapcache_size", VIK_LAYER_PARAM_UINT, VIK_LAYER_GROUP_NONE, N_("Map cache memory size (MB):"), VIK_LAYER_WIDGET_HSCALE, params_scales, NULL, NULL }, }; void a_mapcache_init () { VikLayerParamData tmp; - tmp.u = VIK_CONFIG_MAPCACHE_SIZE / 1024 / 1024; + tmp.u = VIK_CONFIG_MAPCACHE_SIZE; a_preferences_register(prefs, tmp, VIKING_PREFERENCES_GROUP_KEY); mc_mutex = g_mutex_new();