properly flag using CustomCursor::Url in wasm (#16255)

# Objective

- Fixes #16254 
- fix building in wasm without custom_cursor

## Solution

- Properly flag `CustomCursor::Url` which only exist in wasm, but also
only when `custom_cursor` is enabled

## Testing

- `cargo check --target wasm32-unknown-unknown -p bevy_winit`
This commit is contained in:
François Mockers 2024-11-06 14:14:12 +01:00 committed by GitHub
parent 49f63ed2cf
commit eb558bbf77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,7 +154,11 @@ fn update_cursors(
CursorSource::Custom((cache_key, source)) CursorSource::Custom((cache_key, source))
} }
} }
#[cfg(all(target_family = "wasm", target_os = "unknown"))] #[cfg(all(
feature = "custom_cursor",
target_family = "wasm",
target_os = "unknown"
))]
CursorIcon::Custom(CustomCursor::Url { url, hotspot }) => { CursorIcon::Custom(CustomCursor::Url { url, hotspot }) => {
let cache_key = CustomCursorCacheKey::Url(url.clone()); let cache_key = CustomCursorCacheKey::Url(url.clone());