kodi-game / kodi-game-scripting

Scripting for Kodi Game add-ons
GNU General Public License v2.0
5 stars 9 forks source link

Don't sort settings by ID #86

Closed garbear closed 3 years ago

garbear commented 3 years ago

Description

As title says.

According to @KOPRajs here:

Regarding the order of the settings:
It seems we are currently reordering the original options order from libretro to alphabet order. I don't think it is a good idea. The order in the libretro makes sense as related options are kept together.

It seems it is done on line 329 in this file: https://github.com/kodi-game/kodi-game-scripting/blob/master/kodi_game_scripting/process_game_addons.py

I'd suggest to simply remove the "sorted" function and keep the libretro default order.

I tried removing sorted, and it looks like settings are now in their original order.

Related PRs

Required by https://github.com/kodi-game/kodi-game-scripting/pull/86

How has this been tested?

Tested as part of https://github.com/kodi-game/game.libretro.pcsx-rearmed/pull/21

KOPRajs commented 3 years ago

The options order now seems to comply with the libretro and Retroarch: https://github.com/kodi-game/game.libretro.pcsx-rearmed/blob/master/game.libretro.pcsx-rearmed/resources/settings.xml https://docs.libretro.com/library/pcsx_rearmed/

Looks good to me, thank you.

garbear commented 3 years ago

I traced down the git history of the sorted, way back to the beginning, and it was added in 153983a0eb12f3715dddec470e07abe4a709cae4, with no reason for the alphabetizing by setting ID. With no argument against, and one argument for, I think this PR is validated.