2014-10-26 18:47:14 -07:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <3ds.h>
|
|
|
|
|
|
|
|
#include "output.h"
|
2014-10-30 14:55:01 -07:00
|
|
|
#include "test_fs.h"
|
|
|
|
|
|
|
|
static int testCounter = 0;
|
|
|
|
static void (*tests[]) (void) = {
|
|
|
|
FS_TestAll
|
|
|
|
};
|
2014-10-26 18:47:14 -07:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
srvInit();
|
|
|
|
aptInit();
|
|
|
|
hidInit(NULL);
|
|
|
|
gfxInit();
|
|
|
|
gfxSet3D(false);
|
|
|
|
|
2014-10-31 22:20:21 -07:00
|
|
|
clearScreens();
|
|
|
|
print(GFX_TOP, "Press A to begin...\n");
|
2014-10-26 18:47:14 -07:00
|
|
|
|
|
|
|
APP_STATUS status;
|
2014-10-30 14:55:01 -07:00
|
|
|
while ((status = aptGetStatus()) != APP_EXITING) {
|
|
|
|
if (status == APP_RUNNING) {
|
2014-10-31 22:20:21 -07:00
|
|
|
drawFrames();
|
2014-10-26 18:47:14 -07:00
|
|
|
|
|
|
|
hidScanInput();
|
|
|
|
if (hidKeysDown() & KEY_B) {
|
|
|
|
break;
|
|
|
|
} else if (hidKeysDown() & KEY_A) {
|
2014-10-31 22:20:21 -07:00
|
|
|
clearScreen(GFX_TOP);
|
2014-10-30 14:55:01 -07:00
|
|
|
|
|
|
|
if (testCounter < (sizeof(tests) / sizeof(tests[0]))) {
|
|
|
|
tests[testCounter]();
|
|
|
|
testCounter++;
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-10-31 22:20:21 -07:00
|
|
|
print(GFX_TOP, "\n");
|
|
|
|
print(GFX_TOP, "Press A to continue...\n");
|
2014-10-26 18:47:14 -07:00
|
|
|
}
|
2014-10-30 00:42:44 -07:00
|
|
|
|
2014-10-30 14:55:01 -07:00
|
|
|
} else if (status == APP_SUSPENDING) {
|
2014-10-26 18:47:14 -07:00
|
|
|
aptReturnToMenu();
|
2014-10-30 14:55:01 -07:00
|
|
|
} else if (status == APP_SLEEPMODE) {
|
2014-10-26 18:47:14 -07:00
|
|
|
aptWaitStatusEvent();
|
2014-10-30 00:42:44 -07:00
|
|
|
break;
|
2014-10-26 18:47:14 -07:00
|
|
|
}
|
2014-10-30 00:42:44 -07:00
|
|
|
|
2014-10-26 18:47:14 -07:00
|
|
|
gspWaitForEvent(GSPEVENT_VBlank0, false);
|
|
|
|
}
|
|
|
|
|
2014-10-31 22:20:21 -07:00
|
|
|
clearScreens();
|
2014-10-26 18:47:14 -07:00
|
|
|
gfxExit();
|
|
|
|
hidExit();
|
|
|
|
aptExit();
|
|
|
|
srvExit();
|
|
|
|
return 0;
|
|
|
|
}
|