2014-12-26 02:31:59 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <3ds.h>
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
// Initialize services
|
|
|
|
gfxInit();
|
|
|
|
initCfgu();
|
|
|
|
|
|
|
|
|
|
|
|
u8 language = 0;
|
2014-12-26 02:46:38 +01:00
|
|
|
Result res;
|
2014-12-26 02:31:59 +01:00
|
|
|
|
|
|
|
// Init console for text output
|
|
|
|
consoleInit(GFX_BOTTOM, NULL);
|
|
|
|
|
|
|
|
// Read the language field from the config savegame.
|
|
|
|
// See here for more block IDs:
|
|
|
|
// http://3dbrew.org/wiki/Config_Savegame#Configuration_blocks
|
2014-12-26 02:46:38 +01:00
|
|
|
res = CFGU_GetConfigInfoBlk2(1, 0xA0002, &language);
|
2014-12-26 02:31:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
// Main loop
|
|
|
|
while (aptMainLoop())
|
|
|
|
{
|
|
|
|
hidScanInput();
|
|
|
|
|
2014-12-26 02:46:38 +01:00
|
|
|
// Print return value and language code
|
2014-12-26 03:03:40 +01:00
|
|
|
printf("\x1b[0;0Hresult: 0x%x", (int)res);
|
2014-12-26 02:57:49 +01:00
|
|
|
printf("\x1b[1;0HLanguage code: %d", (int)language);
|
2014-12-26 02:31:59 +01:00
|
|
|
|
|
|
|
u32 kDown = hidKeysDown();
|
|
|
|
if (kDown & KEY_START)
|
|
|
|
break; // break in order to return to hbmenu
|
|
|
|
|
|
|
|
// Flush and swap framebuffers
|
|
|
|
gfxFlushBuffers();
|
|
|
|
gfxSwapBuffers();
|
|
|
|
gspWaitForVBlank();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Exit services
|
|
|
|
exitCfgu();
|
|
|
|
gfxExit();
|
|
|
|
return 0;
|
|
|
|
}
|