{"action":"created","issue":{"url":"https://api.github.com/repos/ggez/ggez/issues/175","repository_url":"https://api.github.com/repos/ggez/ggez","labels_url":"https://api.github.com/repos/ggez/ggez/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/ggez/ggez/issues/175/comments","events_url":"https://api.github.com/repos/ggez/ggez/issues/175/events","html_url":"https://github.com/ggez/ggez/issues/175","id":262755084,"number":175,"title":"Cannot set portrait dimensions for the window","user":{"login":"TatriX","id":703150,"avatar_url":"https://avatars2.githubusercontent.com/u/703150?v=4","gravatar_id":"","url":"https://api.github.com/users/TatriX","html_url":"https://github.com/TatriX","followers_url":"https://api.github.com/users/TatriX/followers","following_url":"https://api.github.com/users/TatriX/following{/other_user}","gists_url":"https://api.github.com/users/TatriX/gists{/gist_id}","starred_url":"https://api.github.com/users/TatriX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TatriX/subscriptions","organizations_url":"https://api.github.com/users/TatriX/orgs","repos_url":"https://api.github.com/users/TatriX/repos","events_url":"https://api.github.com/users/TatriX/events{/privacy}","received_events_url":"https://api.github.com/users/TatriX/received_events","type":"User","site_admin":false},"labels":[{"id":319009117,"url":"https://api.github.com/repos/ggez/ggez/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-04T11:34:50Z","updated_at":"2017-10-12T23:57:26Z","closed_at":null,"author_association":"NONE","body":"When I'm setting\r\n```rust\r\n    let mut c = conf::Conf::new();\r\n    c.window_width = 720.0;\r\n    c.window_height = 1280.0;\r\n```\r\nI get the error:\r\n```\r\nthread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: WindowError(SdlError(\"Couldn\\'t find display mode match\"))', /checkout/src/libcore/result.rs:906:4\r\n```"},"comment":{"url":"https://api.github.com/repos/ggez/ggez/issues/comments/336312990","html_url":"https://github.com/ggez/ggez/issues/175#issuecomment-336312990","issue_url":"https://api.github.com/repos/ggez/ggez/issues/175","id":336312990,"user":{"login":"termhn","id":887711,"avatar_url":"https://avatars1.githubusercontent.com/u/887711?v=4","gravatar_id":"","url":"https://api.github.com/users/termhn","html_url":"https://github.com/termhn","followers_url":"https://api.github.com/users/termhn/followers","following_url":"https://api.github.com/users/termhn/following{/other_user}","gists_url":"https://api.github.com/users/termhn/gists{/gist_id}","starred_url":"https://api.github.com/users/termhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/termhn/subscriptions","organizations_url":"https://api.github.com/users/termhn/orgs","repos_url":"https://api.github.com/users/termhn/repos","events_url":"https://api.github.com/users/termhn/events{/privacy}","received_events_url":"https://api.github.com/users/termhn/received_events","type":"User","site_admin":false},"created_at":"2017-10-12T23:57:26Z","updated_at":"2017-10-12T23:57:26Z","author_association":"CONTRIBUTOR","body":"Really you should probably be setting/transforming the projection matrix here rather than the transform matrix -- that is really meant for transforming images/other Drawables before drawing in theory (it is used in drawing `SpriteBatch`es). I hadn't really seen a use for directly editing the raw projection matrix before, but I'm going to submit a PR that will let you do so to have the same effect in a more proper fashion like so, as well as make `SpriteBatches` behave better with user model matrix changes:\r\n\r\n```rust\r\n    let screen_height = 1000;\r\n    let screen_width = 9 * screen_height / 16;\r\n    c.window_width = screen_width;\r\n    c.window_height = screen_height;\r\n\r\n    state.scale_factor = screen_height as f32 / HEIGHT;\r\n\r\n    graphics::transform_projection(ctx, Matrix4::new_scaling(state.scale_factor));\r\n    graphics::apply_transformations(ctx).unwrap();\r\n```"}}
{"actor":{"display_login":"termhn"}}