aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorneonloop2021-08-27 00:30:47 +0000
committerneonloop2021-08-27 00:30:47 +0000
commit3f527c7426cbbdbd04962545b801c944434a0377 (patch)
treef9ba8499e54dcafb2fea259522fd4ff1b9f66f2b /util.h
parent0060a16ad707c1d6f2013947821ff55e377ceb92 (diff)
downloadpicoarch-3f527c7426cbbdbd04962545b801c944434a0377.tar.gz
picoarch-3f527c7426cbbdbd04962545b801c944434a0377.tar.bz2
picoarch-3f527c7426cbbdbd04962545b801c944434a0377.zip
Adds a standalone multi-emulator mode
When starting without arguments, can select a core in the current directory and some content (a game). Allows loading a different game from the in-game menu.
Diffstat (limited to 'util.h')
-rw-r--r--util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.h b/util.h
index 641165b..95c73cf 100644
--- a/util.h
+++ b/util.h
@@ -9,12 +9,20 @@
#define array_size(x) (sizeof(x) / sizeof(x[0]))
+struct string_list {
+ const char **list;
+ char *source;
+};
+
static inline bool has_suffix_i(const char *str, const char *suffix) {
const char *p = strrchr(str, suffix[0]);
if (!p) p = str;
return !strcasecmp(p, suffix);
}
+struct string_list *string_split(const char *string, char delim);
+void string_list_free(struct string_list *list);
+
void string_truncate(char *string, size_t max_len);
void string_wrap(char *string, size_t max_len, size_t max_lines);