{"action":"opened","issue":{"url":"https://api.github.com/repos/libretro/RetroArch/issues/7873","repository_url":"https://api.github.com/repos/libretro/RetroArch","labels_url":"https://api.github.com/repos/libretro/RetroArch/issues/7873/labels{/name}","comments_url":"https://api.github.com/repos/libretro/RetroArch/issues/7873/comments","events_url":"https://api.github.com/repos/libretro/RetroArch/issues/7873/events","html_url":"https://github.com/libretro/RetroArch/issues/7873","id":395306502,"node_id":"MDU6SXNzdWUzOTUzMDY1MDI=","number":7873,"title":"Sorted order in autoconfig profiles broken.","user":{"login":"orbea","id":4204285,"node_id":"MDQ6VXNlcjQyMDQyODU=","avatar_url":"https://avatars2.githubusercontent.com/u/4204285?v=4","gravatar_id":"","url":"https://api.github.com/users/orbea","html_url":"https://github.com/orbea","followers_url":"https://api.github.com/users/orbea/followers","following_url":"https://api.github.com/users/orbea/following{/other_user}","gists_url":"https://api.github.com/users/orbea/gists{/gist_id}","starred_url":"https://api.github.com/users/orbea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbea/subscriptions","organizations_url":"https://api.github.com/users/orbea/orgs","repos_url":"https://api.github.com/users/orbea/repos","events_url":"https://api.github.com/users/orbea/events{/privacy}","received_events_url":"https://api.github.com/users/orbea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-02T16:38:37Z","updated_at":"2019-01-02T16:38:37Z","closed_at":null,"author_association":"COLLABORATOR","body":"## Description\r\n\r\nWhen creating autoconfig profiles they are sorted alphabetically, this is a problem because they should be sorted like in the input settings.\r\n\r\nThis is causing a mess the retroarch-joypad-autoconfig repo.\r\n\r\nSee commit https://github.com/libretro/retroarch-joypad-autoconfig/commit/90508beb83bd241664131d03b89c714b4c34b4af for an example.\r\n\r\n### Expected behavior\r\n\r\nCreated autoconfig files should be sorted like in the input settings.\r\n\r\n### Actual behavior\r\n\r\nCreated autoconfig files are sorted alphabetically.\r\n\r\nFor example:\r\n```\r\ninput_device = \"Sony PLAYSTATION(R)3 Controller\"\r\ninput_driver = \"udev\"\r\ninput_product_id = \"616\"\r\ninput_vendor_id = \"1356\"\r\n```\r\nWhen it should look like.\r\n```\r\ninput_driver = \"udev\"\r\ninput_device = \"Sony PLAYSTATION(R)3 Controller\"\r\ninput_vendor_id = \"1356\"\r\ninput_product_id = \"616\"\r\n```\r\nNow if the the gamepad is actually configured before saving the autoconfig profile this is much more evident.\r\n```\r\ninput_a_btn = \"1\"\r\ninput_b_btn = \"0\"\r\ninput_device = \"Sony PLAYSTATION(R)3 Controller\"\r\ninput_down_btn = \"14\"\r\ninput_driver = \"udev\"\r\ninput_l2_btn = \"6\"\r\ninput_l3_btn = \"11\"\r\ninput_l_btn = \"4\"\r\ninput_l_x_minus_axis = \"-0\"\r\ninput_l_x_plus_axis = \"+0\"\r\ninput_l_y_minus_axis = \"-1\"\r\ninput_l_y_plus_axis = \"+1\"\r\ninput_left_btn = \"15\"\r\ninput_product_id = \"616\"\r\ninput_r2_btn = \"7\"\r\ninput_r3_btn = \"12\"\r\ninput_r_btn = \"5\"\r\ninput_r_x_minus_axis = \"-3\"\r\ninput_r_x_plus_axis = \"+3\"\r\ninput_r_y_minus_axis = \"-4\"\r\ninput_r_y_plus_axis = \"+4\"\r\ninput_right_btn = \"16\"\r\ninput_select_btn = \"8\"\r\ninput_start_btn = \"9\"\r\ninput_up_btn = \"13\"\r\ninput_vendor_id = \"1356\"\r\ninput_x_btn = \"2\"\r\ninput_y_btn = \"3\"\r\n```\r\nIt should look like in this file.\r\n\r\nhttps://github.com/libretro/retroarch-joypad-autoconfig/blob/2e140141b5a2a202e6bec6120897b3a7c36f3e1a/udev/Sony-PlayStation3-DualShock3-Controller-USB.cfg\r\n\r\n### Steps to reproduce the bug\r\n\r\n1. Proceed to `Settings -> Input -> Input User 1 Binds`.\r\n2. Select `User 1 Save Autoconfig`.\r\n3. Examine the new config file.\r\n\r\n### Bisect Results\r\n\r\n```\r\n62e89974afbb6628344fb084c50712bfab4419de is the first bad commit\r\ncommit 62e89974afbb6628344fb084c50712bfab4419de\r\nAuthor: Brad Parker <cbparker@gmail.com>\r\nDate:   Mon Jul 16 00:15:49 2018 -0400\r\n\r\n    sort config file variables\r\n\r\n:040000 040000 8a5a3f0dddd578bb0f023883fbfdb1a8bc33ae86 4f033d0cb587d7b0809d99d3665d9007aaae2d6a M\tlibretro-common\r\n```\r\n62e89974afbb6628344fb084c50712bfab4419de\r\n\r\n### Version/Commit\r\nYou can find this information under Information/System Information\r\n\r\n- RetroArch: https://github.com/libretro/RetroArch/commit/9c5c0aea58aea6d8178edeb891d46fe41a3a7e5e\r\n\r\n### Environment information\r\n\r\n- OS: `Slackware64-current`\r\n- Compiler: `gcc-8.2.0`"}}
{"actor":{"display_login":"orbea"}}