From 64f64ffc42d1415f0cb2400b74439e1a2fde88bd Mon Sep 17 00:00:00 2001 From: a92126 <182859762@qq.com> Date: Wed, 2 Oct 2024 22:07:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/oaf_error_codes.h | 4 ++-- libn3ds/kernel/include/internal/list.h | 2 +- libn3ds/source/fb_assert.c | 12 ++++++------ source/oaf_error_codes.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/oaf_error_codes.h b/include/oaf_error_codes.h index 5f42273..ac178d1 100644 --- a/include/oaf_error_codes.h +++ b/include/oaf_error_codes.h @@ -38,7 +38,7 @@ enum const char* oafResult2String(Result res); -#ifdef ARM11 +#ifdef __ARM11__ void printError(Result res); void printErrorWaitInput(Result res, u32 waitKeys); -#endif // ifdef ARM11 +#endif // ifdef __ARM11__ diff --git a/libn3ds/kernel/include/internal/list.h b/libn3ds/kernel/include/internal/list.h index 6784f4d..443729c 100644 --- a/libn3ds/kernel/include/internal/list.h +++ b/libn3ds/kernel/include/internal/list.h @@ -1,7 +1,7 @@ #pragma once #include - +#include #ifdef __cplusplus extern "C" diff --git a/libn3ds/source/fb_assert.c b/libn3ds/source/fb_assert.c index 35dc179..a75b43d 100644 --- a/libn3ds/source/fb_assert.c +++ b/libn3ds/source/fb_assert.c @@ -19,10 +19,10 @@ #include "types.h" #include "ipc_handler.h" #include "drivers/pxi.h" -#ifdef ARM9 +#ifdef __ARM9__ #include "arm9/drivers/interrupt.h" #include "arm9/drivers/ndma.h" -#elif ARM11 +#elif __ARM11__ #include "arm11/fmt.h" #include "arm11/drivers/interrupt.h" #endif @@ -35,23 +35,23 @@ noreturn void __fb_assert(const char *const str, u32 line) { enterCriticalSection(); -#ifdef ARM9 +#ifdef __ARM9__ // Get rid of the warnings. (void)str; (void)line; PXI_sendCmd(IPC_CMD11_PANIC, NULL, 0); -#elif ARM11 +#elif __ARM11__ ee_printf("Assertion failed: %s:%" PRIu32, str, line); //PXI_sendCmd(IPC_CMD9_PANIC, NULL, 0); #endif while(1) { -#ifdef ARM9 +#ifdef __ARM9__ const u32 color = RGB8_to_565(0, 0, 255)<<16 | RGB8_to_565(0, 0, 255); NDMA_fill((u32*)FRAMEBUF_BOT_A_1, color, SCREEN_SIZE_BOT); NDMA_fill((u32*)FRAMEBUF_BOT_A_2, color, SCREEN_SIZE_BOT); -#elif ARM11 +#elif __ARM11__ __wfi(); #endif } diff --git a/source/oaf_error_codes.c b/source/oaf_error_codes.c index 66b3988..f966006 100644 --- a/source/oaf_error_codes.c +++ b/source/oaf_error_codes.c @@ -18,7 +18,7 @@ #include "oaf_error_codes.h" #include "drivers/gfx.h" -#ifdef ARM11 +#ifdef __ARM11__ #include "arm11/fmt.h" #include "arm11/drivers/hid.h" #endif @@ -36,7 +36,7 @@ const char* oafResult2String(Result res) return (res < CUSTOM_ERR_OFFSET ? result2String(res) : oafResultStrings[res - CUSTOM_ERR_OFFSET]); } -#ifdef ARM11 +#ifdef __ARM11__ void printError(Result res) { // @MERGE 231006 START @@ -65,4 +65,4 @@ void printErrorWaitInput(Result res, u32 waitKeys) if(hidGetExtraKeys(0) & (KEY_POWER_HELD | KEY_POWER)) break; } } -#endif // ifdef ARM11 +#endif // ifdef __ARM11__