mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
cfcb56f5b9
# Objective - Continue to pare down the uses on NonSend resources in the engine. In this case, EventLoopProxy used to be `!Sync`, but is now `Sync` in the latest version of winit. ## Solution - New type `EventLoopProxy` as `EventLoopProxyWrapper` to make it into a normal resource. - Update the `custom_user_event` example as it no longer needs to indirectly access the `EventLoopProxy` through a static variable anymore. ## Testing - Ran the example. The resource exists just for users to use, so there aren't any in engine uses for it currently. --- ## Changelog - make EventLoopProxy into a regular resource. ## Migration Guide `EventLoopProxy` has been renamed to `EventLoopProxyWrapper` and is now `Send`, making it an ordinary resource. Before: ```rust event_loop_system(event_loop: NonSend<EventLoopProxy<MyEvent>>) { event_loop.send_event(MyEvent); } ``` After: ```rust event_loop_system(event_loop: Res<EventLoopProxy<MyEvent>>) { event_loop.send_event(MyEvent); } ``` |
||
---|---|---|
.. | ||
clear_color.rs | ||
custom_user_event.rs | ||
low_power.rs | ||
multiple_windows.rs | ||
scale_factor_override.rs | ||
screenshot.rs | ||
transparent_window.rs | ||
window_resizing.rs | ||
window_settings.rs |