Added splash support (#2)
Combination of quality of life improvements, bugfixes and splash support: * unzip_file now works with any file, not just a theme * Made linked list nodes generic so they work for both splashes and themes * Fixed bug in previous commit with deleting the zip file once it was unzipped * All zips in /Splashes/ are now extracted, as with /Themes/ * Splashes are all added to the linked list properly * Splashes can be installed given a path, but only works on Luma. Undecided as to whether or not I'm going to change this. TODO: * Automatically change the luma configuration to enable splash screens * MAYBE add support for other CFWs (if there's an interest). Maybe set a folder to extract splashes to in some kind of user settings?
This commit is contained in:
@@ -117,6 +117,17 @@ u16 *strucat(u16 *destination, const u16 *source)
|
||||
return destination;
|
||||
}
|
||||
|
||||
u16 *struacat(u16 *destination, const char *source)
|
||||
{
|
||||
ssize_t len = strulen(destination);
|
||||
for (u16 i = len; i < strlen(source) + len; i++)
|
||||
{
|
||||
destination[i] = source[i - len];
|
||||
}
|
||||
destination[strlen(source) + len] = 0;
|
||||
return destination;
|
||||
}
|
||||
|
||||
// Prints a u16* for debug purposes
|
||||
// Must be properly null-terminated
|
||||
void printu(u16 *input)
|
||||
@@ -124,7 +135,7 @@ void printu(u16 *input)
|
||||
ssize_t in_len = strulen(input);
|
||||
ssize_t buf_len = in_len + 1; // Plus 1 for proper null termination
|
||||
wchar_t *buf = calloc(buf_len, sizeof(wchar_t));
|
||||
for (int i = 0; i < buf_len; i++) buf[i] = input[i];
|
||||
for (u16 i = 0; i < buf_len; i++) buf[i] = input[i];
|
||||
printf("%ls\n", buf);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user