Skip to content

Commit e63ec14

Browse files
committed
Small fixes/cleanup.
1 parent a719aa2 commit e63ec14

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

source/arm11/debug.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434

35-
noreturn void panic(void)
35+
NOINLINE noreturn void panic(void)
3636
{
3737
enterCriticalSection();
3838

@@ -48,7 +48,7 @@ noreturn void panic(void)
4848
while(1) __wfi();
4949
}
5050

51-
noreturn void panicMsg(const char *msg)
51+
NOINLINE noreturn void panicMsg(const char *msg)
5252
{
5353
enterCriticalSection();
5454

@@ -67,7 +67,7 @@ noreturn void panicMsg(const char *msg)
6767

6868
// Expects the registers in the exception stack to be in the following order:
6969
// r0-r14, pc (unmodified), CPSR, DFSR, IFSR, FAR, WFAR
70-
noreturn void guruMeditation(u8 type, const u32 *excStack)
70+
NOINLINE noreturn void guruMeditation(u8 type, const u32 *excStack)
7171
{
7272
const char *const typeStr[3] = {"Undefined instruction", "Prefetch abort", "Data abort"};
7373
u32 realPc, instSize = 4;

source/arm11/open_agb_firm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ static int confIniHandler(void* user, const char* section, const char* name, con
535535
return 1; // 1 is no error? Really?
536536
}
537537

538-
static int gameConfIniHandler(void* user, const char* section, const char* name, const char* value)
538+
/*static int gameConfIniHandler(void* user, const char* section, const char* name, const char* value)
539539
{
540-
//OafGameConfig *const config = (OafGameConfig*)user;
540+
OafGameConfig *const config = (OafGameConfig*)user;
541541
542-
/*if(strcmp(section, "game") == 0)
542+
if(strcmp(section, "game") == 0)
543543
{
544544
// Save type.
545545
// Save slot.
@@ -561,18 +561,18 @@ static int gameConfIniHandler(void* user, const char* section, const char* name,
561561
else if(strcmp(section, "input") == 0)
562562
{
563563
}
564-
else return 0;*/ // Error.
564+
else return 0; // Error.
565565
566566
return 1; // 1 is no error? Really?
567-
}
567+
}*/
568568

569-
static Result parseConfig(const char *const path, u8 confType, void *config)
569+
static Result parseConfig(const char *const path, /* u8 confType, */ void *config)
570570
{
571571
char *iniBuf = (char*)calloc(INI_BUF_SIZE, 1);
572572
if(iniBuf == NULL) return RES_OUT_OF_MEM;
573573

574574
Result res = fsQuickRead(path, iniBuf, INI_BUF_SIZE - 1);
575-
if(res == RES_OK) ini_parse_string(iniBuf, (confType == 0 ? confIniHandler : gameConfIniHandler), config);
575+
if(res == RES_OK) ini_parse_string(iniBuf, /* (confType == 0 ? */ confIniHandler /* : gameConfIniHandler) */, config);
576576
else
577577
{
578578
const char *const defaultConfig = DEFAULT_CONFIG;
@@ -597,7 +597,7 @@ static Result handleFsStuff(char romAndSavePath[512])
597597
if((res = fChdir(OAF_WORK_DIR)) != RES_OK) break;
598598

599599
// Parse config.
600-
parseConfig("config.ini", 0, &g_oafConfig);
600+
parseConfig("config.ini", /* 0, */ &g_oafConfig);
601601
{ // TODO: Move this elsewhere?
602602
const u8 backlight = g_oafConfig.backlight;
603603
GFX_setBrightness(backlight, backlight);

source/arm9/debug.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232

33-
noreturn void panic()
33+
NOINLINE NOINLINE noreturn void panic(void)
3434
{
3535
enterCriticalSection();
3636
//fsDeinit();
@@ -44,7 +44,7 @@ noreturn void panic()
4444
}
4545
}
4646

47-
noreturn void panicMsg(UNUSED const char *msg)
47+
NOINLINE noreturn void panicMsg(UNUSED const char *msg)
4848
{
4949
enterCriticalSection();
5050
//fsDeinit();
@@ -60,7 +60,7 @@ noreturn void panicMsg(UNUSED const char *msg)
6060

6161
// Expects the registers in the exception stack to be in the following order:
6262
// r0-r14, pc (unmodified), cpsr
63-
noreturn void guruMeditation(UNUSED u8 type, UNUSED const u32 *excStack)
63+
NOINLINE noreturn void guruMeditation(UNUSED u8 type, UNUSED const u32 *excStack)
6464
{
6565
// avoid fs corruptions
6666
//fsDeinit();

source/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NAKED void wait_cycles(u32 cycles)
2929
__asm__("1: subs %0, %0, #4\n\t"
3030
#elif ARM11
3131
__asm__("1: subs %0, %0, #2\n\t"
32-
"nop\n\t"
32+
"yield\n\t"
3333
#endif
3434
"bhi 1b\n\t"
3535
"bx lr\n\t" : : "r" (cycles) : "cc");

0 commit comments

Comments
 (0)