diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 797c7b8..e29aa92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: rust: - stable - beta - - 1.52.0 + - 1.53.0 steps: - name: Checkout sources uses: actions/checkout@v2 @@ -73,7 +73,7 @@ jobs: rust: - stable - beta - - 1.52.0 + - 1.53.0 steps: - name: Checkout sources uses: actions/checkout@v2 diff --git a/MSRV.md b/MSRV.md index 45d1261..9f1df2c 100644 --- a/MSRV.md +++ b/MSRV.md @@ -2,6 +2,7 @@ | `pixels` version | `rustc` version | |------------------|-----------------| +| `0.9.0` | `1.53.0` | | `0.8.0` | `1.52.0` | | `0.7.0` | `1.52.0` | | `0.6.0` | `1.52.0` | diff --git a/src/renderers.rs b/src/renderers.rs index 2b75545..79c577a 100644 --- a/src/renderers.rs +++ b/src/renderers.rs @@ -243,8 +243,8 @@ impl ScalingMatrix { // Create a transformation matrix let sw = scaled_width / screen_width; let sh = scaled_height / screen_height; - let tx = (texture_width / screen_width - 1.0).max(0.0); - let ty = (1.0 - texture_height / screen_height).min(0.0); + let tx = (screen_width / 2.0).fract() / screen_width; + let ty = (screen_height / 2.0).fract() / screen_height; #[rustfmt::skip] let transform: [f32; 16] = [ sw, 0.0, 0.0, 0.0,