{"action":"created","comment":{"url":"https://api.github.com/repos/libretro/RetroArch/pulls/comments/81474749","pull_request_review_id":2453004,"id":81474749,"diff_hunk":"@@ -976,6 +976,19 @@ struct retro_hw_render_context_negotiation_interface\n                                             * so it will be used after SET_HW_RENDER, but before the context_reset callback.\n                                             */\n \n+struct retro_resource\n+{\n+   const char *rel_path;\n+   const char *base_path;\n+};\n+\n+#define RETRO_ENVIRONMENT_GET_RESOURCE_DIRECTORY 44\n+                                           /* struct retro_resource * --\n+                                            * Interface to acquire resource paths by a relative filename.\n+                                            * 'rel_path' should be set to a filename relative to the system directory.\n+                                            * 'base_path' will be set to the base path containing the resource or NULL if unknown.","path":"libretro-common/include/libretro.h","position":14,"original_position":14,"commit_id":"fdaec90a22c36ceaca22b6f289abee8b0f3ebf34","original_commit_id":"fdaec90a22c36ceaca22b6f289abee8b0f3ebf34","user":{"login":"garbear","id":531482,"avatar_url":"https://avatars.githubusercontent.com/u/531482?v=3","gravatar_id":"","url":"https://api.github.com/users/garbear","html_url":"https://github.com/garbear","followers_url":"https://api.github.com/users/garbear/followers","following_url":"https://api.github.com/users/garbear/following{/other_user}","gists_url":"https://api.github.com/users/garbear/gists{/gist_id}","starred_url":"https://api.github.com/users/garbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbear/subscriptions","organizations_url":"https://api.github.com/users/garbear/orgs","repos_url":"https://api.github.com/users/garbear/repos","events_url":"https://api.github.com/users/garbear/events{/privacy}","received_events_url":"https://api.github.com/users/garbear/received_events","type":"User","site_admin":false},"body":"Yup, should be directory.\r\n\r\nI wasn't sure of the best verbiage for this feature, so I called them \"Resource directories\" instead of \"Per-file system directories\". Let me know if anything else is confusing/misleading.","created_at":"2016-10-02T18:21:01Z","updated_at":"2016-10-02T18:21:01Z","html_url":"https://github.com/libretro/RetroArch/pull/3713#discussion_r81474749","pull_request_url":"https://api.github.com/repos/libretro/RetroArch/pulls/3713","_links":{"self":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/comments/81474749"},"html":{"href":"https://github.com/libretro/RetroArch/pull/3713#discussion_r81474749"},"pull_request":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/3713"}}},"pull_request":{"url":"https://api.github.com/repos/libretro/RetroArch/pulls/3713","id":87641281,"html_url":"https://github.com/libretro/RetroArch/pull/3713","diff_url":"https://github.com/libretro/RetroArch/pull/3713.diff","patch_url":"https://github.com/libretro/RetroArch/pull/3713.patch","issue_url":"https://api.github.com/repos/libretro/RetroArch/issues/3713","number":3713,"state":"open","locked":false,"title":"libretro API: Multiple system directories","user":{"login":"garbear","id":531482,"avatar_url":"https://avatars.githubusercontent.com/u/531482?v=3","gravatar_id":"","url":"https://api.github.com/users/garbear","html_url":"https://github.com/garbear","followers_url":"https://api.github.com/users/garbear/followers","following_url":"https://api.github.com/users/garbear/following{/other_user}","gists_url":"https://api.github.com/users/garbear/gists{/gist_id}","starred_url":"https://api.github.com/users/garbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbear/subscriptions","organizations_url":"https://api.github.com/users/garbear/orgs","repos_url":"https://api.github.com/users/garbear/repos","events_url":"https://api.github.com/users/garbear/events{/privacy}","received_events_url":"https://api.github.com/users/garbear/received_events","type":"User","site_admin":false},"body":"I'm trying to tackle the copyright-restricted BIOSes issue in Kodi. My solution is to add a second system directory for restricted files. That way, nonrestricted files can be distributed with the libretro core for maximum out-of-the-box compatibility, while still allowing alternative sources for restricted content.\r\n\r\nI've added an environment command that retrieves the correct system directory for a specified file. This degrades gracefully in RetroArch, where the original system directory is returned for all files. In the future, RetroArch could add support for multiple system directories to allow the separation of free and restricted content.\r\n\r\nI've implemented the new environment command in two cores:\r\n\r\n* [Genesis Plus GX](https://github.com/kodi-game/Genesis-Plus-GX/commit/resources)\r\n* [BlueMSX](https://github.com/kodi-game/blueMSX-libretro/commit/resources)\r\n\r\nThese examples show that core modifications can be minor and constrained to the libretro-specific code.","created_at":"2016-10-02T18:09:11Z","updated_at":"2016-10-02T18:21:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a893755dbaebf4e91548fa15bc5323dfd60e407","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/libretro/RetroArch/pulls/3713/commits","review_comments_url":"https://api.github.com/repos/libretro/RetroArch/pulls/3713/comments","review_comment_url":"https://api.github.com/repos/libretro/RetroArch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libretro/RetroArch/issues/3713/comments","statuses_url":"https://api.github.com/repos/libretro/RetroArch/statuses/fdaec90a22c36ceaca22b6f289abee8b0f3ebf34","head":{"label":"garbear:resources","ref":"resources","sha":"fdaec90a22c36ceaca22b6f289abee8b0f3ebf34","user":{"login":"garbear","id":531482,"avatar_url":"https://avatars.githubusercontent.com/u/531482?v=3","gravatar_id":"","url":"https://api.github.com/users/garbear","html_url":"https://github.com/garbear","followers_url":"https://api.github.com/users/garbear/followers","following_url":"https://api.github.com/users/garbear/following{/other_user}","gists_url":"https://api.github.com/users/garbear/gists{/gist_id}","starred_url":"https://api.github.com/users/garbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbear/subscriptions","organizations_url":"https://api.github.com/users/garbear/orgs","repos_url":"https://api.github.com/users/garbear/repos","events_url":"https://api.github.com/users/garbear/events{/privacy}","received_events_url":"https://api.github.com/users/garbear/received_events","type":"User","site_admin":false},"repo":{"id":69779330,"name":"RetroArch","full_name":"garbear/RetroArch","owner":{"login":"garbear","id":531482,"avatar_url":"https://avatars.githubusercontent.com/u/531482?v=3","gravatar_id":"","url":"https://api.github.com/users/garbear","html_url":"https://github.com/garbear","followers_url":"https://api.github.com/users/garbear/followers","following_url":"https://api.github.com/users/garbear/following{/other_user}","gists_url":"https://api.github.com/users/garbear/gists{/gist_id}","starred_url":"https://api.github.com/users/garbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garbear/subscriptions","organizations_url":"https://api.github.com/users/garbear/orgs","repos_url":"https://api.github.com/users/garbear/repos","events_url":"https://api.github.com/users/garbear/events{/privacy}","received_events_url":"https://api.github.com/users/garbear/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garbear/RetroArch","description":"Cross-platform, sophisticated frontend for the libretro API.","fork":true,"url":"https://api.github.com/repos/garbear/RetroArch","forks_url":"https://api.github.com/repos/garbear/RetroArch/forks","keys_url":"https://api.github.com/repos/garbear/RetroArch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garbear/RetroArch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garbear/RetroArch/teams","hooks_url":"https://api.github.com/repos/garbear/RetroArch/hooks","issue_events_url":"https://api.github.com/repos/garbear/RetroArch/issues/events{/number}","events_url":"https://api.github.com/repos/garbear/RetroArch/events","assignees_url":"https://api.github.com/repos/garbear/RetroArch/assignees{/user}","branches_url":"https://api.github.com/repos/garbear/RetroArch/branches{/branch}","tags_url":"https://api.github.com/repos/garbear/RetroArch/tags","blobs_url":"https://api.github.com/repos/garbear/RetroArch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garbear/RetroArch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garbear/RetroArch/git/refs{/sha}","trees_url":"https://api.github.com/repos/garbear/RetroArch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garbear/RetroArch/statuses/{sha}","languages_url":"https://api.github.com/repos/garbear/RetroArch/languages","stargazers_url":"https://api.github.com/repos/garbear/RetroArch/stargazers","contributors_url":"https://api.github.com/repos/garbear/RetroArch/contributors","subscribers_url":"https://api.github.com/repos/garbear/RetroArch/subscribers","subscription_url":"https://api.github.com/repos/garbear/RetroArch/subscription","commits_url":"https://api.github.com/repos/garbear/RetroArch/commits{/sha}","git_commits_url":"https://api.github.com/repos/garbear/RetroArch/git/commits{/sha}","comments_url":"https://api.github.com/repos/garbear/RetroArch/comments{/number}","issue_comment_url":"https://api.github.com/repos/garbear/RetroArch/issues/comments{/number}","contents_url":"https://api.github.com/repos/garbear/RetroArch/contents/{+path}","compare_url":"https://api.github.com/repos/garbear/RetroArch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garbear/RetroArch/merges","archive_url":"https://api.github.com/repos/garbear/RetroArch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garbear/RetroArch/downloads","issues_url":"https://api.github.com/repos/garbear/RetroArch/issues{/number}","pulls_url":"https://api.github.com/repos/garbear/RetroArch/pulls{/number}","milestones_url":"https://api.github.com/repos/garbear/RetroArch/milestones{/number}","notifications_url":"https://api.github.com/repos/garbear/RetroArch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garbear/RetroArch/labels{/name}","releases_url":"https://api.github.com/repos/garbear/RetroArch/releases{/id}","deployments_url":"https://api.github.com/repos/garbear/RetroArch/deployments","created_at":"2016-10-02T04:44:38Z","updated_at":"2016-10-02T04:44:46Z","pushed_at":"2016-10-02T05:04:26Z","git_url":"git://github.com/garbear/RetroArch.git","ssh_url":"git@github.com:garbear/RetroArch.git","clone_url":"https://github.com/garbear/RetroArch.git","svn_url":"https://github.com/garbear/RetroArch","homepage":"http://www.libretro.com","size":114629,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libretro:master","ref":"master","sha":"50a6c534322da478e5b72fadc68c1bec0ff01aa7","user":{"login":"libretro","id":1812827,"avatar_url":"https://avatars.githubusercontent.com/u/1812827?v=3","gravatar_id":"","url":"https://api.github.com/users/libretro","html_url":"https://github.com/libretro","followers_url":"https://api.github.com/users/libretro/followers","following_url":"https://api.github.com/users/libretro/following{/other_user}","gists_url":"https://api.github.com/users/libretro/gists{/gist_id}","starred_url":"https://api.github.com/users/libretro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libretro/subscriptions","organizations_url":"https://api.github.com/users/libretro/orgs","repos_url":"https://api.github.com/users/libretro/repos","events_url":"https://api.github.com/users/libretro/events{/privacy}","received_events_url":"https://api.github.com/users/libretro/received_events","type":"Organization","site_admin":false},"repo":{"id":689344,"name":"RetroArch","full_name":"libretro/RetroArch","owner":{"login":"libretro","id":1812827,"avatar_url":"https://avatars.githubusercontent.com/u/1812827?v=3","gravatar_id":"","url":"https://api.github.com/users/libretro","html_url":"https://github.com/libretro","followers_url":"https://api.github.com/users/libretro/followers","following_url":"https://api.github.com/users/libretro/following{/other_user}","gists_url":"https://api.github.com/users/libretro/gists{/gist_id}","starred_url":"https://api.github.com/users/libretro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libretro/subscriptions","organizations_url":"https://api.github.com/users/libretro/orgs","repos_url":"https://api.github.com/users/libretro/repos","events_url":"https://api.github.com/users/libretro/events{/privacy}","received_events_url":"https://api.github.com/users/libretro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libretro/RetroArch","description":"Cross-platform, sophisticated frontend for the libretro API.","fork":false,"url":"https://api.github.com/repos/libretro/RetroArch","forks_url":"https://api.github.com/repos/libretro/RetroArch/forks","keys_url":"https://api.github.com/repos/libretro/RetroArch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libretro/RetroArch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libretro/RetroArch/teams","hooks_url":"https://api.github.com/repos/libretro/RetroArch/hooks","issue_events_url":"https://api.github.com/repos/libretro/RetroArch/issues/events{/number}","events_url":"https://api.github.com/repos/libretro/RetroArch/events","assignees_url":"https://api.github.com/repos/libretro/RetroArch/assignees{/user}","branches_url":"https://api.github.com/repos/libretro/RetroArch/branches{/branch}","tags_url":"https://api.github.com/repos/libretro/RetroArch/tags","blobs_url":"https://api.github.com/repos/libretro/RetroArch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libretro/RetroArch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libretro/RetroArch/git/refs{/sha}","trees_url":"https://api.github.com/repos/libretro/RetroArch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libretro/RetroArch/statuses/{sha}","languages_url":"https://api.github.com/repos/libretro/RetroArch/languages","stargazers_url":"https://api.github.com/repos/libretro/RetroArch/stargazers","contributors_url":"https://api.github.com/repos/libretro/RetroArch/contributors","subscribers_url":"https://api.github.com/repos/libretro/RetroArch/subscribers","subscription_url":"https://api.github.com/repos/libretro/RetroArch/subscription","commits_url":"https://api.github.com/repos/libretro/RetroArch/commits{/sha}","git_commits_url":"https://api.github.com/repos/libretro/RetroArch/git/commits{/sha}","comments_url":"https://api.github.com/repos/libretro/RetroArch/comments{/number}","issue_comment_url":"https://api.github.com/repos/libretro/RetroArch/issues/comments{/number}","contents_url":"https://api.github.com/repos/libretro/RetroArch/contents/{+path}","compare_url":"https://api.github.com/repos/libretro/RetroArch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libretro/RetroArch/merges","archive_url":"https://api.github.com/repos/libretro/RetroArch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libretro/RetroArch/downloads","issues_url":"https://api.github.com/repos/libretro/RetroArch/issues{/number}","pulls_url":"https://api.github.com/repos/libretro/RetroArch/pulls{/number}","milestones_url":"https://api.github.com/repos/libretro/RetroArch/milestones{/number}","notifications_url":"https://api.github.com/repos/libretro/RetroArch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libretro/RetroArch/labels{/name}","releases_url":"https://api.github.com/repos/libretro/RetroArch/releases{/id}","deployments_url":"https://api.github.com/repos/libretro/RetroArch/deployments","created_at":"2010-05-27T14:47:40Z","updated_at":"2016-10-02T17:54:24Z","pushed_at":"2016-10-02T18:16:45Z","git_url":"git://github.com/libretro/RetroArch.git","ssh_url":"git@github.com:libretro/RetroArch.git","clone_url":"https://github.com/libretro/RetroArch.git","svn_url":"https://github.com/libretro/RetroArch","homepage":"http://www.libretro.com","size":130774,"stargazers_count":1301,"watchers_count":1301,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":408,"mirror_url":null,"open_issues_count":288,"forks":408,"open_issues":288,"watchers":1301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/3713"},"html":{"href":"https://github.com/libretro/RetroArch/pull/3713"},"issue":{"href":"https://api.github.com/repos/libretro/RetroArch/issues/3713"},"comments":{"href":"https://api.github.com/repos/libretro/RetroArch/issues/3713/comments"},"review_comments":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/3713/comments"},"review_comment":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/3713/commits"},"statuses":{"href":"https://api.github.com/repos/libretro/RetroArch/statuses/fdaec90a22c36ceaca22b6f289abee8b0f3ebf34"}}}}
{"actor":{"display_login":"garbear"}}