{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/52830489","id":52830489,"diff_hunk":"@@ -206,27 +228,43 @@ static void ReadHWRegs(Service::Interface* self) {\n     }\n }\n \n-void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {\n+ResultCode SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {\n+    // TODO: Get rid of ugly result val checking repetitiveness\n+    ResultCode result = RESULT_SUCCESS;\n     u32 base_address = 0x400000;\n     PAddr phys_address_left = Memory::VirtualToPhysicalAddress(info.address_left);\n     PAddr phys_address_right = Memory::VirtualToPhysicalAddress(info.address_right);\n     if (info.active_fb == 0) {\n-        WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left1)), 4,\n-                &phys_address_left);\n-        WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right1)), 4,\n-                &phys_address_right);\n+        result = WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left1)),\n+                              4, &phys_address_left);\n+        if (result != RESULT_SUCCESS)\n+            return result;","path":"src/core/hle/service/gsp_gpu.cpp","position":152,"original_position":158,"commit_id":"d117e3a999f887ed1645b48ca1c4b87fd9fb09fd","original_commit_id":"1f3475c7b5a2fc11a5cf2a4f21ce0cbc39292476","user":{"login":"yuriks","id":341401,"avatar_url":"https://avatars.githubusercontent.com/u/341401?v=3","gravatar_id":"","url":"https://api.github.com/users/yuriks","html_url":"https://github.com/yuriks","followers_url":"https://api.github.com/users/yuriks/followers","following_url":"https://api.github.com/users/yuriks/following{/other_user}","gists_url":"https://api.github.com/users/yuriks/gists{/gist_id}","starred_url":"https://api.github.com/users/yuriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuriks/subscriptions","organizations_url":"https://api.github.com/users/yuriks/orgs","repos_url":"https://api.github.com/users/yuriks/repos","events_url":"https://api.github.com/users/yuriks/events{/privacy}","received_events_url":"https://api.github.com/users/yuriks/received_events","type":"User","site_admin":false},"body":"No, I mean just the register address fixup + write.","created_at":"2016-02-13T17:09:47Z","updated_at":"2016-02-13T17:09:47Z","html_url":"https://github.com/citra-emu/citra/pull/1390#discussion_r52830489","pull_request_url":"https://api.github.com/repos/citra-emu/citra/pulls/1390","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/52830489"},"html":{"href":"https://github.com/citra-emu/citra/pull/1390#discussion_r52830489"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1390"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/1390","id":58203356,"html_url":"https://github.com/citra-emu/citra/pull/1390","diff_url":"https://github.com/citra-emu/citra/pull/1390.diff","patch_url":"https://github.com/citra-emu/citra/pull/1390.patch","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/1390","number":1390,"state":"open","locked":false,"title":"GSP: Return proper error codes for register writes","user":{"login":"purpasmart96","id":8182590,"avatar_url":"https://avatars.githubusercontent.com/u/8182590?v=3","gravatar_id":"","url":"https://api.github.com/users/purpasmart96","html_url":"https://github.com/purpasmart96","followers_url":"https://api.github.com/users/purpasmart96/followers","following_url":"https://api.github.com/users/purpasmart96/following{/other_user}","gists_url":"https://api.github.com/users/purpasmart96/gists{/gist_id}","starred_url":"https://api.github.com/users/purpasmart96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purpasmart96/subscriptions","organizations_url":"https://api.github.com/users/purpasmart96/orgs","repos_url":"https://api.github.com/users/purpasmart96/repos","events_url":"https://api.github.com/users/purpasmart96/events{/privacy}","received_events_url":"https://api.github.com/users/purpasmart96/received_events","type":"User","site_admin":false},"body":"I haven't contributed to citra for a while so if there is anything that breaks the code style just let me know.","created_at":"2016-02-03T21:28:41Z","updated_at":"2016-02-13T17:09:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f576c899fd2488b9bb044109b3121b2e087bd6c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/citra/pulls/1390/commits","review_comments_url":"https://api.github.com/repos/citra-emu/citra/pulls/1390/comments","review_comment_url":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/1390/comments","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/d117e3a999f887ed1645b48ca1c4b87fd9fb09fd","head":{"label":"purpasmart96:citra_gsp_error_codes","ref":"citra_gsp_error_codes","sha":"d117e3a999f887ed1645b48ca1c4b87fd9fb09fd","user":{"login":"purpasmart96","id":8182590,"avatar_url":"https://avatars.githubusercontent.com/u/8182590?v=3","gravatar_id":"","url":"https://api.github.com/users/purpasmart96","html_url":"https://github.com/purpasmart96","followers_url":"https://api.github.com/users/purpasmart96/followers","following_url":"https://api.github.com/users/purpasmart96/following{/other_user}","gists_url":"https://api.github.com/users/purpasmart96/gists{/gist_id}","starred_url":"https://api.github.com/users/purpasmart96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purpasmart96/subscriptions","organizations_url":"https://api.github.com/users/purpasmart96/orgs","repos_url":"https://api.github.com/users/purpasmart96/repos","events_url":"https://api.github.com/users/purpasmart96/events{/privacy}","received_events_url":"https://api.github.com/users/purpasmart96/received_events","type":"User","site_admin":false},"repo":{"id":30088656,"name":"citra","full_name":"purpasmart96/citra","owner":{"login":"purpasmart96","id":8182590,"avatar_url":"https://avatars.githubusercontent.com/u/8182590?v=3","gravatar_id":"","url":"https://api.github.com/users/purpasmart96","html_url":"https://github.com/purpasmart96","followers_url":"https://api.github.com/users/purpasmart96/followers","following_url":"https://api.github.com/users/purpasmart96/following{/other_user}","gists_url":"https://api.github.com/users/purpasmart96/gists{/gist_id}","starred_url":"https://api.github.com/users/purpasmart96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purpasmart96/subscriptions","organizations_url":"https://api.github.com/users/purpasmart96/orgs","repos_url":"https://api.github.com/users/purpasmart96/repos","events_url":"https://api.github.com/users/purpasmart96/events{/privacy}","received_events_url":"https://api.github.com/users/purpasmart96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/purpasmart96/citra","description":"Nintendo 3DS emulator/debugger","fork":true,"url":"https://api.github.com/repos/purpasmart96/citra","forks_url":"https://api.github.com/repos/purpasmart96/citra/forks","keys_url":"https://api.github.com/repos/purpasmart96/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purpasmart96/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purpasmart96/citra/teams","hooks_url":"https://api.github.com/repos/purpasmart96/citra/hooks","issue_events_url":"https://api.github.com/repos/purpasmart96/citra/issues/events{/number}","events_url":"https://api.github.com/repos/purpasmart96/citra/events","assignees_url":"https://api.github.com/repos/purpasmart96/citra/assignees{/user}","branches_url":"https://api.github.com/repos/purpasmart96/citra/branches{/branch}","tags_url":"https://api.github.com/repos/purpasmart96/citra/tags","blobs_url":"https://api.github.com/repos/purpasmart96/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purpasmart96/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purpasmart96/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/purpasmart96/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purpasmart96/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/purpasmart96/citra/languages","stargazers_url":"https://api.github.com/repos/purpasmart96/citra/stargazers","contributors_url":"https://api.github.com/repos/purpasmart96/citra/contributors","subscribers_url":"https://api.github.com/repos/purpasmart96/citra/subscribers","subscription_url":"https://api.github.com/repos/purpasmart96/citra/subscription","commits_url":"https://api.github.com/repos/purpasmart96/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/purpasmart96/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/purpasmart96/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/purpasmart96/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/purpasmart96/citra/contents/{+path}","compare_url":"https://api.github.com/repos/purpasmart96/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purpasmart96/citra/merges","archive_url":"https://api.github.com/repos/purpasmart96/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purpasmart96/citra/downloads","issues_url":"https://api.github.com/repos/purpasmart96/citra/issues{/number}","pulls_url":"https://api.github.com/repos/purpasmart96/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/purpasmart96/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/purpasmart96/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purpasmart96/citra/labels{/name}","releases_url":"https://api.github.com/repos/purpasmart96/citra/releases{/id}","deployments_url":"https://api.github.com/repos/purpasmart96/citra/deployments","created_at":"2015-01-30T20:07:01Z","updated_at":"2015-04-11T08:08:24Z","pushed_at":"2016-02-10T07:20:15Z","git_url":"git://github.com/purpasmart96/citra.git","ssh_url":"git@github.com:purpasmart96/citra.git","clone_url":"https://github.com/purpasmart96/citra.git","svn_url":"https://github.com/purpasmart96/citra","homepage":null,"size":11991,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"service_stubs"}},"base":{"label":"citra-emu:master","ref":"master","sha":"f1d1049c4fdf51fd382f9afb6b5cd5f104e71b0e","user":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":19866730,"name":"citra","full_name":"citra-emu/citra","owner":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citra-emu/citra","description":"Nintendo 3DS emulator/debugger","fork":false,"url":"https://api.github.com/repos/citra-emu/citra","forks_url":"https://api.github.com/repos/citra-emu/citra/forks","keys_url":"https://api.github.com/repos/citra-emu/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citra-emu/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citra-emu/citra/teams","hooks_url":"https://api.github.com/repos/citra-emu/citra/hooks","issue_events_url":"https://api.github.com/repos/citra-emu/citra/issues/events{/number}","events_url":"https://api.github.com/repos/citra-emu/citra/events","assignees_url":"https://api.github.com/repos/citra-emu/citra/assignees{/user}","branches_url":"https://api.github.com/repos/citra-emu/citra/branches{/branch}","tags_url":"https://api.github.com/repos/citra-emu/citra/tags","blobs_url":"https://api.github.com/repos/citra-emu/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citra-emu/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citra-emu/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/citra-emu/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/citra-emu/citra/languages","stargazers_url":"https://api.github.com/repos/citra-emu/citra/stargazers","contributors_url":"https://api.github.com/repos/citra-emu/citra/contributors","subscribers_url":"https://api.github.com/repos/citra-emu/citra/subscribers","subscription_url":"https://api.github.com/repos/citra-emu/citra/subscription","commits_url":"https://api.github.com/repos/citra-emu/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/citra-emu/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/citra-emu/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/citra-emu/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/citra-emu/citra/contents/{+path}","compare_url":"https://api.github.com/repos/citra-emu/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citra-emu/citra/merges","archive_url":"https://api.github.com/repos/citra-emu/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citra-emu/citra/downloads","issues_url":"https://api.github.com/repos/citra-emu/citra/issues{/number}","pulls_url":"https://api.github.com/repos/citra-emu/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/citra-emu/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/citra-emu/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citra-emu/citra/labels{/name}","releases_url":"https://api.github.com/repos/citra-emu/citra/releases{/id}","deployments_url":"https://api.github.com/repos/citra-emu/citra/deployments","created_at":"2014-05-16T18:33:15Z","updated_at":"2016-02-13T16:02:30Z","pushed_at":"2016-02-13T09:16:37Z","git_url":"git://github.com/citra-emu/citra.git","ssh_url":"git@github.com:citra-emu/citra.git","clone_url":"https://github.com/citra-emu/citra.git","svn_url":"https://github.com/citra-emu/citra","homepage":null,"size":18837,"stargazers_count":1505,"watchers_count":1505,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":356,"mirror_url":null,"open_issues_count":151,"forks":356,"open_issues":151,"watchers":1505,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1390"},"html":{"href":"https://github.com/citra-emu/citra/pull/1390"},"issue":{"href":"https://api.github.com/repos/citra-emu/citra/issues/1390"},"comments":{"href":"https://api.github.com/repos/citra-emu/citra/issues/1390/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1390/comments"},"review_comment":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1390/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/citra/statuses/d117e3a999f887ed1645b48ca1c4b87fd9fb09fd"}}}}