Skip to content

Commit

Permalink
Add elevator crash patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Antidote committed Oct 16, 2024
1 parent aaac5cd commit 723ce89
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Kyoto/DolphinCDvdFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "Kyoto/CARAMManager.hpp"

#include "dolphin/os/OSCache.h"
#include "rstl/math.hpp"

#include "dolphin/arq.h"
Expand Down Expand Up @@ -224,7 +225,9 @@ CDvdFile::CDvdFile(const char* filename)

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) {
StallForARAMFile();
Expand Down Expand Up @@ -282,7 +285,11 @@ bool CDvdFile::FileExists(const char* filename) {
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) {
switch (origin) {
Expand Down

0 comments on commit 723ce89

Please sign in to comment.