Skip to content

Improve bevy_winit documentation#7590

Closed
maniwani wants to merge 9 commits intobevyengine:mainfrom
maniwani:bevy-winit-update-rate-limiting
Closed

Improve bevy_winit documentation#7590
maniwani wants to merge 9 commits intobevyengine:mainfrom
maniwani:bevy-winit-update-rate-limiting

Conversation

@maniwani
Copy link
Contributor

@maniwani maniwani commented Feb 10, 2023

Objective

  • Revise docs and correct impl where it doesn't match the docs.
  • Refactor event loop code a little bit to make it easier to follow.

Solution

  • Do the above.

Migration Guide

  • UpdateMode::Reactive { max_wait: .. } -> UpdateMode::Reactive { wait: .. }
  • UpdateMode::ReactiveLowPower { max_wait: .. } -> UpdateMode::ReactiveLowPower { wait: .. }
  • WinitSettings::return_from_run -> WinitSettings::return_on_loop_exit

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-Windowing Platform-agnostic interface layer to run your app in C-Code-Quality A section of code that is hard to understand or change labels Feb 10, 2023
@maniwani maniwani added the M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Feb 10, 2023
@maniwani
Copy link
Contributor Author

maniwani commented Feb 10, 2023

What do y'all think of the breaking changes? IMO max_wait is misleading since it really specifies the minimum time between updates (in the absence of events). It'll be even more wrong when I add an UpdateMode::RateLimited in a followup PR.

But I don't really care much about return_from_run. Just didn't seem descriptive enough.

@maniwani maniwani force-pushed the bevy-winit-update-rate-limiting branch from 1a61717 to bb72208 Compare February 10, 2023 20:16
@maniwani maniwani closed this Feb 10, 2023
@maniwani maniwani deleted the bevy-winit-update-rate-limiting branch February 10, 2023 20:20
@maniwani maniwani restored the bevy-winit-update-rate-limiting branch February 10, 2023 20:21
@maniwani maniwani deleted the bevy-winit-update-rate-limiting branch February 10, 2023 20:25
@maniwani
Copy link
Contributor Author

Messed up the branch by mistake.

github-merge-queue bot pushed a commit that referenced this pull request Jul 31, 2023
Redo of #7590 since I messed up my branch.

# Objective

- Revise docs.
- Refactor event loop code a little bit to make it easier to follow.

## Solution

- Do the above.

---

### Migration Guide

- `UpdateMode::Reactive { max_wait: .. }` -> `UpdateMode::Reactive {
wait: .. }`
- `UpdateMode::ReactiveLowPower { max_wait: .. }` ->
`UpdateMode::ReactiveLowPower { wait: .. }`

---------

Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Windowing Platform-agnostic interface layer to run your app in C-Code-Quality A section of code that is hard to understand or change C-Docs An addition or correction to our documentation M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants