summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-10-31 20:57:49 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-11-02 07:19:36 -0400
commit9da3044cf7b16213e91a94f759f8b7e00e35ac09 (patch)
treec0162c63c2ff84b6fb422727f80bdf8992a355fa
parentca908d6336f1ab5a089b8f53cdc1dbe5e5a36d2e (diff)
downloadrockbox-9da3044cf7b16213e91a94f759f8b7e00e35ac09.tar.gz
rockbox-9da3044cf7b16213e91a94f759f8b7e00e35ac09.zip
Database: Remove firstpos/pos_history
From what I can tell, this is unused historical baggage that has no effect whatsoever these days. Change-Id: I1b6fed64e7bf5cc4db4ec028617c818c59d81324
-rw-r--r--apps/tagtree.c2
-rw-r--r--apps/tree.c6
-rw-r--r--apps/tree.h4
3 files changed, 1 insertions, 11 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 19353cabbd..5d6c3cf8f1 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -1847,7 +1847,6 @@ int tagtree_enter(struct tree_context* c)
1847 selected_item_history[c->dirlevel]=c->selected_item; 1847 selected_item_history[c->dirlevel]=c->selected_item;
1848 table_history[c->dirlevel] = c->currtable; 1848 table_history[c->dirlevel] = c->currtable;
1849 extra_history[c->dirlevel] = c->currextra; 1849 extra_history[c->dirlevel] = c->currextra;
1850 c->pos_history[c->dirlevel] = c->firstpos;
1851 c->dirlevel++; 1850 c->dirlevel++;
1852 1851
1853 /* lock buflib for possible I/O to protect dptr */ 1852 /* lock buflib for possible I/O to protect dptr */
@@ -1995,7 +1994,6 @@ void tagtree_exit(struct tree_context* c)
1995 gui_synclist_select_item(&tree_lists, c->selected_item); 1994 gui_synclist_select_item(&tree_lists, c->selected_item);
1996 c->currtable = table_history[c->dirlevel]; 1995 c->currtable = table_history[c->dirlevel];
1997 c->currextra = extra_history[c->dirlevel]; 1996 c->currextra = extra_history[c->dirlevel];
1998 c->firstpos = c->pos_history[c->dirlevel];
1999} 1997}
2000 1998
2001int tagtree_get_filename(struct tree_context* c, char *buf, int buflen) 1999int tagtree_get_filename(struct tree_context* c, char *buf, int buflen)
diff --git a/apps/tree.c b/apps/tree.c
index 6e9ca106c0..cb7c033b6f 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -89,7 +89,7 @@ static struct tree_context tc;
89char lastfile[MAX_PATH]; 89char lastfile[MAX_PATH];
90static char lastdir[MAX_PATH]; 90static char lastdir[MAX_PATH];
91#ifdef HAVE_TAGCACHE 91#ifdef HAVE_TAGCACHE
92static int lasttable, lastextra, lastfirstpos; 92static int lasttable, lastextra;
93#endif 93#endif
94 94
95static bool reload_dir = false; 95static bool reload_dir = false;
@@ -364,7 +364,6 @@ static int update_dir(void)
364 if (id3db) { 364 if (id3db) {
365 if (tc.currtable != lasttable || 365 if (tc.currtable != lasttable ||
366 tc.currextra != lastextra || 366 tc.currextra != lastextra ||
367 tc.firstpos != lastfirstpos ||
368 reload_dir) 367 reload_dir)
369 { 368 {
370 if (tagtree_load(&tc) < 0) 369 if (tagtree_load(&tc) < 0)
@@ -372,7 +371,6 @@ static int update_dir(void)
372 371
373 lasttable = tc.currtable; 372 lasttable = tc.currtable;
374 lastextra = tc.currextra; 373 lastextra = tc.currextra;
375 lastfirstpos = tc.firstpos;
376 changed = true; 374 changed = true;
377 } 375 }
378 } 376 }
@@ -636,10 +634,8 @@ static int dirbrowse(void)
636 if (tc.selected_item < 0) 634 if (tc.selected_item < 0)
637 tc.selected_item = 0; 635 tc.selected_item = 0;
638#ifdef HAVE_TAGCACHE 636#ifdef HAVE_TAGCACHE
639 tc.firstpos = 0;
640 lasttable = -1; 637 lasttable = -1;
641 lastextra = -1; 638 lastextra = -1;
642 lastfirstpos = 0;
643#endif 639#endif
644 640
645 start_wps = false; 641 start_wps = false;
diff --git a/apps/tree.h b/apps/tree.h
index e132fcc191..56fdb2e0bb 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -81,10 +81,6 @@ struct tree_context {
81 * (used when we want to return back to a previouws directory)*/ 81 * (used when we want to return back to a previouws directory)*/
82 int selected_item_history[MAX_DIR_LEVELS]; 82 int selected_item_history[MAX_DIR_LEVELS];
83 83
84 int firstpos; /* which dir entry is on first
85 position in dir buffer */
86 int pos_history[MAX_DIR_LEVELS];
87
88 int *dirfilter; /* file use */ 84 int *dirfilter; /* file use */
89 int filesindir; /* The number of files in the dircache */ 85 int filesindir; /* The number of files in the dircache */
90 int dirsindir; /* file use */ 86 int dirsindir; /* file use */