Skip to content

console: store the cache after clearing a framebuffer - #271

Merged
WinterMute merged 1 commit into
devkitPro:masterfrom
mardy:invalidate-fb-cache
Aug 28, 2026
Merged

console: store the cache after clearing a framebuffer#271
WinterMute merged 1 commit into
devkitPro:masterfrom
mardy:invalidate-fb-cache

Conversation

@mardy

@mardy mardy commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This fixes a screen corruption issue on the wiimote example, where
adding a call to fatInitDefault() right at the beginning of main()
causes the upper 1/4 of the screen to be dirty (mostly green).

To reproduce this, one needs to have a USB drive connected, formatted
with NTFS:

  • libdvm will try to initialize the drive
  • it will create a cache for it (128KB)
  • seeing that it's NTFS and that there's no driver for the NTFS format,
    it will destroy the disk
  • the memory associated with the disk is freed, and then reused for the
    framebuffer

This fixes a screen corruption issue on the wiimote example, where
adding a call to fatInitDefault() right at the beginning of main()
causes the upper 1/4 of the screen to be dirty (mostly green).

To reproduce this, one needs to have a USB drive connected, formatted
with NTFS:
- libdvm will try to initialize the drive
- it will create a cache for it (128KB)
- seeing that it's NTFS and that there's no driver for the NTFS format,
  it will destroy the disk
- the memory associated with the disk is freed, and then reused for the
  framebuffer
@mardy
mardy force-pushed the invalidate-fb-cache branch from 75d23c4 to e682eb2 Compare August 28, 2026 15:40
@mardy mardy changed the title system: invalidate cache when allocating a framebuffer console: store the cache after clearing a framebuffer Aug 28, 2026
@WinterMute
WinterMute merged commit c4fc7f7 into devkitPro:master Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants