notaz.gp2x.de
/
gpsp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
integrate M-HT's neon scalers
[gpsp.git]
/
gp2x
/
gp2x.c
diff --git
a/gp2x/gp2x.c
b/gp2x/gp2x.c
index
8bad610
..
d03a548
100644
(file)
--- a/
gp2x/gp2x.c
+++ b/
gp2x/gp2x.c
@@
-32,14
+32,16
@@
static u32 gpsp_gp2x_dev_audio;
static u32 gpsp_gp2x_dev;
static u32 gpsp_gp2x_dev_audio;
static u32 gpsp_gp2x_dev;
+#ifdef WIZ_BUILD
static u32 gpsp_gp2x_gpiodev;
static u32 gpsp_gp2x_gpiodev;
+#endif
static u32 gp2x_audio_volume = 74/2;
static volatile u16 *gpsp_gp2x_memregs;
static volatile u32 *gpsp_gp2x_memregl;
static u32 gp2x_audio_volume = 74/2;
static volatile u16 *gpsp_gp2x_memregs;
static volatile u32 *gpsp_gp2x_memregl;
-u32 button_plat_mask_to_config[] =
+u32 button_plat_mask_to_config[
PLAT_BUTTON_COUNT
] =
{
GP2X_UP,
GP2X_LEFT,
{
GP2X_UP,
GP2X_LEFT,
@@
-59,7
+61,7
@@
u32 button_plat_mask_to_config[] =
GP2X_VOL_MIDDLE
};
GP2X_VOL_MIDDLE
};
-u32 gamepad_config_map[
16
] =
+u32 gamepad_config_map[
PLAT_BUTTON_COUNT
] =
{
BUTTON_ID_UP, // Up
BUTTON_ID_LEFT, // Left
{
BUTTON_ID_UP, // Up
BUTTON_ID_LEFT, // Left
@@
-242,28
+244,6
@@
u32 wiz_load_gamepak(char *name)
#endif
#endif
-static int get_romdir(char *buff, size_t size)
-{
- FILE *f;
- char *s;
- int r = -1;
-
- f = fopen("romdir.txt", "r");
- if (f == NULL)
- return -1;
-
- s = fgets(buff, size, f);
- if (s)
- {
- r = strlen(s);
- while (r > 0 && isspace(buff[r-1]))
- buff[--r] = 0;
- }
-
- fclose(f);
- return r;
-}
-
void gpsp_plat_init(void)
{
char buff[256];
void gpsp_plat_init(void)
{
char buff[256];
@@
-279,9
+259,6
@@
void gpsp_plat_init(void)
fb_video_init();
#endif
fb_video_init();
#endif
- if (get_romdir(buff, sizeof(buff)) > 0)
- chdir(buff);
-
gp2x_sound_volume(1);
}
gp2x_sound_volume(1);
}
@@
-291,17
+268,6
@@
void gpsp_plat_quit(void)
getcwd(buff1, sizeof(buff1));
chdir(main_path);
getcwd(buff1, sizeof(buff1));
chdir(main_path);
- if (get_romdir(buff2, sizeof(buff2)) >= 0 &&
- strcmp(buff1, buff2) != 0)
- {
- FILE *f = fopen("romdir.txt", "w");
- if (f != NULL)
- {
- printf("writing romdir: %s\n", buff1);
- fprintf(f, "%s", buff1);
- fclose(f);
- }
- }
warm_finish();
#ifdef WIZ_BUILD
warm_finish();
#ifdef WIZ_BUILD