mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 17:26:48 +02:00
26 lines
641 B
C++
26 lines
641 B
C++
#pragma once
|
|
#include "../Patch.h"
|
|
#include "LoaderInfo.h"
|
|
|
|
/// @brief Arm9 patch to make OS_ResetSystem reboot into Pico Loader.
|
|
class OSResetSystemPatch : public Patch
|
|
{
|
|
public:
|
|
explicit OSResetSystemPatch(const loader_info_t* loaderInfo)
|
|
: _loaderInfo(loaderInfo) { }
|
|
|
|
bool FindPatchTarget(PatchContext& patchContext) override;
|
|
void ApplyPatch(PatchContext& patchContext) override;
|
|
|
|
void** GetCheatsPointerAtTarget() const
|
|
{
|
|
return _cheatsPointer;
|
|
}
|
|
|
|
private:
|
|
u32* _osResetSystem = nullptr;
|
|
u32 _hybrid = false;
|
|
const loader_info_t* _loaderInfo;
|
|
void** _cheatsPointer = nullptr;
|
|
};
|