Closed NovaSquirrel closed 2 months ago
As asie has mentioned:
I think nobody anticipated keyboardInit being called twice. We might need a keyboardExit that calls bgHide and wipes curKeyboard
Also, have you tried using keyboardHide()
when you stop using the keyboard?
Yes, keyboardHide()
doesn't fix this. According to the source it just scrolls the keyboard offscreen and hides the background layer, but I think keyboardInit()
resets that stuff by re-initializing the background.
The problem is that the background layer is enabled when it is set up (so, if there are graphics in VRAM, it will display them right away), then the keyboard graphics are loaded, then the background layer is hidden.
This patch should fix that: https://github.com/blocksds/libnds/commit/62a019b0838e591a206486064ff46978d2834446
Now I hide the layer right after it's set up. I've also added keyboardEnd()
to hide the keyboard right away in case it's needed to hide it without an animation in some case.
@asiekierka has also provided this additional patch to fix a couple of things I missed in mine: https://github.com/blocksds/libnds/pull/91
I'm closing this due to inactivity. If the bug is still there, feel free to re-open the issue.
If you call
keyboardInit
more than once, you'll see the keyboard appear all the way up at the top of the screen briefly before disappearing. I was able to prevent this by clearing the tilemap the keyboard is told to use, so I assume this means thatkeyboardInit
is displaying whatever was in that tilemap before it was called.