int main() { suInit(); gfxInitDefault(); consoleInit(GFX_TOP, &topConsole); consoleSelect(&topConsole); cfguInit(); fsInit(); amInit(); fbTopLeft = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL); fbTopRight = gfxGetFramebuffer(GFX_TOP, GFX_RIGHT, NULL, NULL); fbBottom = gfxGetFramebuffer(GFX_BOTTOM, 0, NULL, NULL); u8 next = mainMenu(); while (aptMainLoop()) { switch (next) { case 0: break; case 1: next = mainMenu(); break; //case 2: next = legitInstallMenu(); break; case 3: next = downgradeMenu(); break; //case 4: next = downgradeMSETMenu(); break; //case 5: next = downgradeBrowserMenu(); break; default: next = mainMenu(); } if (next == 0) break; } gfxExit(); return 0; }
s32 main (void) { // Initialize services //gfxInitDefault(); //gfxSwapBuffers(); Result res; gfxInitDefault(); gfxSwapBuffers(); consoleInit(GFX_TOP,NULL); //printf("miniPasta2\n\n"); res=suInit(); printf("su init: %08X\n",res); //res=khaxInit(); //printf("khax init: %08X\n",res); res=brahma_init(); printf("brahma init: %08X\n",res); load_arm9_payload_from_mem (arm9payload_bin, arm9payload_bin_size); printf("payload loaded to RAM\n"); res=firm_reboot(); printf("firm reboot: %08X\n",res); while (aptMainLoop()) { //Scan all the inputs. This should be done once for each frame hidScanInput(); //hidKeysDown returns information about which buttons have been just pressed (and they weren't in the previous frame) u32 kDown = hidKeysDown(); if (kDown & KEY_START) break; // break in order to return to hbmenu // Flush and swap framebuffers gfxFlushBuffers(); gfxSwapBuffers(); //Wait for VBlank gspWaitForVBlank(); } gfxExit(); // Return to hbmenu return 0; }