\r
#include "minimal.h"\r
#include "usbjoy.h"\r
-#include "asmutils.h"\r
+#include "../arm/asmutils.h"\r
#include "menu.h"\r
-#include "main.h"\r
-#include "fonts.h"\r
+#include "../common/main.h"\r
+#include "../libpicofe/fonts.h"\r
#include "gp2x.h"\r
\r
#include "../../input.h"\r
#include "../../state.h"\r
#include "../../palette.h"\r
-#include "readpng.h"\r
+#include "../libpicofe/readpng.h"\r
\r
#ifndef _DIRENT_HAVE_D_TYPE\r
-#error "need d_type for file browser\r
+#error need d_type for file browser\r
#endif\r
\r
extern int GP2X_PORT_REV;\r
\r
static int scandir_cmp(const void *p1, const void *p2)\r
{\r
- struct dirent **d1 = (struct dirent **)p1, **d2 = (struct dirent **)p2;\r
+ const struct dirent **d1 = (const struct dirent **)p1;\r
+ const struct dirent **d2 = (const struct dirent **)p2;\r
if ((*d1)->d_type == (*d2)->d_type) return alphasort(d1, d2);\r
if ((*d1)->d_type == DT_DIR) return -1; // put before\r
if ((*d2)->d_type == DT_DIR) return 1;\r
}\r
\r
static char *filter_exts[] = {\r
- ".gpe", ".png", "ck.o", ".txt"\r
+ ".gpe", ".png", "ck.o", ".txt", ".srm"\r
};\r
\r
static int scandir_filter(const struct dirent *ent)\r
fname = p+1;\r
}\r
\r
- n = scandir(curr_path, &namelist, scandir_filter, scandir_cmp);\r
+ n = scandir(curr_path, &namelist, scandir_filter, (void *)scandir_cmp);\r
if (n < 0) {\r
// try root\r
- n = scandir("/", &namelist, scandir_filter, scandir_cmp);\r
+ n = scandir("/", &namelist, scandir_filter, (void *)scandir_cmp);\r
if (n < 0) {\r
// oops, we failed\r
printf("dir: %s\n", curr_path);\r
else\r
{\r
memset32((int *)menu_bg, 0, 320*240*2/4);\r
- readpng(menu_bg, "background.png");\r
+ readpng(menu_bg, "background.png", READPNG_BG, 320, 240);\r
}\r
}\r
\r