mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Refactored platform code to use interfaces for patch code with a special feature and improved patch code file names
This commit is contained in:
20
arm9/source/patches/platform/r4/R4ReadSdPatchCode.h
Normal file
20
arm9/source/patches/platform/r4/R4ReadSdPatchCode.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "sections.h"
|
||||
#include "patches/PatchCode.h"
|
||||
#include "../IReadSectorsPatchCode.h"
|
||||
|
||||
DEFINE_SECTION_SYMBOLS(r4_readsd);
|
||||
|
||||
extern "C" void r4_readSd(u32 srcSector, void* dst, u32 sectorCount);
|
||||
|
||||
class R4ReadSdPatchCode : public PatchCode, public IReadSectorsPatchCode
|
||||
{
|
||||
public:
|
||||
explicit R4ReadSdPatchCode(PatchHeap& patchHeap)
|
||||
: PatchCode(SECTION_START(r4_readsd), SECTION_SIZE(r4_readsd), patchHeap) { }
|
||||
|
||||
const ReadSectorsFunc GetReadSectorsFunction() const override
|
||||
{
|
||||
return (const ReadSectorsFunc)GetAddressAtTarget((void*)r4_readSd);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user