{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/issues/189","labels_url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/issues/189/comments","events_url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/issues/189/events","html_url":"https://github.com/PistonDevelopers/sdl2_window/pull/189","id":98771765,"number":189,"title":"Update to support subsystems in upcoming rust-sdl2 release","user":{"login":"Furyhunter","id":141511,"avatar_url":"https://avatars.githubusercontent.com/u/141511?v=3","gravatar_id":"","url":"https://api.github.com/users/Furyhunter","html_url":"https://github.com/Furyhunter","followers_url":"https://api.github.com/users/Furyhunter/followers","following_url":"https://api.github.com/users/Furyhunter/following{/other_user}","gists_url":"https://api.github.com/users/Furyhunter/gists{/gist_id}","starred_url":"https://api.github.com/users/Furyhunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Furyhunter/subscriptions","organizations_url":"https://api.github.com/users/Furyhunter/orgs","repos_url":"https://api.github.com/users/Furyhunter/repos","events_url":"https://api.github.com/users/Furyhunter/events{/privacy}","received_events_url":"https://api.github.com/users/Furyhunter/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-03T15:43:41Z","updated_at":"2015-08-03T15:56:09Z","closed_at":"2015-08-03T15:56:09Z","pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/pulls/189","html_url":"https://github.com/PistonDevelopers/sdl2_window/pull/189","diff_url":"https://github.com/PistonDevelopers/sdl2_window/pull/189.diff","patch_url":"https://github.com/PistonDevelopers/sdl2_window/pull/189.patch"},"body":"The subsystems changes were just merged into `rust-sdl2` which dramatically overhaul the SDL initialization process and allow passing around of reference-counted clones of subsystem handles. AngryLawyer/rust-sdl2#441 and AngryLawyer/rust-sdl2#443\r\n\r\nThis PR updates `Sdl2Window` and its trait implementations to use them instead of initializing SDL itself. The existing `Sdl2Window::new` function will behave just the same as before, and a new `Sdl2Window::new_with_subsystems` has been added to allow calling code to initialize SDL and get subsystems on its own. This makes it, for example, easier to initialize the audio subsystem and control that alongside the window.\r\n\r\nBreaking API change for this is that the two Sdl2Window creation functions both return `Result<Sdl2Window, String>` instead, allowing them to fail gracefully instead of `panic`.\r\n\r\nOverall this should improve reusability."},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/issues/comments/127286436","html_url":"https://github.com/PistonDevelopers/sdl2_window/pull/189#issuecomment-127286436","issue_url":"https://api.github.com/repos/PistonDevelopers/sdl2_window/issues/189","id":127286436,"user":{"login":"Furyhunter","id":141511,"avatar_url":"https://avatars.githubusercontent.com/u/141511?v=3","gravatar_id":"","url":"https://api.github.com/users/Furyhunter","html_url":"https://github.com/Furyhunter","followers_url":"https://api.github.com/users/Furyhunter/followers","following_url":"https://api.github.com/users/Furyhunter/following{/other_user}","gists_url":"https://api.github.com/users/Furyhunter/gists{/gist_id}","starred_url":"https://api.github.com/users/Furyhunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Furyhunter/subscriptions","organizations_url":"https://api.github.com/users/Furyhunter/orgs","repos_url":"https://api.github.com/users/Furyhunter/repos","events_url":"https://api.github.com/users/Furyhunter/events{/privacy}","received_events_url":"https://api.github.com/users/Furyhunter/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T15:56:09Z","updated_at":"2015-08-03T15:56:09Z","body":"Ahh, I guess this PR is redundant now.\r\n\r\nI wrote this code while working with nukep on the subsystem changes, so it's a bit older. I'll make another PR that adds a new constructor function for taking existing subsystems."}}