Polprzewodnikowy / N64FlashcartMenu

Universal N64 flashcart menu for wide variety of devices
156 stars 15 forks source link

develop: Long filename with underscore breaks ROM filename rendering #158

Closed ddund closed 2 weeks ago

ddund commented 2 weeks ago

Firmware version of the flashcart

No response

Menu revision used

No response

Description

Example with WRAP_WORD: Screenshot From 2024-11-09 16-30-29

with WRAP_ELLIPSES: Screenshot From 2024-11-09 16-29-36

Long filename without underscore: Screenshot From 2024-11-09 16-50-57

Example with a filename that does not extend the max width: Screenshot From 2024-11-09 16-48-25

I stumbled upon this when trying to improve the robustness of file name handling. I have not been able to determine the cause of this but a guess is that it could be something with how variable arguments is used in component_main_text_draw().

How to reproduce

No response

Expected behavior

No response

Screenshots

No response

Additional information

No response

networkfusion commented 2 weeks ago

You will need to raise this on the n64brew discord and speak with one of the libdragon devs on the best way.

networkfusion commented 2 weeks ago

It is obviously doing things correctly in relation to underscores as that, as far as it is concerned, is a single word.

ddund commented 2 weeks ago

It seems like something is is going wrong in libdragon. If I replace component_main_text_draw() and call rdpq_text_printn() directly I get the same behaviour.

rasky commented 2 weeks ago

Fixed by https://github.com/DragonMinded/libdragon/commit/0c4e388851cabab52f421bff5e75e9dc3ab36c72