mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user