mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-17 21:03:30 -04:00
Fix ultratypes types (#1454)
* Fix ultratypes types * Add back size_t and NULL * Callocs * Callocs pt 2 * bool * STDC version checks
This commit is contained in:
@@ -19,9 +19,9 @@ void SystemArena_Free(void* ptr) {
|
||||
__osFree(&gSystemArena, ptr);
|
||||
}
|
||||
|
||||
void* SystemArena_Calloc(u32 elements, size_t size) {
|
||||
void* SystemArena_Calloc(size_t num, size_t size) {
|
||||
void* ptr;
|
||||
size_t totalSize = elements * size;
|
||||
size_t totalSize = num * size;
|
||||
|
||||
ptr = __osMalloc(&gSystemArena, totalSize);
|
||||
if (ptr != NULL) {
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
|
||||
FaultAddrConvClient* iter = sFaultInstance->addrConvClients;
|
||||
FaultAddrConvClient* lastIter = NULL;
|
||||
OSIntMask mask;
|
||||
bool listIsEmpty = false;
|
||||
s32 listIsEmpty = false;
|
||||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||
ioMsg.dramAddr = ram;
|
||||
ioMsg.size = buffSize;
|
||||
ret = osEPiStartDma(gCartHandle, &ioMsg, 0);
|
||||
if (ret) {
|
||||
if (ret != 0) {
|
||||
goto END;
|
||||
}
|
||||
|
||||
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
|
||||
size -= buffSize;
|
||||
rom = rom + buffSize;
|
||||
rom += buffSize;
|
||||
ram = (u8*)ram + buffSize;
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||
ioMsg.dramAddr = ram;
|
||||
ioMsg.size = size;
|
||||
ret = osEPiStartDma(gCartHandle, &ioMsg, 0);
|
||||
if (ret) {
|
||||
if (ret != 0) {
|
||||
goto END;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user