mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 00:56:55 +02:00
- AdvancedPaletteManager incorrectly handled negative y positions - FocusManager still had a pointer to a view that was destroyed in the cheats panel. After changing focus, memory got corrupted.
33 lines
1.0 KiB
C++
33 lines
1.0 KiB
C++
#pragma once
|
|
#include "CheatEntry.h"
|
|
|
|
/// @brief Class holding the cheats for a game.
|
|
class GameCheats : public CheatEntry
|
|
{
|
|
public:
|
|
GameCheats(std::unique_ptr<u8[]> cheatData, u32 cheatDataLength, u32 fileOffset, const char* gameName,
|
|
CheatEntry* subEntries, u32 numberOfSubEntries)
|
|
: CheatEntry(gameName, "", false, subEntries, numberOfSubEntries)
|
|
, _cheatData(std::move(cheatData)), _cheatDataLength(cheatDataLength)
|
|
, _fileOffset(fileOffset) { }
|
|
|
|
/// @brief Gets a pointer to the cheat data.
|
|
/// @param cheatDataLength The length of the cheat data is returned in this reference.
|
|
/// @return A pointer to the cheat data. This pointer is only valid for the lifetime of this \see GameCheats instance.
|
|
u8* GetCheatData(u32& cheatDataLength) const
|
|
{
|
|
cheatDataLength = _cheatDataLength;
|
|
return _cheatData.get();
|
|
}
|
|
|
|
u32 GetFileOffset() const
|
|
{
|
|
return _fileOffset;
|
|
}
|
|
|
|
private:
|
|
std::unique_ptr<u8[]> _cheatData;
|
|
u32 _cheatDataLength;
|
|
u32 _fileOffset;
|
|
};
|