Switch to ogc2

This commit is contained in:
2026-05-07 17:21:52 -05:00
parent 44a0700800
commit 2cea43dc70
6 changed files with 44 additions and 18 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ errorret_t assetInitDolphinDVD(void) {
if(!hdr) errorThrow("Failed to read DVD disc header.");
u32 fstOff = assetDolphinDVDReadBigEndian32(hdr + 0x424);
u32 fstSize = assetDolphinDVDReadBigEndian32(hdr + 0x428);
free(hdr);
memoryFree(hdr);
// Read the FST
u8 *fst = (u8 *)assetDolphinDVDRead((s64)fstOff, fstSize);
@@ -71,8 +71,8 @@ void *assetDolphinDVDRead(const s64 offset, const u32 size) {
void *buf = memoryAlign(ASSET_DOLPHIN_DVD_ALIGN, padded);
if(!buf) return NULL;
DCInvalidateRange(buf, padded);
dvdcmdblk block;
if(DVD_ReadPrio(&block, buf, padded, offset, 0) <= 0) {
static dvdcmdblk block;
if(DVD_ReadAbs(&block, buf, padded, offset) <= 0) {
memoryFree(buf);
return NULL;
}
+1 -1
View File
@@ -9,7 +9,7 @@
#include <ogcsys.h>
#include <gccore.h>
#include <malloc.h>
#include <ogc/timesupp.h>
#define consoleInit consoleInitDolhpin
+3
View File
@@ -7,6 +7,9 @@
#include "time/timedolphin.h"
#define SYS_Time __SYS_GetSystemTime
#define PPCTicksToUs ticks_to_microsecs
double_t timeGetRealDolphin(void) {
// "Returns time in ticks since 2000"
u64 timeInUs = PPCTicksToUs(SYS_Time());