diff options
author | twinaphex | 2013-05-27 12:28:34 +0200 |
---|---|---|
committer | twinaphex | 2013-05-27 12:28:34 +0200 |
commit | 9b56b10a186877d32c47be051250ffb307404e78 (patch) | |
tree | a434cfe4f47371dc389d2cf8d9a265c990ebd28e | |
parent | 4e613fda6acf04836881621d40717e1df168c9e2 (diff) | |
download | pcsx_rearmed-9b56b10a186877d32c47be051250ffb307404e78.tar.gz pcsx_rearmed-9b56b10a186877d32c47be051250ffb307404e78.tar.bz2 pcsx_rearmed-9b56b10a186877d32c47be051250ffb307404e78.zip |
(Blackberry Playbook) Fix Blackberry Playbook build - strcasestr is
not implemented
-rw-r--r-- | frontend/libretro.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c index 9be52f5..ec034c2 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -591,6 +591,33 @@ static void extract_directory(char *buf, const char *path, size_t size) } } +#ifdef __QNX__ +/* Blackberry QNX doesn't have strcasestr */ + +/* + * Find the first occurrence of find in s, ignore case. + */ +char * +strcasestr(const char *s, const char*find) +{ + char c, sc; + size_t len; + + if ((c = *find++) != 0) { + c = tolower((unsigned char)c); + len = strlen(find); + do { + do { + if ((sc = *s++) == 0) + return (NULL); + } while ((char)tolower((unsigned char)sc) != c); + } while (strncasecmp(s, find, len) != 0); + s--; + } + return ((char *)s); +} +#endif + bool retro_load_game(const struct retro_game_info *info) { size_t i; |