Skip to content

Fix keyboard slide animation to no longer be frame-rate (= cpu speed) dependent

Ellie requested to merge ell1e/osk-sdl:fix-keyboard-anim into master

This merge request fixes the animation previously being frame-rate (= cpu speed) dependent. Previously, how fast the device can draw was the main controlling factor on how fast it animates, which means on slower devices the animation, if not disabled entirely, will run slower and take annoyingly longer to complete for no good reason.

With this fix, the position is always internally updated with 50FPS accuracy, no matter how fast the device can actually keep up with redrawing - which means on slower devices it should run visibly laggier, but now complete at the same overall speed rather than notably slower as before.

WARNING: not tested on-device yet, but in the desktop test variant it works fine for me

Note: it might be possible to re-enable animations on slower devices again (needs case by case testing) if the main reason for disabling them was that they complete too slowly.

Note 2: the waving dots are still framerate-dependent I think, I might update that one later. the keyboard slide was just more important since it actually delays user action

Edited by Ellie

Merge request reports