This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/ninjhax/source/main.c

31 lines
630 B
C
Raw Normal View History

2015-08-05 12:31:17 +02:00
#include <3ds.h>
#include <stdio.h>
#include <stdlib.h>
2015-08-05 12:31:17 +02:00
#include "brahma.h"
#include "hid.h"
#ifndef LAUNCHER_PATH
#define LAUNCHER_PATH "Cakes.dat"
#endif
2015-08-05 14:27:35 +02:00
int main (void) {
2015-08-05 14:27:35 +02:00
if (brahma_init()) {
if (load_arm9_payload_offset("/" LAUNCHER_PATH, 0x12000, 0x10000) != 1)
goto error;
2015-08-05 14:27:35 +02:00
firm_reboot();
brahma_exit();
}
// Return to hbmenu
2015-08-05 14:27:35 +02:00
return 0;
error:
gfxInitDefault();
consoleInit(GFX_BOTTOM, NULL);
printf("An error occurred while loading the payload.\nMake sure your launcher is located at:\n/" LAUNCHER_PATH);
wait_any_key();
gfxExit();
return 1;
2015-08-05 12:31:17 +02:00
}