mirror of
https://github.com/MiSTer-devel/Main_MiSTer.git
synced 2026-05-24 03:04:13 +00:00
Rewrite file list lookahead scrolling (#1169)
This commit is contained in:
6
menu.cpp
6
menu.cpp
@@ -7726,9 +7726,9 @@ void PrintDirectory(int expand)
|
||||
if (expand)
|
||||
{
|
||||
int k = flist_iFirstEntry() + OsdGetSize() - 1;
|
||||
if (flist_nDirEntries() && k == flist_iSelectedEntry() && k <= flist_nDirEntries()
|
||||
if (flist_nDirEntries() && k == flist_iSelectedEntry() && k < flist_nDirEntries()
|
||||
&& strlen(flist_DirItem(k)->altname) > 28 && !(!cfg.rbf_hide_datecode && flist_DirItem(k)->datecode[0])
|
||||
&& flist_DirItem(k)->de.d_type != DT_DIR)
|
||||
&& flist_DirItem(k)->de.d_type != DT_DIR && k < flist_nDirEntries() - 1)
|
||||
{
|
||||
//make room for last expanded line
|
||||
flist_iFirstEntryInc();
|
||||
@@ -7831,7 +7831,7 @@ void PrintDirectory(int expand)
|
||||
OsdWriteOffset(i, s, sel, 0, 0, leftchar);
|
||||
i++;
|
||||
|
||||
if (sel && len2)
|
||||
if (sel && len2 && i < OsdGetSize())
|
||||
{
|
||||
len = strlen(flist_DirItem(k)->altname);
|
||||
strcpy(s+1, flist_DirItem(k)->altname + len - len2);
|
||||
|
||||
Reference in New Issue
Block a user