Add QR customfolder support

This commit is contained in:
esuo1198
2023-09-24 01:08:12 +09:00
parent 92c3e6aa81
commit db6a0c061b
10 changed files with 97 additions and 34 deletions
+15
View File
@@ -71,6 +71,21 @@ readConfigString (toml_table_t *table, const char *key, const char *notFoundValu
return data.u.s;
}
std::vector<int64_t>
readConfigIntArray (toml_table_t *table, const char *key, std::vector<int64_t> notFoundValue) {
toml_array_t *array = toml_array_in (table, key);
if (!array) return notFoundValue;
std::vector<int64_t> datas;
for (int i = 0; ; i++) {
toml_datum_t data = toml_int_at (array, i);
if (!data.ok) break;
datas.push_back (data.u.i);
}
return datas;
}
void
printColour (int colour, const char *format, ...) {
va_list args;