{"action":"created","comment":{"url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/comments/136511214","pull_request_review_id":60059998,"id":136511214,"diff_hunk":"@@ -20,27 +88,64 @@ FileData* GridGameListView::getCursor()\n \n void GridGameListView::setCursor(FileData* file)\n {\n-\tif(!mGrid.setCursor(file))\n+\tif(!mGrid.setCursor(file) && mGrid.getEntryCount() > 0)\n \t{\n-\t\tpopulateList(file->getParent()->getChildrenListToDisplay());\n+\t\tpopulateList(file->getParent()->getChildren());\n \t\tmGrid.setCursor(file);\n+\t\tmTitle.setText(file->getName());\n \t}\n }\n \n bool GridGameListView::input(InputConfig* config, Input input)\n {\n-\tif(config->isMappedTo(\"left\", input) || config->isMappedTo(\"right\", input))\n+\tif (config->isMappedTo(\"left\", input) || config->isMappedTo(\"right\", input)\n+\t    || config->isMappedTo(\"up\", input) || config->isMappedTo(\"down\", input)) {\n+\t\t// Quick and dirty way of changing header title without doing in update()\n+\t\tmTitle.setText(mGrid.getSelectedName());\n+\t\tupdateInfoPanel();\n+\n+\t\t// Destroy dpad input so mGrid can use it.\n \t\treturn GuiComponent::input(config, input);\n+\t}\n \n \treturn ISimpleGameListView::input(config, input);\n }\n \n+void GridGameListView::update(int deltatime) {\n+\tif (!bFocused)\n+\t\treturn;\n+\n+\t// For Loading in game art as the user clicks on the system. \n+\t// Loads one per frame, or if specified to load on frame x.\n+\tif (mLoadFrame >= mLoadFrameKey) {\n+\t\tmGrid.dynamicImageLoader();\n+\t\tmLoadFrame = 0;\n+\t}\n+\n+\tmDescContainer.update(deltatime);\n+\tmLoadFrame++;\n+\n+\tmGrid.update(deltatime);\n+\n+\tif (mSystemQuickChangeCoolDown < 30)\n+\t\tmSystemQuickChangeCoolDown++;\n+}\n+\n void GridGameListView::populateList(const std::vector<FileData*>& files)\n {\n-\tmGrid.clear();\n-\tfor(auto it = files.begin(); it != files.end(); it++)\n-\t{\n-\t\tmGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it);\n+\t// If list is already populated, return.\n+\tif (mGrid.getEntryCount() != files.size()) {","path":"es-app/src/views/gamelist/GridGameListView.cpp","position":145,"original_position":149,"commit_id":"2047150cdd158b0b9699db2c1da2014673c902fa","original_commit_id":"1b767eae1f5e62d57b0c6233bb655bfff672bbc3","user":{"login":"zigurana","id":6103768,"avatar_url":"https://avatars3.githubusercontent.com/u/6103768?v=4","gravatar_id":"","url":"https://api.github.com/users/zigurana","html_url":"https://github.com/zigurana","followers_url":"https://api.github.com/users/zigurana/followers","following_url":"https://api.github.com/users/zigurana/following{/other_user}","gists_url":"https://api.github.com/users/zigurana/gists{/gist_id}","starred_url":"https://api.github.com/users/zigurana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zigurana/subscriptions","organizations_url":"https://api.github.com/users/zigurana/orgs","repos_url":"https://api.github.com/users/zigurana/repos","events_url":"https://api.github.com/users/zigurana/events{/privacy}","received_events_url":"https://api.github.com/users/zigurana/received_events","type":"User","site_admin":false},"body":"I am mostly just surprised that we *have* to check whether or not to populate the list at all. The populateList() is only called internally, right? Upon construction and with a cursor change (might come from another system, or in a subfolder). So the caller should have a pretty good idea if the call is warranted or not. Is it such a costly methods that we need to guard against too many calls?","created_at":"2017-09-01T07:04:17Z","updated_at":"2017-09-01T07:04:17Z","html_url":"https://github.com/RetroPie/EmulationStation/pull/203#discussion_r136511214","pull_request_url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/comments/136511214"},"html":{"href":"https://github.com/RetroPie/EmulationStation/pull/203#discussion_r136511214"},"pull_request":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203"}},"in_reply_to_id":133811197},"pull_request":{"url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203","id":134241681,"html_url":"https://github.com/RetroPie/EmulationStation/pull/203","diff_url":"https://github.com/RetroPie/EmulationStation/pull/203.diff","patch_url":"https://github.com/RetroPie/EmulationStation/pull/203.patch","issue_url":"https://api.github.com/repos/RetroPie/EmulationStation/issues/203","number":203,"state":"open","locked":false,"title":"GridView","user":{"login":"Koerty","id":24305945,"avatar_url":"https://avatars3.githubusercontent.com/u/24305945?v=4","gravatar_id":"","url":"https://api.github.com/users/Koerty","html_url":"https://github.com/Koerty","followers_url":"https://api.github.com/users/Koerty/followers","following_url":"https://api.github.com/users/Koerty/following{/other_user}","gists_url":"https://api.github.com/users/Koerty/gists{/gist_id}","starred_url":"https://api.github.com/users/Koerty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Koerty/subscriptions","organizations_url":"https://api.github.com/users/Koerty/orgs","repos_url":"https://api.github.com/users/Koerty/repos","events_url":"https://api.github.com/users/Koerty/events{/privacy}","received_events_url":"https://api.github.com/users/Koerty/received_events","type":"User","site_admin":false},"body":"Integration of the lastest version of Jacofk20's GridView.\r\n\r\n![screenshot](https://user-images.githubusercontent.com/24305945/28986464-63b46b1c-7967-11e7-963b-04419d09ca21.png)\r\n(screenshot of the GridView shipped with this pull requests, using material theme from @lilbud )\r\n\r\nThe only difference is I've enabled system switch with LeftShoulder and RightShoulder for all the game views (even if it's only displayed on gridview's system help atm). The reason is for now if you enable the gridview you have it for every system, but I plan on adding more control for the user on views (maybe allow him to choose a different view for every system individually, or a second automatic option but choosing automatically between grid and basic view instead of detailed and basic view like it is atm, idk yet I need to think more about it). So, only allowing him to switch with LeftShoulder and RightShoulder on gridview kinda break the flow every time he encounter another kind of view (idk why Jacobfk20 did this it's kinda weird).\r\n\r\nI will start working on better integration, refactoring, optimization, more features for gridview ..... but will ship them separatly in different pull requests, since this one is already big enough.","created_at":"2017-08-04T20:06:31Z","updated_at":"2017-09-01T07:04:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fafbeee5f07f937b42cfab519626bf3f8de8b420","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203/commits","review_comments_url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203/comments","review_comment_url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RetroPie/EmulationStation/issues/203/comments","statuses_url":"https://api.github.com/repos/RetroPie/EmulationStation/statuses/2047150cdd158b0b9699db2c1da2014673c902fa","head":{"label":"Koerty:GridView","ref":"GridView","sha":"2047150cdd158b0b9699db2c1da2014673c902fa","user":{"login":"Koerty","id":24305945,"avatar_url":"https://avatars3.githubusercontent.com/u/24305945?v=4","gravatar_id":"","url":"https://api.github.com/users/Koerty","html_url":"https://github.com/Koerty","followers_url":"https://api.github.com/users/Koerty/followers","following_url":"https://api.github.com/users/Koerty/following{/other_user}","gists_url":"https://api.github.com/users/Koerty/gists{/gist_id}","starred_url":"https://api.github.com/users/Koerty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Koerty/subscriptions","organizations_url":"https://api.github.com/users/Koerty/orgs","repos_url":"https://api.github.com/users/Koerty/repos","events_url":"https://api.github.com/users/Koerty/events{/privacy}","received_events_url":"https://api.github.com/users/Koerty/received_events","type":"User","site_admin":false},"repo":{"id":99260068,"name":"EmulationStation","full_name":"Koerty/EmulationStation","owner":{"login":"Koerty","id":24305945,"avatar_url":"https://avatars3.githubusercontent.com/u/24305945?v=4","gravatar_id":"","url":"https://api.github.com/users/Koerty","html_url":"https://github.com/Koerty","followers_url":"https://api.github.com/users/Koerty/followers","following_url":"https://api.github.com/users/Koerty/following{/other_user}","gists_url":"https://api.github.com/users/Koerty/gists{/gist_id}","starred_url":"https://api.github.com/users/Koerty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Koerty/subscriptions","organizations_url":"https://api.github.com/users/Koerty/orgs","repos_url":"https://api.github.com/users/Koerty/repos","events_url":"https://api.github.com/users/Koerty/events{/privacy}","received_events_url":"https://api.github.com/users/Koerty/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Koerty/EmulationStation","description":"A Fork of Emulation Station for RetroPie. Emulation Station is a flexible emulator front-end supporting keyboardless navigation and custom system themes.","fork":true,"url":"https://api.github.com/repos/Koerty/EmulationStation","forks_url":"https://api.github.com/repos/Koerty/EmulationStation/forks","keys_url":"https://api.github.com/repos/Koerty/EmulationStation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Koerty/EmulationStation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Koerty/EmulationStation/teams","hooks_url":"https://api.github.com/repos/Koerty/EmulationStation/hooks","issue_events_url":"https://api.github.com/repos/Koerty/EmulationStation/issues/events{/number}","events_url":"https://api.github.com/repos/Koerty/EmulationStation/events","assignees_url":"https://api.github.com/repos/Koerty/EmulationStation/assignees{/user}","branches_url":"https://api.github.com/repos/Koerty/EmulationStation/branches{/branch}","tags_url":"https://api.github.com/repos/Koerty/EmulationStation/tags","blobs_url":"https://api.github.com/repos/Koerty/EmulationStation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Koerty/EmulationStation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Koerty/EmulationStation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Koerty/EmulationStation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Koerty/EmulationStation/statuses/{sha}","languages_url":"https://api.github.com/repos/Koerty/EmulationStation/languages","stargazers_url":"https://api.github.com/repos/Koerty/EmulationStation/stargazers","contributors_url":"https://api.github.com/repos/Koerty/EmulationStation/contributors","subscribers_url":"https://api.github.com/repos/Koerty/EmulationStation/subscribers","subscription_url":"https://api.github.com/repos/Koerty/EmulationStation/subscription","commits_url":"https://api.github.com/repos/Koerty/EmulationStation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Koerty/EmulationStation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Koerty/EmulationStation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Koerty/EmulationStation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Koerty/EmulationStation/contents/{+path}","compare_url":"https://api.github.com/repos/Koerty/EmulationStation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Koerty/EmulationStation/merges","archive_url":"https://api.github.com/repos/Koerty/EmulationStation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Koerty/EmulationStation/downloads","issues_url":"https://api.github.com/repos/Koerty/EmulationStation/issues{/number}","pulls_url":"https://api.github.com/repos/Koerty/EmulationStation/pulls{/number}","milestones_url":"https://api.github.com/repos/Koerty/EmulationStation/milestones{/number}","notifications_url":"https://api.github.com/repos/Koerty/EmulationStation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Koerty/EmulationStation/labels{/name}","releases_url":"https://api.github.com/repos/Koerty/EmulationStation/releases{/id}","deployments_url":"https://api.github.com/repos/Koerty/EmulationStation/deployments","created_at":"2017-08-03T17:48:20Z","updated_at":"2017-08-03T17:48:22Z","pushed_at":"2017-08-31T21:40:06Z","git_url":"git://github.com/Koerty/EmulationStation.git","ssh_url":"git@github.com:Koerty/EmulationStation.git","clone_url":"https://github.com/Koerty/EmulationStation.git","svn_url":"https://github.com/Koerty/EmulationStation","homepage":"","size":7726,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"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":"RetroPie:master","ref":"master","sha":"471b1e66a607190352148b652fc68c6e7ac6dfbf","user":{"login":"RetroPie","id":11378204,"avatar_url":"https://avatars1.githubusercontent.com/u/11378204?v=4","gravatar_id":"","url":"https://api.github.com/users/RetroPie","html_url":"https://github.com/RetroPie","followers_url":"https://api.github.com/users/RetroPie/followers","following_url":"https://api.github.com/users/RetroPie/following{/other_user}","gists_url":"https://api.github.com/users/RetroPie/gists{/gist_id}","starred_url":"https://api.github.com/users/RetroPie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RetroPie/subscriptions","organizations_url":"https://api.github.com/users/RetroPie/orgs","repos_url":"https://api.github.com/users/RetroPie/repos","events_url":"https://api.github.com/users/RetroPie/events{/privacy}","received_events_url":"https://api.github.com/users/RetroPie/received_events","type":"Organization","site_admin":false},"repo":{"id":34201178,"name":"EmulationStation","full_name":"RetroPie/EmulationStation","owner":{"login":"RetroPie","id":11378204,"avatar_url":"https://avatars1.githubusercontent.com/u/11378204?v=4","gravatar_id":"","url":"https://api.github.com/users/RetroPie","html_url":"https://github.com/RetroPie","followers_url":"https://api.github.com/users/RetroPie/followers","following_url":"https://api.github.com/users/RetroPie/following{/other_user}","gists_url":"https://api.github.com/users/RetroPie/gists{/gist_id}","starred_url":"https://api.github.com/users/RetroPie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RetroPie/subscriptions","organizations_url":"https://api.github.com/users/RetroPie/orgs","repos_url":"https://api.github.com/users/RetroPie/repos","events_url":"https://api.github.com/users/RetroPie/events{/privacy}","received_events_url":"https://api.github.com/users/RetroPie/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RetroPie/EmulationStation","description":"A Fork of Emulation Station for RetroPie. Emulation Station is a flexible emulator front-end supporting keyboardless navigation and custom system themes.","fork":true,"url":"https://api.github.com/repos/RetroPie/EmulationStation","forks_url":"https://api.github.com/repos/RetroPie/EmulationStation/forks","keys_url":"https://api.github.com/repos/RetroPie/EmulationStation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RetroPie/EmulationStation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RetroPie/EmulationStation/teams","hooks_url":"https://api.github.com/repos/RetroPie/EmulationStation/hooks","issue_events_url":"https://api.github.com/repos/RetroPie/EmulationStation/issues/events{/number}","events_url":"https://api.github.com/repos/RetroPie/EmulationStation/events","assignees_url":"https://api.github.com/repos/RetroPie/EmulationStation/assignees{/user}","branches_url":"https://api.github.com/repos/RetroPie/EmulationStation/branches{/branch}","tags_url":"https://api.github.com/repos/RetroPie/EmulationStation/tags","blobs_url":"https://api.github.com/repos/RetroPie/EmulationStation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RetroPie/EmulationStation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RetroPie/EmulationStation/git/refs{/sha}","trees_url":"https://api.github.com/repos/RetroPie/EmulationStation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RetroPie/EmulationStation/statuses/{sha}","languages_url":"https://api.github.com/repos/RetroPie/EmulationStation/languages","stargazers_url":"https://api.github.com/repos/RetroPie/EmulationStation/stargazers","contributors_url":"https://api.github.com/repos/RetroPie/EmulationStation/contributors","subscribers_url":"https://api.github.com/repos/RetroPie/EmulationStation/subscribers","subscription_url":"https://api.github.com/repos/RetroPie/EmulationStation/subscription","commits_url":"https://api.github.com/repos/RetroPie/EmulationStation/commits{/sha}","git_commits_url":"https://api.github.com/repos/RetroPie/EmulationStation/git/commits{/sha}","comments_url":"https://api.github.com/repos/RetroPie/EmulationStation/comments{/number}","issue_comment_url":"https://api.github.com/repos/RetroPie/EmulationStation/issues/comments{/number}","contents_url":"https://api.github.com/repos/RetroPie/EmulationStation/contents/{+path}","compare_url":"https://api.github.com/repos/RetroPie/EmulationStation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RetroPie/EmulationStation/merges","archive_url":"https://api.github.com/repos/RetroPie/EmulationStation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RetroPie/EmulationStation/downloads","issues_url":"https://api.github.com/repos/RetroPie/EmulationStation/issues{/number}","pulls_url":"https://api.github.com/repos/RetroPie/EmulationStation/pulls{/number}","milestones_url":"https://api.github.com/repos/RetroPie/EmulationStation/milestones{/number}","notifications_url":"https://api.github.com/repos/RetroPie/EmulationStation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RetroPie/EmulationStation/labels{/name}","releases_url":"https://api.github.com/repos/RetroPie/EmulationStation/releases{/id}","deployments_url":"https://api.github.com/repos/RetroPie/EmulationStation/deployments","created_at":"2015-04-19T09:44:59Z","updated_at":"2017-08-30T12:36:22Z","pushed_at":"2017-08-31T21:40:07Z","git_url":"git://github.com/RetroPie/EmulationStation.git","ssh_url":"git@github.com:RetroPie/EmulationStation.git","clone_url":"https://github.com/RetroPie/EmulationStation.git","svn_url":"https://github.com/RetroPie/EmulationStation","homepage":"","size":7597,"stargazers_count":203,"watchers_count":203,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":28,"forks":103,"open_issues":28,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203"},"html":{"href":"https://github.com/RetroPie/EmulationStation/pull/203"},"issue":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/issues/203"},"comments":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/RetroPie/EmulationStation/statuses/2047150cdd158b0b9699db2c1da2014673c902fa"}},"author_association":"NONE"}}
{"actor":{"display_login":"zigurana"}}