{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/32887923","id":32887923,"diff_hunk":"@@ -0,0 +1,116 @@\n+// Copyright 2008 Dolphin Emulator Project\n+// Licensed under GPLv2+\n+// Refer to the license.txt file included.\n+\n+// This is the library to communicate with Dolphin.\n+\n+#include <cstdint>\n+\n+#ifdef _WIN32\n+\n+#include <tchar.h>\n+\n+typedef uint8_t  u8;\n+typedef uint16_t u16;\n+typedef uint32_t u32;\n+typedef uint64_t u64;\n+\n+typedef int8_t  s8;\n+typedef int16_t s16;\n+typedef int32_t s32;\n+typedef int64_t s64;\n+\n+#else\n+\n+#ifndef GEKKO\n+\n+typedef uint8_t  u8;\n+typedef uint16_t u16;\n+typedef uint32_t u32;\n+typedef uint64_t u64;\n+\n+typedef int8_t  s8;\n+typedef int16_t s16;\n+typedef int32_t s32;\n+typedef int64_t s64;\n+\n+#endif\n+// For using Windows lock code\n+#define TCHAR char\n+#define LONG int\n+\n+#endif // _WIN32\n+\n+\n+enum PadError\n+{\n+\tPAD_ERR_NONE = 0,\n+\tPAD_ERR_NO_CONTROLLER = -1,\n+\tPAD_ERR_NOT_READY = -2,\n+\tPAD_ERR_TRANSFER = -3,\n+};\n+\n+enum\n+{\n+\tPAD_USE_ORIGIN = 0x0080,\n+};\n+\n+enum PadButton\n+{\n+\tPAD_BUTTON_LEFT = 0x0001,\n+\tPAD_BUTTON_RIGHT = 0x0002,\n+\tPAD_BUTTON_DOWN = 0x0004,\n+\tPAD_BUTTON_UP = 0x0008,\n+\tPAD_TRIGGER_Z = 0x0010,\n+\tPAD_TRIGGER_R = 0x0020,\n+\tPAD_TRIGGER_L = 0x0040,\n+\tPAD_BUTTON_A = 0x0100,\n+\tPAD_BUTTON_B = 0x0200,\n+\tPAD_BUTTON_X = 0x0400,\n+\tPAD_BUTTON_Y = 0x0800,\n+\tPAD_BUTTON_START = 0x1000,\n+};\n+\n+struct GCPadStatus\n+{\n+\tu16 button;                 // Or-ed PAD_BUTTON_* and PAD_TRIGGER_* bits\n+\tu8  stickX;                 // 0 <= stickX       <= 255\n+\tu8  stickY;                 // 0 <= stickY       <= 255\n+\tu8  substickX;              // 0 <= substickX    <= 255\n+\tu8  substickY;              // 0 <= substickY    <= 255\n+\tu8  triggerLeft;            // 0 <= triggerLeft  <= 255\n+\tu8  triggerRight;           // 0 <= triggerRight <= 255\n+\tu8  analogA;                // 0 <= analogA      <= 255\n+\tu8  analogB;                // 0 <= analogB      <= 255\n+\ts8  err;                    // one of PAD_ERR_* number\n+\n+\tstatic const u8 MAIN_STICK_CENTER_X = 0x80;\n+\tstatic const u8 MAIN_STICK_CENTER_Y = 0x80;\n+\tstatic const u8 MAIN_STICK_RADIUS = 0x7f;\n+\tstatic const u8 C_STICK_CENTER_X = 0x80;\n+\tstatic const u8 C_STICK_CENTER_Y = 0x80;\n+\tstatic const u8 C_STICK_RADIUS = 0x7f;\n+};\n+\n+#define PIPE_NAME \"\\\\\\\\.\\\\pipe\\\\DolphinIPC\"\n+#define EMPTY_CONTROL GCPadStatus()\n+\n+namespace Dolphin\n+{\n+\tbool   Init();\n+\tvoid   SetFrameCallback(void(*)());\n+\tint    StartLoop();\n+\n+\tu8     Read8(u32);\n+\tu16    Read16(u32);\n+\tu32    Read32(u32);\n+\tu64    Read64(u32);\n+\n+\tvoid   Write8(u32, u8);\n+\tvoid   Write16(u32, u16);\n+\tvoid   Write32(u32, u32);\n+\tvoid   Write64(u32, u64);\n+\n+\tvoid   QueueInput(struct GCPadStatus);\n+\tu64*   InterpretInput(struct GCPadStatus);","path":"Source/libDolphin/libDolphin.h","position":115,"original_position":115,"commit_id":"f4c1a85a889c2be49d82457d7948efb6bb404396","original_commit_id":"f4c1a85a889c2be49d82457d7948efb6bb404396","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"body":"const reference. Also struct isn't necessary.","created_at":"2015-06-20T20:42:36Z","updated_at":"2015-06-20T20:42:36Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/2634#discussion_r32887923","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/32887923"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/2634#discussion_r32887923"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634","id":38172707,"html_url":"https://github.com/dolphin-emu/dolphin/pull/2634","diff_url":"https://github.com/dolphin-emu/dolphin/pull/2634.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/2634.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2634","number":2634,"state":"open","locked":false,"title":"Preliminary version of libDolphin API.","user":{"login":"TechNick6425","id":4972611,"avatar_url":"https://avatars.githubusercontent.com/u/4972611?v=3","gravatar_id":"","url":"https://api.github.com/users/TechNick6425","html_url":"https://github.com/TechNick6425","followers_url":"https://api.github.com/users/TechNick6425/followers","following_url":"https://api.github.com/users/TechNick6425/following{/other_user}","gists_url":"https://api.github.com/users/TechNick6425/gists{/gist_id}","starred_url":"https://api.github.com/users/TechNick6425/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechNick6425/subscriptions","organizations_url":"https://api.github.com/users/TechNick6425/orgs","repos_url":"https://api.github.com/users/TechNick6425/repos","events_url":"https://api.github.com/users/TechNick6425/events{/privacy}","received_events_url":"https://api.github.com/users/TechNick6425/received_events","type":"User","site_admin":false},"body":"A simple version of libDolphin\r\n(https://docs.google.com/document/d/1KFOlRlp0a7gpgEJXaw0PGwaoNird1uqO4RZtcmmiA9c/edit)\r\nwritten as a library (added to solution) and a modification of the main\r\nemulator. A simple input handler was included, allowing other processes\r\nto submit input to Dolphin. Also allows reading RAM values from current\r\ngame.\r\n\r\nRestrictions:\r\n- Only Windows (at the moment)\r\n- It builds, but hasn't been tested","created_at":"2015-06-20T19:09:45Z","updated_at":"2015-06-20T20:42:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e675474a85d09c6065e1f3cf4e8ca664d658fa3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2634/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/f4c1a85a889c2be49d82457d7948efb6bb404396","head":{"label":"TechNick6425:master","ref":"master","sha":"f4c1a85a889c2be49d82457d7948efb6bb404396","user":{"login":"TechNick6425","id":4972611,"avatar_url":"https://avatars.githubusercontent.com/u/4972611?v=3","gravatar_id":"","url":"https://api.github.com/users/TechNick6425","html_url":"https://github.com/TechNick6425","followers_url":"https://api.github.com/users/TechNick6425/followers","following_url":"https://api.github.com/users/TechNick6425/following{/other_user}","gists_url":"https://api.github.com/users/TechNick6425/gists{/gist_id}","starred_url":"https://api.github.com/users/TechNick6425/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechNick6425/subscriptions","organizations_url":"https://api.github.com/users/TechNick6425/orgs","repos_url":"https://api.github.com/users/TechNick6425/repos","events_url":"https://api.github.com/users/TechNick6425/events{/privacy}","received_events_url":"https://api.github.com/users/TechNick6425/received_events","type":"User","site_admin":false},"repo":{"id":37722113,"name":"dolphin","full_name":"TechNick6425/dolphin","owner":{"login":"TechNick6425","id":4972611,"avatar_url":"https://avatars.githubusercontent.com/u/4972611?v=3","gravatar_id":"","url":"https://api.github.com/users/TechNick6425","html_url":"https://github.com/TechNick6425","followers_url":"https://api.github.com/users/TechNick6425/followers","following_url":"https://api.github.com/users/TechNick6425/following{/other_user}","gists_url":"https://api.github.com/users/TechNick6425/gists{/gist_id}","starred_url":"https://api.github.com/users/TechNick6425/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechNick6425/subscriptions","organizations_url":"https://api.github.com/users/TechNick6425/orgs","repos_url":"https://api.github.com/users/TechNick6425/repos","events_url":"https://api.github.com/users/TechNick6425/events{/privacy}","received_events_url":"https://api.github.com/users/TechNick6425/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TechNick6425/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":true,"url":"https://api.github.com/repos/TechNick6425/dolphin","forks_url":"https://api.github.com/repos/TechNick6425/dolphin/forks","keys_url":"https://api.github.com/repos/TechNick6425/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TechNick6425/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TechNick6425/dolphin/teams","hooks_url":"https://api.github.com/repos/TechNick6425/dolphin/hooks","issue_events_url":"https://api.github.com/repos/TechNick6425/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/TechNick6425/dolphin/events","assignees_url":"https://api.github.com/repos/TechNick6425/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/TechNick6425/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/TechNick6425/dolphin/tags","blobs_url":"https://api.github.com/repos/TechNick6425/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TechNick6425/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TechNick6425/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/TechNick6425/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TechNick6425/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/TechNick6425/dolphin/languages","stargazers_url":"https://api.github.com/repos/TechNick6425/dolphin/stargazers","contributors_url":"https://api.github.com/repos/TechNick6425/dolphin/contributors","subscribers_url":"https://api.github.com/repos/TechNick6425/dolphin/subscribers","subscription_url":"https://api.github.com/repos/TechNick6425/dolphin/subscription","commits_url":"https://api.github.com/repos/TechNick6425/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/TechNick6425/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/TechNick6425/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/TechNick6425/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/TechNick6425/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/TechNick6425/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TechNick6425/dolphin/merges","archive_url":"https://api.github.com/repos/TechNick6425/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TechNick6425/dolphin/downloads","issues_url":"https://api.github.com/repos/TechNick6425/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/TechNick6425/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/TechNick6425/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/TechNick6425/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TechNick6425/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/TechNick6425/dolphin/releases{/id}","created_at":"2015-06-19T13:05:08Z","updated_at":"2015-06-19T13:05:30Z","pushed_at":"2015-06-20T19:05:18Z","git_url":"git://github.com/TechNick6425/dolphin.git","ssh_url":"git@github.com:TechNick6425/dolphin.git","clone_url":"https://github.com/TechNick6425/dolphin.git","svn_url":"https://github.com/TechNick6425/dolphin","homepage":"https://dolphin-emu.org/","size":222504,"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":"dolphin-emu:master","ref":"master","sha":"1003d08d8169e18ac8dad5055690dab8bd0e68ce","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","created_at":"2013-07-22T09:07:57Z","updated_at":"2015-06-20T18:15:15Z","pushed_at":"2015-06-20T19:09:45Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":"https://dolphin-emu.org/","size":294738,"stargazers_count":1439,"watchers_count":1439,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":443,"mirror_url":null,"open_issues_count":52,"forks":443,"open_issues":52,"watchers":1439,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/2634"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2634"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2634/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2634/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/f4c1a85a889c2be49d82457d7948efb6bb404396"}}}}