\r
#include <stdio.h>\r
#include <stdlib.h>\r
-#include <ctype.h> // tolower\r
#ifndef NO_SYNC\r
#include <unistd.h>\r
#endif\r
static int movie_size = 0;\r
\r
\r
-// utilities\r
+/* don't use tolower() for easy old glibc binary compatibility */\r
static void strlwr_(char *string)\r
{\r
char *p;\r
for (p = string; *p; p++)\r
- *p = (char)tolower(*p);\r
+ if ('A' <= *p && *p <= 'Z')\r
+ *p += 'a' - 'A';\r
}\r
\r
static int try_rfn_cut(char *fname)\r
}\r
}\r
\r
+ plat_validate_config();\r
+\r
// some sanity checks\r
- if (currentConfig.CPUclock < 10 || currentConfig.CPUclock > 4096) currentConfig.CPUclock = 200;\r
#ifdef PSP\r
+ /* TODO: mv to plat_validate_config() */\r
+ if (currentConfig.CPUclock < 10 || currentConfig.CPUclock > 4096) currentConfig.CPUclock = 200;\r
if (currentConfig.gamma < -4 || currentConfig.gamma > 16) currentConfig.gamma = 0;\r
if (currentConfig.gamma2 < 0 || currentConfig.gamma2 > 2) currentConfig.gamma2 = 0;\r
-#else\r
- if (currentConfig.gamma < 10 || currentConfig.gamma > 300) currentConfig.gamma = 100;\r
#endif\r
- if (currentConfig.volume < 0 || currentConfig.volume > 99) currentConfig.volume = 50;\r
+ if (currentConfig.volume < 0 || currentConfig.volume > 99)\r
+ currentConfig.volume = 50;\r
+\r
+ if (ret == 0)\r
+ config_slot_current = config_slot;\r
\r
- if (ret == 0) config_slot_current = config_slot;\r
return (ret == 0);\r
}\r
\r