From 990cbf302eb04f80174c50040492fa7db6fbad6d Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 14 Dec 2010 21:33:45 +0000 Subject: Commit FS#11799 by Alexander Meshcheryakov. Improves the text viewer plugin to write to the disk less often, and correct several minor bugs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28833 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/text_viewer/tv_preferences.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/plugins/text_viewer/tv_preferences.c') diff --git a/apps/plugins/text_viewer/tv_preferences.c b/apps/plugins/text_viewer/tv_preferences.c index 5e6677ea58..6d5c1127fc 100644 --- a/apps/plugins/text_viewer/tv_preferences.c +++ b/apps/plugins/text_viewer/tv_preferences.c @@ -28,6 +28,8 @@ static struct tv_preferences prefs; /* read-only preferences pointer, for access by other files */ const struct tv_preferences * const preferences = &prefs; +bool preferences_changed = false; + static int listner_count = 0; #define TV_MAX_LISTNERS 5 @@ -91,6 +93,11 @@ void tv_copy_preferences(struct tv_preferences *copy_prefs) rb->memcpy(copy_prefs, preferences, sizeof(struct tv_preferences)); } +bool tv_compare_preferences(struct tv_preferences *copy_prefs) +{ + return rb->memcmp(copy_prefs, preferences, sizeof(struct tv_preferences)) != 0; +} + void tv_set_default_preferences(struct tv_preferences *p) { p->word_mode = WM_WRAP; -- cgit v1.2.3