From a1a9148eb939e44770a52b65b0df7ed7bf2067cf Mon Sep 17 00:00:00 2001 From: pavelyakov Date: Sun, 12 Aug 2018 09:46:12 +0000 Subject: [PATCH] Optimize update list files for event different counts files and disks git-svn-id: svn://kolibrios.org@7314 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 41 ++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 51aa0eb83f..3e1fdca28d 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -132,6 +132,10 @@ byte cmd_free=0; void main() { + byte update = 0; + dword files_count = 0; + dword countPathFile = 0; + dword countPathFile2 = 0; dword files_y = 0; dword countDisk = 0; dword id; @@ -535,12 +539,45 @@ void main() break; default: - ReadDir(19, devbuf, "/"); - IF(countDisk != EBX) + ReadDir(19, devbuf, "/"); // get disk + IF(countDisk != EBX) // if different then { countDisk = EBX; FnProcess(5); } + else // get current files + { + if(two_panels.checked) + { + // this add code update list files + update = 0; + //strcpy(#inactive_path,#path); + ReadDir(19, devbuf, #inactive_path); + IF(countPathFile != EBX) // if different then + { + countPathFile = EBX; + update = 0xFF; + } + + //strcpy(#active_path,#path); + ReadDir(19, devbuf, #active_path); + IF(countPathFile2 != EBX) // if different then + { + countPathFile2 = EBX; + update = 0xFF; + } + IF(update) DrawFilePanels(); + } + ELSE + { + ReadDir(19, devbuf, #path); + IF(countPathFile != EBX) // if different then + { + countPathFile = EBX; + Open_Dir(#path,WITH_REDRAW); + } + } + } }