You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
737 B
36 lines
737 B
#include <stdlib.h> |
|
#include <stdio.h> |
|
#include <3ds.h> |
|
#include "platform/ctr/system.h" |
|
|
|
bool isN3DS; |
|
|
|
bool ctr_check_dsp() |
|
{ |
|
FILE *dsp = fopen("sdmc:/3ds/dspfirm.cdc", "r"); |
|
if (dsp == NULL) { |
|
fclose(dsp); |
|
gfxInitDefault(); |
|
errorConf error; |
|
errorInit(&error, ERROR_TEXT, CFG_LANGUAGE_EN); |
|
errorText(&error, "Cannot find DSP firmware!\n\n\"sdmc:/3ds/dspfirm.cdc\"\n\nRun \'DSP1\' atleast once to\ndump your DSP firmware."); |
|
errorDisp(&error); |
|
gfxExit(); |
|
return false; |
|
} |
|
fclose(dsp); |
|
return true; |
|
} |
|
|
|
void ctr_sys_init() |
|
{ |
|
if( ctr_check_dsp() == false ) |
|
exit(0); |
|
|
|
APT_CheckNew3DS(&isN3DS); |
|
if(isN3DS) |
|
osSetSpeedupEnable(true); |
|
|
|
romfsInit(); |
|
atexit([]() { romfsExit(); }); |
|
} |