aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authortwinaphex2013-05-27 12:28:34 +0200
committernotaz2013-06-04 23:35:45 +0300
commit41294f4d869ce943b6144a1dd469105681d32ec1 (patch)
treea434cfe4f47371dc389d2cf8d9a265c990ebd28e /frontend
parent354329faa304cfc2da1ef2f4ce9ef5e06c7d3489 (diff)
downloadpcsx_rearmed-41294f4d869ce943b6144a1dd469105681d32ec1.tar.gz
pcsx_rearmed-41294f4d869ce943b6144a1dd469105681d32ec1.tar.bz2
pcsx_rearmed-41294f4d869ce943b6144a1dd469105681d32ec1.zip
(Blackberry Playbook) Fix Blackberry Playbook build - strcasestr is
not implemented
Diffstat (limited to 'frontend')
-rw-r--r--frontend/libretro.c27
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;