GUI: Fix scanning text

This commit is contained in:
Jeffrey Pfau 2015-08-30 22:24:59 -07:00
parent 416b1a13f4
commit 20b0c0d2fb
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
#include <stdlib.h>
#define ITERATION_SIZE 5
#define SCANNING_THRESHOLD 15
#define SCANNING_THRESHOLD 20
static void _cleanFiles(struct GUIMenuItemList* currentFiles) {
size_t size = GUIMenuItemListSize(currentFiles);
@ -55,7 +55,7 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath,
struct VDirEntry* de;
while ((de = dir->listNext(dir))) {
++i;
if (i % SCANNING_THRESHOLD == SCANNING_THRESHOLD - 1) {
if (!(i % SCANNING_THRESHOLD)) {
int input = 0;
GUIPollInput(params, &input, 0);
if (input & (1 << GUI_INPUT_CANCEL)) {
@ -63,7 +63,7 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath,
}
params->drawStart();
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath);
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning item %z)", i);
GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning item %lu)", i);
params->drawEnd();
}
const char* name = de->name(de);