Show progress when parsing titles

This commit is contained in:
d0k3 2017-05-16 16:08:03 +02:00
parent 19bae17b7d
commit 51a262db73
2 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,7 @@
#endif #endif
// GodMode9 version // GodMode9 version
#define VERSION "1.1.4" #define VERSION "1.1.5"
// Maximum payload size (arbitrary value!) // Maximum payload size (arbitrary value!)
#define SELF_MAX_SIZE (320 * 1024) // 320kB #define SELF_MAX_SIZE (320 * 1024) // 320kB

View File

@ -1,11 +1,14 @@
#include "fsgame.h" #include "fsgame.h"
#include "gameutil.h" #include "gameutil.h"
#include "ui.h"
void SetDirGoodNames(DirStruct* contents) { void SetDirGoodNames(DirStruct* contents) {
char goodname[256]; char goodname[256];
ShowProgress(0, 0, "");
for (u32 s = 0; s < contents->n_entries; s++) { for (u32 s = 0; s < contents->n_entries; s++) {
DirEntry* entry = &(contents->entry[s]); DirEntry* entry = &(contents->entry[s]);
u32 plen = strnlen(entry->path, 256); u32 plen = strnlen(entry->path, 256);
if (!ShowProgress(s+1, contents->n_entries, entry->path)) break;
if ((GetGoodName(goodname, entry->path, false) != 0) || if ((GetGoodName(goodname, entry->path, false) != 0) ||
(plen + 1 + strnlen(goodname, 256) + 1 > 256)) (plen + 1 + strnlen(goodname, 256) + 1 > 256))
continue; continue;