Skip to content

Commit

Permalink
Fix mod loader for compressed DRM files
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIndra55 committed Mar 16, 2024
1 parent 97d84b6 commit aca5197
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cdc/file/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ namespace cdc
virtual void Suspend() = 0;
virtual bool Resume() = 0;
virtual bool IsSuspended() = 0;
virtual char* GetBufferPointer(FileRequest* request, unsigned int* bytesLocked) = 0;
virtual void ResetBufferPointer(int value) = 0;
#endif

virtual ~FileSystem() { };
Expand Down
5 changes: 5 additions & 0 deletions src/file/HookFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ bool HookFileSystem::IsSuspended()
{
return m_pDiskFS->IsSuspended();
}

char* HookFileSystem::GetBufferPointer(cdc::FileRequest* request, unsigned int* bytesLocked)
{
return m_pDiskFS->GetBufferPointer(request, bytesLocked);
}
#endif
2 changes: 2 additions & 0 deletions src/file/HookFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ class HookFileSystem : public cdc::FileSystem
void Suspend();
bool Resume();
bool IsSuspended();
char* GetBufferPointer(cdc::FileRequest* request, unsigned int* bytesLocked);
void ResetBufferPointer(int value) { }
#endif
};
2 changes: 2 additions & 0 deletions src/file/MultiFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ class MultiFileSystem : public cdc::FileSystem
void Suspend() { }
bool Resume() { return false; }
bool IsSuspended() { return false; }
char* GetBufferPointer(cdc::FileRequest* request, unsigned int* bytesLocked) { return nullptr; }
void ResetBufferPointer(int value) { }
#endif
};

0 comments on commit aca5197

Please sign in to comment.