1
1
In this file will be listed the changes, especially the breaking ones that one should be careful of
2
2
when upgrading from a version of rust-sdl2 to another.
3
3
4
+ ### v0.32
5
+
6
+ [ PR #279 ] ( https://github.com/Rust-SDL2/rust-sdl2/pull/729 )
7
+
8
+ * ** Breaking change** set\_ video\_ minimize\_ on\_ focus\_ lost was renamed to …minimize\_ on\_ focus\_ loss, as it should be. As a bonus, it works now.
9
+
4
10
### v0.31
5
11
6
12
[ PR #693 ] ( https://github.com/Rust-SDL2/rust-sdl2/pull/693 ) , [ PR #720 ] ( https://github.com/Rust-SDL2/rust-sdl2/pull/720 )
@@ -14,9 +20,9 @@ when upgrading from a version of rust-sdl2 to another.
14
20
[ PR #695 ] ( https://github.com/Rust-sdl2/rust-sdl2/pull/695 )
15
21
16
22
* sdl2-sys can now be generated at compile time by bindgen (Opt-in required
17
- with "use-bindgen" feature)
23
+ with "use-bindgen" feature)
18
24
* The new sdl2-sys source code is generated by bindgen, hence ** almost everything
19
- that uses sdl2-sys will be broken** . The fixes are small but still preset.
25
+ that uses sdl2-sys will be broken** . The fixes are small but still preset.
20
26
21
27
[ PR #673 ] ( https://github.com/Rust-sdl2/rust-sdl2/pull/673 )
22
28
@@ -26,22 +32,22 @@ that uses sdl2-sys will be broken**. The fixes are small but still preset.
26
32
27
33
* ** Breaking change** Make get\_ swap\_ interval return an enum instead of i32
28
34
* The signature of set\_ swap\_ interval has been changed as well, but it shouldn't
29
- breaking existing code too much.
35
+ breaking existing code too much.
30
36
31
37
[ PR #683 ] ( https://github.com/Rust-sdl2/rust-sdl2/pull/684 )
32
38
33
39
* Adds the ` unsafe_textures ` feature to this crate, allowing to get rid of the lifetimes
34
- in ` Texture ` s in the ` render ` module.
40
+ in ` Texture ` s in the ` render ` module.
35
41
36
42
[ PR #704 ] ( https://github.com/Rust-SDL2/rust-sdl2/pull/704 )
37
43
38
44
* Adds the ` Music::from_static_bytes ` function, which creates a Music instance with the
39
- static lifetime from a buffer that also has a static lifetime.
45
+ static lifetime from a buffer that also has a static lifetime.
40
46
41
47
[ PR #708 ] ( https://github.com/Rust-SDL2/rust-sdl2/pull/708 )
42
48
43
49
* Makes the fields of the ` sdl2::mixer::Channel(i32) ` and ` sdl::mixer::Group(i32) ` structs
44
- public so they can be instantiated directly, and deprecates ` sdl2::mixer::channel(i32) ` .
50
+ public so they can be instantiated directly, and deprecates ` sdl2::mixer::channel(i32) ` .
45
51
46
52
[ PR #714 ] ( https://github.com/Rust-SDL2/rust-sdl2/pull/714 )
47
53
@@ -65,18 +71,18 @@ pay for soundness and runtime safety.
65
71
66
72
* ` Renderer ` has been renamed and split into ` Canvas ` and ` TextureCreator ` .
67
73
* ` Canvas ` can store a ` Surface ` or a ` Window ` , and can be used to render into these as well.
68
- ` TextureCreator ` creates ` Texture ` s and is used by Texture to make sure they don't live
69
- longer than expected.
74
+ ` TextureCreator ` creates ` Texture ` s and is used by Texture to make sure they don't live
75
+ longer than expected.
70
76
* ` set_render_target ` has been removed and has been replaced with ` Canvas::with_texture_canvas `
71
- and ` Canvas::with_multiple_texture_canvas `
77
+ and ` Canvas::with_multiple_texture_canvas `
72
78
* Deleted ` WindowRef ` , it wasn't useful anymore.
73
79
74
80
Other Changes:
75
81
76
82
* Added ` PixelFormatEnum::supports_alpha(&self) -> bool ` method.
77
83
* A single Game Of Life example has been added to show the basic capabilities of the new ` Canvas `
78
- and ` TextureCreator ` structs, as well as adding a very basic game to show how to handle input / game
79
- changes in a basic game.
84
+ and ` TextureCreator ` structs, as well as adding a very basic game to show how to handle input / game
85
+ changes in a basic game.
80
86
81
87
You won't have to worry about what target your ` Renderer ` has at runtime anymore, everything
82
88
is done at compile time now !
0 commit comments