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
This commit is contained in:
50
source/main.c
Normal file
50
source/main.c
Normal file
@@ -0,0 +1,50 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user