{"action":"created","issue":{"url":"https://api.github.com/repos/scummvm/scummvm/issues/1247","repository_url":"https://api.github.com/repos/scummvm/scummvm","labels_url":"https://api.github.com/repos/scummvm/scummvm/issues/1247/labels{/name}","comments_url":"https://api.github.com/repos/scummvm/scummvm/issues/1247/comments","events_url":"https://api.github.com/repos/scummvm/scummvm/issues/1247/events","html_url":"https://github.com/scummvm/scummvm/pull/1247","id":339651041,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMjUyOTMy","number":1247,"title":"Discord integration - DO NOT MERGE","user":{"login":"Mataniko","id":803371,"node_id":"MDQ6VXNlcjgwMzM3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/803371?v=4","gravatar_id":"","url":"https://api.github.com/users/Mataniko","html_url":"https://github.com/Mataniko","followers_url":"https://api.github.com/users/Mataniko/followers","following_url":"https://api.github.com/users/Mataniko/following{/other_user}","gists_url":"https://api.github.com/users/Mataniko/gists{/gist_id}","starred_url":"https://api.github.com/users/Mataniko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mataniko/subscriptions","organizations_url":"https://api.github.com/users/Mataniko/orgs","repos_url":"https://api.github.com/users/Mataniko/repos","events_url":"https://api.github.com/users/Mataniko/events{/privacy}","received_events_url":"https://api.github.com/users/Mataniko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-10T00:22:57Z","updated_at":"2018-07-10T09:44:38Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/scummvm/scummvm/pulls/1247","html_url":"https://github.com/scummvm/scummvm/pull/1247","diff_url":"https://github.com/scummvm/scummvm/pull/1247.diff","patch_url":"https://github.com/scummvm/scummvm/pull/1247.patch"},"body":"I've prototyped an integration with Discord RPC, so when you start a game in ScummVM it will set the status and game that the user is playing.\r\n\r\nEvery game will also display an image in the user profile while they're playing (Right now I only uploaded an image for Day of The Tentacle)\r\n\r\nRight now it's fully working in Windows, but I don't know best practices are to integrate this cross platform since the libs are platform specific and the source itself breaks the ScummVM coding conventions.\r\n\r\nTo get this set up you'll need to download the Discord RPC libs from https://github.com/discordapp/discord-rpc and extract them in your lib/include paths. The feature is enabled by default.\r\n\r\nIs there any interest in this?"},"comment":{"url":"https://api.github.com/repos/scummvm/scummvm/issues/comments/403764683","html_url":"https://github.com/scummvm/scummvm/pull/1247#issuecomment-403764683","issue_url":"https://api.github.com/repos/scummvm/scummvm/issues/1247","id":403764683,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzc2NDY4Mw==","user":{"login":"criezy","id":552105,"node_id":"MDQ6VXNlcjU1MjEwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/552105?v=4","gravatar_id":"","url":"https://api.github.com/users/criezy","html_url":"https://github.com/criezy","followers_url":"https://api.github.com/users/criezy/followers","following_url":"https://api.github.com/users/criezy/following{/other_user}","gists_url":"https://api.github.com/users/criezy/gists{/gist_id}","starred_url":"https://api.github.com/users/criezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criezy/subscriptions","organizations_url":"https://api.github.com/users/criezy/orgs","repos_url":"https://api.github.com/users/criezy/repos","events_url":"https://api.github.com/users/criezy/events{/privacy}","received_events_url":"https://api.github.com/users/criezy/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T09:44:37Z","updated_at":"2018-07-10T09:44:37Z","author_association":"MEMBER","body":"A few more remarks:\r\n- The proper way to do something when a game starts or when it returns to the launcher is to do it in the `OSystem` `engineInit()` and `engineDone()` implementations for your backend (so for example in this case `OSystem_SDL::engineInit()` and `OSystem_SDL::engineDone()` might be a good place. \r\n- Some of this looks similar to what we have in the taskbar integration, and in particular the `TaskbarManager::setOverlayIcon(const Common::String &name, const Common::String &description)`. In the Windows and macOS implementations this changes the ScummVM icon in the taskbar/dock to reflect the current game when a game is running. For it to work it needs the user to have icon files named after the game id in either the `extrapath` or the `iconspath` (the latter needs to be added manually to the scummvm.ini as it is not visible in the GUI). Personally I use the icons from http://forums.scummvm.org/viewtopic.php?t=4127."}}
{"actor":{"display_login":"criezy"}}