diff --git a/libctru/Makefile b/libctru/Makefile index 925b955..9fbb7b1 100644 --- a/libctru/Makefile +++ b/libctru/Makefile @@ -50,7 +50,7 @@ CFLAGS := -g -Wall -Werror -mword-relocations \ $(ARCH) \ $(BUILD_CFLAGS) -CFLAGS += $(INCLUDE) -DARM11 -D_3DS +CFLAGS += $(INCLUDE) -D__3DS__ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 diff --git a/libctru/include/3ds.h b/libctru/include/3ds.h index 58fda13..dc7c6ca 100644 --- a/libctru/include/3ds.h +++ b/libctru/include/3ds.h @@ -8,6 +8,11 @@ extern "C" { #endif +#if defined(_3DS) && !defined(__3DS__) +#warning "Please update your Makefile and replace -DARM11 -D_3DS with -D__3DS__" +#define __3DS__ +#endif + //might be missing some #include <3ds/types.h> #include <3ds/result.h> diff --git a/libctru/source/applets/error.c b/libctru/source/applets/error.c index 3b39b63..b731784 100644 --- a/libctru/source/applets/error.c +++ b/libctru/source/applets/error.c @@ -1,4 +1,3 @@ -#include <3ds.h> #include #include <3ds/types.h> #include <3ds/synchronization.h> @@ -40,7 +39,7 @@ static void errorConvertToUTF16(u16* out, const char* in, size_t max) return; } - out[units] = 0; + out[units] = 0; } void errorText(errorConf *err, const char* text) @@ -49,6 +48,6 @@ void errorText(errorConf *err, const char* text) } void errorDisp(errorConf* err) -{ +{ aptLaunchLibraryApplet(APPID_ERROR, err, sizeof(*err), 0); }