astronautlevel2 / Anemone3DS

A theme and boot splash manager for the Nintendo 3DS console
GNU General Public License v3.0
908 stars 44 forks source link

Sort sets by name when installing #331

Open tildetildetilde opened 3 months ago

tildetildetilde commented 3 months ago

Description (sorry for multiple issues at a time, if you'd like me to split this up into multiple posts i will.) after using the "install" function after getting new badges, the IDs of the already placed badges will scramble and either disappear or display incorrectly, meaning you have to replace them often (this was a problem with GYTB too.) it's possible that doing this also corrupted an entire subfolder in my badges folder, that i had to delete with GM9. organized folders do not display in alphabetical order on the badge screen.

bottom line, i think the "install badges" function could use some testing.

Steps to reproduce

Expected behavior

Screenshots ID scrambling: id scrambling example as you can see, not only are the badges now a complete mess, but the selected one is invisible. 2024-06-24_03-46-19 276_bot here's what the bottom screen is intended to look like. (we can talk about my personal tastes somewhere else.)

corrupted folder: N/A - i didn't think to get screenshots of the folder before i deleted it and replaced it myself. when i viewed the folder in FBI, all it had inside was a random file named "USBC". i couldn't open the folder on my computer, nor could i move, delete, or copy it.

badge folders in wrong order: folders unorganized here are my folders of badges. for clarity, the named order they are displayed in is: all badges, ace attorney 4, themeplaza badges, ace attorney 1, ace attorney 2, 3x1 badges, ace attorney 3, pride flags Screenshot 2024-06-24 033834 Screenshot 2024-06-24 033845 screenshot of said badge folders, viewed on my computer.

System information System model new 3DS

System firmware version 11.17.0-50U

Anemone3DS version v3.0.1

Luma3DS version v13.1.1

astronautlevel2 commented 3 months ago

ID scrambling

This is inevitable with how badges (and custom badges especially) work - because these aren't official badges they don't have an actual ID associated with them, so instead the ID is generated on install, and depending on the order they're installed in the ID will be different. One possible solution would be hashing the data (or the name?) and generating an ID based on that, but I'm not super convinced that it's worth it yet. Another solution would be to sort by name before installing, you'd still have everything that was already installed which comes after the new badges get messed up (and also this works much worse with sets).

corrupted folder

I'm almost sure this is not an Anemone problem - we only interact with the folder structure through FSUSER which shouldn't be capable of corrupting anything in that way. If you can reproduce it consistently I'll look into it but I have heavy doubts regarding this being an Anemone issue.

badge folders in wrong order

Same as the ID scrambling bit, but this one I actually do think sorting by name being a good solution for. For now I'm going to change this issue to be a feature request for badge folder ordering; if you're able to replicate the corrupted folder open a new issue reporting it.