Skip to content

Commit 2df3fa0

Browse files
committed
ogc: update signature of resetcallback
The type of the resetcallback function in libogc was changed in 2018, to add the IRQ and context paramters. For some reason, though, the mismatch was not reported by the previous compilers. ``` /home/mardy/src/git/gamedev/2SDL/src/main/wii/SDL_wii_main.c:70:26: error: passing argument 1 of 'SYS_SetResetCallback' from incompatible pointer type [-Wincompatible-pointer-types] 70 | SYS_SetResetCallback(ResetCB); | ^~~~~~~ | | | void (*)(void) In file included from /opt/devkitpro/libogc/include/gccore.h:62, from /opt/devkitpro/libogc/include/ogcsys.h:4, from /home/mardy/src/git/gamedev/2SDL/src/main/wii/SDL_wii_main.c:40: /opt/devkitpro/libogc/include/ogc/system.h:384:50: note: expected 'resetcallback' {aka 'void (*)(unsigned int, void *)'} but argument is of type 'void (*)(void)' 384 | resetcallback SYS_SetResetCallback(resetcallback cb); | ~~~~~~~~~~~~~~^~ /home/mardy/src/git/gamedev/2SDL/src/main/wii/SDL_wii_main.c:49:13: note: 'ResetCB' declared here 49 | static void ResetCB() | ^~~~~~~ /opt/devkitpro/libogc/include/ogc/system.h:251:16: note: 'resetcallback' declared here 251 | typedef void (*resetcallback)(u32 irq, void* ctx); | ^~~~~~~~~~~~~ ```
1 parent 885d78a commit 2df3fa0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/wii/SDL_wii_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static void ShutdownCB()
4646
OGC_PowerOffRequested = true;
4747
}
4848

49-
static void ResetCB()
49+
static void ResetCB(u32 /* irq */, void * /* context */)
5050
{
5151
OGC_ResetRequested = true;
5252
}

0 commit comments

Comments
 (0)