Change cheat implementation to show cheats in database order, fix some bugs

- 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.
This commit is contained in:
Gericom
2026-03-15 13:28:59 +01:00
parent 601fd6371e
commit b7d7f9f352
16 changed files with 313 additions and 424 deletions

View File

@@ -89,14 +89,8 @@ u32 AdvancedPaletteManagerBase::TryMerge(PaletteRow* rows, const PaletteRow& new
u32 AdvancedPaletteManagerBase::AllocRowInternal(PaletteRow* rows, const IPalette& palette, int yStart, int yEnd)
{
if (yStart < 0)
{
yStart = 0;
}
if (yEnd > 192)
{
yEnd = 192;
}
yStart = std::clamp(yStart, 0, 192);
yEnd = std::clamp(yEnd, 0, 192);
u32 newIdx = _usedRows;
PaletteRow& newRow = rows[newIdx];