Merge pull request #26 from WinterMute/libctru-fixes

Update for libctru 1.0.0
This commit is contained in:
mtheall 2015-12-30 13:54:04 -06:00
commit d70cc5a238
2 changed files with 13 additions and 37 deletions

View File

@ -43,7 +43,6 @@ ICON := ftbrony.png
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard
CFLAGS := -g -Wall -O3 -mword-relocations \
-fomit-frame-pointer -ffast-math \
$(ARCH) \
-DSTATUS_STRING="\"ftbrony v1.1\""
@ -117,6 +116,14 @@ else
export APP_ICON := $(TOPDIR)/$(ICON)
endif
ifeq ($(strip $(NO_SMDH)),)
export _3DSXFLAGS += --smdh=$(CURDIR)/$(TARGET).smdh
endif
ifneq ($(ROMFS),)
export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
endif
.PHONY: $(BUILD) clean all
#---------------------------------------------------------------------------------
@ -143,6 +150,8 @@ DEPENDS := $(OFILES:.o=.d)
ifeq ($(strip $(NO_SMDH)),)
.PHONY: all
all : $(OUTPUT).3dsx $(OUTPUT).smdh
$(OUTPUT).smdh : $(TOPDIR)/Makefile
$(OUTPUT).3dsx: $(OUTPUT).smdh
endif
$(OUTPUT).3dsx: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)

View File

@ -968,22 +968,6 @@ ftp_init(void)
#ifdef _3DS
Result ret;
/* initialize FS service */
ret = fsInit();
if(ret != 0)
{
console_print(RED "fsInit: 0x%08X\n" RESET, (unsigned int)ret);
goto fs_fail;
}
/* initialize sdmc_dev */
ret = sdmcInit();
if(ret != 0)
{
console_print(RED "sdmcInit: 0x%08X\n" RESET, (unsigned int)ret);
goto sdmc_fail;
}
#if ENABLE_LOGGING
/* open log file */
FILE *fp = freopen("/ftbrony.log", "wb", stderr);
@ -1010,7 +994,7 @@ ftp_init(void)
}
/* initialize SOC service */
ret = SOC_Initialize(SOC_buffer, SOC_BUFFERSIZE);
ret = socInit(SOC_buffer, SOC_BUFFERSIZE);
if(ret != 0)
{
console_print(RED "SOC_Initialize: 0x%08X\n" RESET, (unsigned int)ret);
@ -1118,17 +1102,8 @@ ftruncate_fail:
stderr_fail:
#endif
ret = sdmcExit();
if(ret != 0)
console_print(RED "sdmcExit: 0x%08X\n" RESET, (unsigned int)ret);
sdmc_fail:
ret = fsExit();
if(ret != 0)
console_print(RED "fsExit: 0x%08X\n" RESET, (unsigned int)ret);
fs_fail:
return -1;
#endif
}
@ -1150,7 +1125,7 @@ ftp_exit(void)
#ifdef _3DS
/* deinitialize SOC service */
ret = SOC_Shutdown();
ret = socExit();
if(ret != 0)
console_print(RED "SOC_Shutdown: 0x%08X\n" RESET, (unsigned int)ret);
free(SOC_buffer);
@ -1160,16 +1135,8 @@ ftp_exit(void)
if(fclose(stderr) != 0)
console_print(RED "fclose: 0x%08X\n" RESET, errno);
/* deinitialize sdmc_dev */
ret = sdmcExit();
if(ret != 0)
console_print(RED "sdmcExit: 0x%08X\n" RESET, (unsigned int)ret);
#endif
/* deinitialize FS service */
ret = fsExit();
if(ret != 0)
console_print(RED "fsExit: 0x%08X\n" RESET, (unsigned int)ret);
#endif
}