What this commit adds: * Ability to apply a theme, given a folder * Extract all .zip files in /Themes/ into a relevant folder * Get all theme metadata from info.smdh * Proper unicode handling What's still needed for initial release: * Theme shuffling * GUI
51 lines
883 B
C
51 lines
883 B
C
#include <3ds.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "theme.h"
|
|
#include "unicode.h"
|
|
|
|
int main(void)
|
|
{
|
|
gfxInitDefault();
|
|
cfguInit();
|
|
srvInit();
|
|
hidInit();
|
|
fsInit();
|
|
ptmSysmInit();
|
|
consoleInit(GFX_TOP, NULL);
|
|
|
|
while (aptMainLoop())
|
|
{
|
|
hidScanInput();
|
|
u32 kDown = hidKeysDown();
|
|
|
|
if (kDown & KEY_A) {
|
|
node *first_node = malloc(sizeof(node));
|
|
first_node->data = NULL;
|
|
first_node->next = NULL;
|
|
prepareThemes(first_node);
|
|
node *current_node = first_node->next;
|
|
while (current_node != NULL)
|
|
{
|
|
printu(current_node->data->title);
|
|
current_node = current_node->next;
|
|
}
|
|
puts("Done!");
|
|
}
|
|
if (kDown & KEY_START)
|
|
{
|
|
closeThemeArchives();
|
|
PTMSYSM_ShutdownAsync(0);
|
|
ptmSysmExit();
|
|
}
|
|
gfxFlushBuffers();
|
|
gfxSwapBuffers();
|
|
gspWaitForVBlank();
|
|
}
|
|
|
|
gfxExit();
|
|
return 0;
|
|
}
|