Add elevator crash patch

This commit is contained in:
Phillip Stephens 2024-10-15 19:26:14 -07:00
parent aaac5cd6d2
commit 723ce89f98
1 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,7 @@
#include "Kyoto/CARAMManager.hpp" #include "Kyoto/CARAMManager.hpp"
#include "dolphin/os/OSCache.h"
#include "rstl/math.hpp" #include "rstl/math.hpp"
#include "dolphin/arq.h" #include "dolphin/arq.h"
@ -224,7 +225,9 @@ CDvdFile::CDvdFile(const char* filename)
CDvdFile::~CDvdFile() { CloseFile(); } CDvdFile::~CDvdFile() { CloseFile(); }
CDvdRequest* CDvdFile::SyncRead(void* dest, uint len) { return AsyncSeekRead(dest, len, kSO_Cur, 0); } CDvdRequest* CDvdFile::SyncRead(void* dest, uint len) {
return AsyncSeekRead(dest, len, kSO_Cur, 0);
}
void CDvdFile::SyncSeekRead(void* dest, uint len, ESeekOrigin origin, int offset) { void CDvdFile::SyncSeekRead(void* dest, uint len, ESeekOrigin origin, int offset) {
StallForARAMFile(); StallForARAMFile();
@ -282,7 +285,11 @@ bool CDvdFile::FileExists(const char* filename) {
return DVDConvertPathToEntrynum(const_cast< char* >(DecodeARAMFile(filename))) != -1; return DVDConvertPathToEntrynum(const_cast< char* >(DecodeARAMFile(filename))) != -1;
} }
void CDvdFile::internalCallback(s32, DVDFileInfo*) {} void CDvdFile::internalCallback(s32 res, DVDFileInfo* info) {
#if VERSION >= 1
DCInvalidateRange((void*)info->cb.addr, info->cb.length);
#endif
}
void CDvdFile::CalcFileOffset(int offset, ESeekOrigin origin) { void CDvdFile::CalcFileOffset(int offset, ESeekOrigin origin) {
switch (origin) { switch (origin) {