1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Giacomelli 2010-12-14 21:33:45 +00:00
parent ee4ea4266b
commit 990cbf302e
9 changed files with 131 additions and 64 deletions

View file

@ -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;