summaryrefslogtreecommitdiff
path: root/source/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/gui.c')
-rw-r--r--source/gui.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/gui.c b/source/gui.c
index 375fc74..c3b402d 100644
--- a/source/gui.c
+++ b/source/gui.c
@@ -54,12 +54,11 @@ typedef struct
{
char name[FSEL_FILENAME_LEN+1];
int is_dir;
- int size;
} FSEL_File;
static FSEL_File fsel[FSEL_MAX_FILES];
-char last_dir[FILENAME_MAX] = "sdmc:/";
+char last_dir[FILENAME_MAX] = "sdmc:/SPECTRUM/";
static void CheckPath(char *path)
@@ -185,7 +184,6 @@ static int LoadDir(const char *path, const char *filter)
{
strcpy(fsel[no].name, "..");
fsel[no].is_dir = TRUE;
- fsel[no].size = 0;
no++;
}
@@ -199,7 +197,6 @@ static int LoadDir(const char *path, const char *filter)
{
strcpy(fsel[no].name,ent->d_name);
fsel[no].is_dir = ent->d_type & DT_DIR;
- fsel[no].size = 0;
no++;
}
}
@@ -215,6 +212,21 @@ static int LoadDir(const char *path, const char *filter)
/* ---------------------------------------- PUBLIC INTERFACES
*/
+void GUI_Init(void)
+{
+ DIR *dir;
+
+ if ((dir = opendir(last_dir)))
+ {
+ closedir(dir);
+ }
+ else
+ {
+ strcpy(last_dir, "sdmc:/");
+ }
+}
+
+
int GUI_Menu(const char *opts[])
{
int x,y;