Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] SORT by NAME doesn't properly work #26

Open
legolas119 opened this issue Dec 27, 2021 · 14 comments
Open

[ISSUE] SORT by NAME doesn't properly work #26

legolas119 opened this issue Dec 27, 2021 · 14 comments
Labels
bug Something isn't working

Comments

@legolas119
Copy link

Hi,
i choose SORT = NAME, i push APPLY and SAVE and the games are correctly sorted by NAME. But if i turn off the console, when i turn on it again, the games aren't sorted by name anymore...even if the option is kept saved:
https://i.postimg.cc/vDFC6NFf/Cattura4.png

So every time i turn on the console, i have to push START and then i push SAVE: in this way there is a "biiiiip" sound from my VMU unit and the games are correctly sorted by name.
Currently my VMU has a totally low battery: do you think that this could be the cause of the issue ot the sort by name?

thanks

@mrneo240 mrneo240 added the bug Something isn't working label Dec 28, 2021
@mrneo240 mrneo240 changed the title SORT by NAME doesn't properly work [ISSUE] SORT by NAME doesn't properly work Dec 28, 2021
@mrneo240
Copy link
Owner

I believe it is an issue in the loading of preferences. Thank you for posting

Batteries do not affect operation of the vmu while the console it on.

@legolas119
Copy link
Author

I confirm that the issue is still present even if i have changed the battery, so probably if is an issue. Thank you!

@mrneo240
Copy link
Owner

To be clear, the issue is in openMenu.
I'll look into it this week

@legolas119
Copy link
Author

many thanks!

@legolas119
Copy link
Author

thanks! i'm really sorry, i suppose the issues isn't solved yet, is that correct? thank you!

@retrohead
Copy link

retrohead commented Feb 8, 2022

A bit more detail on this bug.

The option is saved correctly but the actual list is not sorted. This means you need to open the options then apply or save to sort the list correctly on a new load.

I can't compile this on my current setup to test but changing list_get() in gd_list.c should fix this:

OLD:

const struct gd_item **list_get(void) {
  return (const gd_item **)list_temp;
}

New

const struct gd_item **list_get(void) {
    openmenu_settings *settings = settings_get();
    if (!settings->filter) {
      switch ((CFG_SORT)settings->sort) {
        case SORT_NAME:
          return list_get_sort_name();
        case SORT_DATE:
          return list_get_sort_date();
        default:
        case SORT_DEFAULT:
          return list_get_sort_default();
      }
    } else {
      /* If filtering, filter down to only genre then sort */
      return list_get_genre_sort((FLAGS_GENRE)settings->filter - 1, settings->sort);
    }
}

PR created here #31 but I cannot test it out at the moment

@legolas119
Copy link
Author

thanks! i suppose the fix will be implemented in the next openmenu release?
thanks

@retrohead
Copy link

Hopefully so, I managed to compile it but it won't run. I think I might need a config.mk for dc-chain or something as the main branch here won't run either and my 1ST_READ.BIN is much larger than the one released. Any help would be appreciated with compiling a working binary of this. @mrneo240

@legolas119
Copy link
Author

thank you very much!

@mrneo240
Copy link
Owner

mrneo240 commented Feb 9, 2022

I can offer some insight,
currently the official releases are written such that they run from a gdi ( aka gdrom) but include code that goes against the wishes of the KallistiOS creator, as such they are not part of this repo.
In addition there is an entire elf encrypter+packer i wrote to help handle size and relocation easily, these too are not part of the public source release.

What is released is currently everything else along with tools and the code is configured in such a way that you will be able to compile it and then run it from a CDI either as a binhacked IP.bin + binary or as a scrambled binary + libre ip.bin.

If the code isnt running from a CDI please let me know and i can investigate why that would be.

edit

also thank you for the discussion here on the issue and the possible code fix. my apologies for being so busy lately.
I will implement and update in the next few days.

@retrohead
Copy link

retrohead commented Feb 12, 2022

Thanks, I had a go at making a CDI from a bin hacked IP.BIN / 1ST_READ.BIN and it just resets my console after the logo.

My environment was freshly installed for this and I had a few issues getting KOS compiled due to the new config.mk file for dc-chain. I used the config.mk.test file as it uses the latest GCC. The stable one would not compile your code at all for several reasons but the newer compiler fixed that.

open_menu_fail.zip

@legolas119
Copy link
Author

hi, do you confirm that this little bug isn't fixed yet, is that correct?
thank you very much!

@legolas119
Copy link
Author

hi, is this bug fixed or not yet? manu thanks!

@legolas119
Copy link
Author

hi all,
is this bug already fixed? thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants