Fix vram corruption when using the cheat panel in vertical grid mode

The graphics of an animated nds icon are now not all uploaded to vram at the same time.
There are now 1024 bytes available for each icon (previously 4096).
Double buffering is used to upload the new icon frame every time it changes.
This commit is contained in:
Gericom
2026-03-08 11:32:48 +01:00
parent 12ebd482d4
commit 43b1bf7afa
8 changed files with 45 additions and 42 deletions

View File

@@ -24,7 +24,7 @@ MaterialFileIcon::MaterialFileIcon(const TCHAR* name, const MaterialColorScheme*
_displayName[i] = 0;
}
void MaterialFileIcon::UploadGraphics(vu16* vram) const
void MaterialFileIcon::UploadGraphics(vu16* vram)
{
dma_ntrCopy32(3, GetIconTiles(), vram, 32 * 32 / 2);

View File

@@ -11,7 +11,7 @@ public:
MaterialFileIcon(const TCHAR* name, const MaterialColorScheme* materialColorScheme,
const IFontRepository* fontRepository);
void UploadGraphics(vu16* vram) const override;
void UploadGraphics(vu16* vram) override;
void Draw(GraphicsContext& graphicsContext, const Rgb<8, 8, 8>& backgroundColor) override;
protected: