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 François
parent 1a9cd118bd
commit 6daf1a32da
No known key found for this signature in database

View file

@ -154,7 +154,11 @@ fn update_cursors(
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 }) => {
let cache_key = CustomCursorCacheKey::Url(url.clone());