Files
Anemone3DS/source/main.c
Alex Taber 416135bac4 Add support for shuffle (#3)
This commit adds support for theme shuffles.

To use, pass the first node for the theme into the install_shuffle method and it'll automatically install based on what's selected. 

Note that right now, *all themes in /Themes/ are selected for debug purposes.* This means if you have more than 10 themes in /Themes/ it will not work right now. This will be changed once an interface for selecting themes is done.
2017-07-24 09:10:44 -04:00

50 lines
1.1 KiB
C

#include <3ds.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "theme.h"
#include "splashes.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 *theme_node = malloc(sizeof(node));
theme_node->data = NULL;
theme_node->next = NULL;
prepareThemes(theme_node);
node *splashes_node = malloc(sizeof(node));
splashes_node->data = NULL;
splashes_node->next = NULL;
prepare_splashes(splashes_node);
printf("%li\n", shuffle_install(theme_node));
}
if (kDown & KEY_START)
{
closeThemeArchives();
PTMSYSM_ShutdownAsync(0);
ptmSysmExit();
}
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}
gfxExit();
return 0;
}