Skip to content

Commit e406b65

Browse files
committed
winit-24 feature flag, limit versions of some crates to fix build issues
1 parent 8a913ed commit e406b65

File tree

10 files changed

+33
-8
lines changed

10 files changed

+33
-8
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ jobs:
5555
CARGO_INCREMENTAL: 0
5656
RUSTFLAGS: "-C debuginfo=0 -D warnings"
5757

58+
# Verify winit 0.24 build works
59+
- name: Build winit 0.24
60+
run: cargo check --no-default-features --features=winit-24,skulpin_winit
61+
if: ${{ runner.os == 'Linux' }}
62+
env:
63+
CARGO_INCREMENTAL: 0
64+
RUSTFLAGS: "-C debuginfo=0 -D warnings"
65+
5866
# Run tests
5967
- name: Run tests
6068
run: cargo test --workspace

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.11.1
4+
5+
* Add winit-24 feature flag
6+
* Limit some open-ended versions to fix build issues
7+
38
## 0.11.0
49

510
* Refactor the API integrations to use ash_window, simplifying the code and removing a lot of platform-specific code
@@ -9,6 +14,10 @@
914
* Added feature flags winit-21, winit-22, winit-23, and winit-latest for easier control of what winit version to pull
1015
in. This also allows us to have version-specific code (for example to handle upstream changes in winit API)
1116

17+
## 0.10.1
18+
19+
* Limit some open-ended versions to fix build issues
20+
1221
## 0.10.0
1322

1423
* Improvements to validation layer handling
@@ -130,4 +139,4 @@
130139
* Adjusted some log levels
131140

132141
## 0.2.0
133-
* Changes prior to 0.2.0 were not tracked.
142+
* Changes prior to 0.2.0 were not tracked.

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ skulpin_sdl2 = ["skulpin-renderer-sdl2"]
5050
winit-21 = ["skulpin-renderer-winit/winit-21", "skulpin-app-winit/winit-21"]
5151
winit-22 = ["skulpin-renderer-winit/winit-22", "skulpin-app-winit/winit-22"]
5252
winit-23 = ["skulpin-renderer-winit/winit-23", "skulpin-app-winit/winit-23"]
53+
winit-24 = ["skulpin-renderer-winit/winit-24", "skulpin-app-winit/winit-24"]
5354
winit-latest = ["skulpin-renderer-winit/winit-latest", "skulpin-app-winit/winit-latest"]
5455

5556
default = ["skulpin_winit", "skulpin_sdl2", "skia_complete", "winit-22"]
@@ -72,9 +73,10 @@ nphysics2d = "0.12"
7273

7374
# The skulpin-renderer-sdl2 crate doesn't specify any features, but downstream libraries can do so by including sdl2
7475
# for themselves. Examples will use the features added here
75-
sdl2 = { version = ">=0.33", features = ["bundled", "static-link"] }
76+
sdl2-sys = { version = ">=0.33, <=0.34.2"}
77+
sdl2 = { version = ">=0.33, <=0.34.2", features = ["bundled", "static-link"] }
7678

7779
# Used for the imgui example only
7880
imgui = "0.5"
7981
imgui-winit-support = "0.5"
80-
skulpin-plugin-imgui = { version = "0.7", path = "skulpin-plugin-imgui"}
82+
skulpin-plugin-imgui = { version = "0.7", path = "skulpin-plugin-imgui"}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ feature does not get included.
9999
* `winit-21`
100100
* `winit-22`
101101
* `winit-23`
102+
* `winit-24`
102103
* `winit-latest`
103104

104105
(These feature names match the imgui-rs crate.)

skulpin-app-winit/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ log="0.4"
2222
winit-21 = ["skulpin-renderer-winit/winit-21"]
2323
winit-22 = ["skulpin-renderer-winit/winit-22"]
2424
winit-23 = ["skulpin-renderer-winit/winit-23"]
25+
winit-24 = ["skulpin-renderer-winit/winit-24"]
2526
winit-latest = ["skulpin-renderer-winit/winit-latest"]

skulpin-app-winit/src/input_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ impl InputState {
532532
);
533533
}
534534

535-
#[cfg(any(feature = "winit-23", feature = "winit-latest"))]
535+
#[cfg(any(feature = "winit-23", feature = "winit-24", feature = "winit-latest"))]
536536
{
537537
self.mouse_wheel_delta = MouseScrollDelta::PixelDelta(
538538
PhysicalPosition::<f64>::new(d1.x + d2.x, d1.y + d2.y),
@@ -677,7 +677,7 @@ impl InputState {
677677
0 => MouseButton::Left,
678678
1 => MouseButton::Right,
679679
2 => MouseButton::Middle,
680-
_ => MouseButton::Other((index - 3) as u8),
680+
_ => MouseButton::Other((index - 3) as _),
681681
};
682682

683683
Some(button)

skulpin-renderer-sdl2/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ categories = ["graphics", "gui", "multimedia", "rendering", "visualization"]
1212

1313
[dependencies]
1414
skulpin-renderer = { version = "0.5", path = "../skulpin-renderer" }
15-
sdl2 = { version = ">=0.33", features = ["raw-window-handle"] }
15+
sdl2 = { version = ">=0.33, <=0.34.2", features = ["raw-window-handle"] }
16+
sdl2-sys = { version = ">=0.33, <=0.34.2"}
1617
ash-window = "0.5.0"
1718
raw-window-handle = "0.3"
1819
log="0.4"

skulpin-renderer-winit/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ skulpin-renderer = { version = "0.5", path = "../skulpin-renderer" }
1515
winit-21 = { package = "winit", version = "0.21", optional = true }
1616
winit-22 = { package = "winit", version = "0.22", optional = true }
1717
winit-23 = { package = "winit", version = "0.23", optional = true }
18+
winit-24 = { package = "winit", version = "0.24", optional = true }
1819
winit-latest = { package = "winit", version = ">=0.23", optional = true }
1920
ash-window = "0.5.0"
2021
raw-window-handle = "0.3"

skulpin-renderer-winit/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pub use winit_21 as winit;
44
pub use winit_22 as winit;
55
#[cfg(feature = "winit-23")]
66
pub use winit_23 as winit;
7+
#[cfg(feature = "winit-24")]
8+
pub use winit_24 as winit;
79
#[cfg(feature = "winit-latest")]
810
pub use winit_latest as winit;
911

skulpin-renderer/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ complete = ["skia-safe/textlayout"]
2424
[dependencies]
2525
ash = ">=0.30"
2626

27-
skia-safe = { version = ">=0.30.1", features = ["vulkan"] }
28-
skia-bindings = { version = ">=0.30.1" }
27+
skia-safe = { version = ">=0.30.1, <0.37", features = ["vulkan"] }
28+
skia-bindings = { version = ">=0.30.1, <0.37" }
2929

3030
log="0.4"

0 commit comments

Comments
 (0)