notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
further unification and refactoring
[libpicofe.git]
/
common
/
config.c
diff --git
a/common/config.c
b/common/config.c
index
961ac92
..
4f80c86
100644
(file)
--- a/
common/config.c
+++ b/
common/config.c
@@
-110,7
+110,7
@@
static void keys_write(FILE *fn, const char *bind_str, int dev_id, const int *bi
int key_count, t, i;
const int *def_binds;
int key_count, t, i;
const int *def_binds;
- key_count = in_get_dev_
bind_count(dev_id
);
+ key_count = in_get_dev_
info(dev_id, IN_INFO_BIND_COUNT
);
def_binds = in_get_dev_def_binds(dev_id);
for (t = 0; t < key_count; t++)
def_binds = in_get_dev_def_binds(dev_id);
for (t = 0; t < key_count; t++)
@@
-311,7
+311,7
@@
next:
sprintf(strbind, "bind%d", t);
if (t == 0) strbind[4] = 0;
sprintf(strbind, "bind%d", t);
if (t == 0) strbind[4] = 0;
- count = in_get_dev_
bind_count(t
);
+ count = in_get_dev_
info(t, IN_INFO_BIND_COUNT
);
keys_write(fn, strbind, t, binds, no_defaults);
}
keys_write(fn, strbind, t, binds, no_defaults);
}
@@
-451,13
+451,13
@@
static int custom_read(menu_entry *me, const char *var, const char *val)
#ifdef __GP2X__
if (strcasecmp(var, "Scaling") != 0) return 0;
if (strcasecmp(val, "OFF") == 0) {
#ifdef __GP2X__
if (strcasecmp(var, "Scaling") != 0) return 0;
if (strcasecmp(val, "OFF") == 0) {
- currentConfig.scaling =
0
;
+ currentConfig.scaling =
EOPT_SCALE_NONE
;
} else if (strcasecmp(val, "hw horizontal") == 0) {
} else if (strcasecmp(val, "hw horizontal") == 0) {
- currentConfig.scaling =
1
;
+ currentConfig.scaling =
EOPT_SCALE_HW_H
;
} else if (strcasecmp(val, "hw horiz. + vert.") == 0) {
} else if (strcasecmp(val, "hw horiz. + vert.") == 0) {
- currentConfig.scaling =
2
;
+ currentConfig.scaling =
EOPT_SCALE_HW_HV
;
} else if (strcasecmp(val, "sw horizontal") == 0) {
} else if (strcasecmp(val, "sw horizontal") == 0) {
- currentConfig.scaling =
3
;
+ currentConfig.scaling =
EOPT_SCALE_SW_H
;
} else
return 0;
return 1;
} else
return 0;
return 1;
@@
-538,6
+538,7
@@
static int custom_read(menu_entry *me, const char *var, const char *val)
return 0;
return 1;
return 0;
return 1;
+#if 0 // TODO rm?
case MA_OPT_CPU_CLOCKS:
#ifdef __GP2X__
if (strcasecmp(var, "GP2X CPU clocks") != 0) return 0;
case MA_OPT_CPU_CLOCKS:
#ifdef __GP2X__
if (strcasecmp(var, "GP2X CPU clocks") != 0) return 0;
@@
-546,6
+547,7
@@
static int custom_read(menu_entry *me, const char *var, const char *val)
#endif
currentConfig.CPUclock = atoi(val);
return 1;
#endif
currentConfig.CPUclock = atoi(val);
return 1;
+#endif
case MA_OPT2_GAMMA:
if (strcasecmp(var, "Gamma correction") != 0) return 0;
case MA_OPT2_GAMMA:
if (strcasecmp(var, "Gamma correction") != 0) return 0;