Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure 2 update per device_event on needing platforms #11719

Closed

Conversation

BorisBoutillier
Copy link
Contributor

Objective

  • Aims to solve Button example is broken #11235
  • Currently, on platforms that need part of the render app to be run on the main thread, applications running in Update::Reactive will see updates associated to a device event only be rendered on the next device event or after the Reactive delay.

Solution

  • Ensure two updates are triggered per device_event on platforms that need it
  • Adds a device_event_received_previous_update attribute to the WinitAppRunnerState

Changelog

  • Fixed: In applications using UpdateMode::Reactive, consequences of a device event are now properly rendered straightaway.

…er_state and use it to trigger 2 updates per device event on needing platforms
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in O-MacOS Specific to the MacOS (Apple) desktop operating system O-iOS Specific to the iOS mobile operating system labels Feb 5, 2024
@mockersf
Copy link
Member

mockersf commented Feb 5, 2024

#11720 is an alternative fix that I would prefer as it doesn't add platform conditionals

@BorisBoutillier
Copy link
Contributor Author

Yes, #11720 is a better solution, my PR adds an additional cfg (that need to be kept in sync), and trigger an additional frame computation.

Happy to trash this one when the other is merged.

@BorisBoutillier
Copy link
Contributor Author

Dropped in favor of better solution done in #11720 .

@BorisBoutillier BorisBoutillier deleted the two_updates_on_event branch February 6, 2024 08:34
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-Bug An unexpected or incorrect behavior O-iOS Specific to the iOS mobile operating system O-MacOS Specific to the MacOS (Apple) desktop operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants