Files
Anemone3DS/source/main.c
Alex Taber 217846bca4 Initial basic functionality commit
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
2017-07-20 17:19:07 -04:00

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;
}