hwtests/source/main.c

60 lines
1023 B
C
Raw Normal View History

2014-10-26 18:47:14 -07:00
#include <stdlib.h>
#include <stdio.h>
#include <3ds.h>
#include "output.h"
int main()
{
srvInit();
aptInit();
hidInit(NULL);
gfxInit();
gfxSet3D(false);
superStr[0] = 0;
2014-10-26 18:47:14 -07:00
print("fsInit %08X\n", (unsigned int)
fsInit()
);
FS_archive sdmcArchive = { 0x00000009, { PATH_EMPTY, 1, (u8*) "" } };
2014-10-26 18:47:14 -07:00
print("FSUSER_OpenArchive %08X\n", (unsigned int)
FSUSER_OpenArchive(NULL, &sdmcArchive)
);
APP_STATUS status;
while ((status=aptGetStatus()) != APP_EXITING) {
2014-10-30 00:42:44 -07:00
switch (status) {
case APP_RUNNING:
2014-10-26 18:47:14 -07:00
drawFrame();
hidScanInput();
if (hidKeysDown() & KEY_B) {
break;
} else if (hidKeysDown() & KEY_A) {
print("FSUSER_CreateDirectory %08X\n", (unsigned int)
FSUSER_CreateDirectory(NULL, sdmcArchive, FS_makePath(PATH_CHAR, "/new_dir"))
);
}
2014-10-30 00:42:44 -07:00
break;
case APP_SUSPENDING:
2014-10-26 18:47:14 -07:00
aptReturnToMenu();
2014-10-30 00:42:44 -07:00
break;
case 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);
}
gfxExit();
hidExit();
aptExit();
srvExit();
return 0;
}