Describe the bug
If the window loses focus after calling Tween.begin() and before the tween ends, sometimes the tween will stop completely and not finish when focus is returned to the window, and sometimes the frame rate drops (expected with gfx_reduceFramesWhenNotFocused=true) but then when the window regains focus, the tween restarts.
To Reproduce
Steps to reproduce the behavior:
Do something in your game that will call Tween.begin() on a tween. Ideally something visual and on-screen for testing.
Before the tween finishes, click outside of the window so the window loses focus.
The tween will either stop or the frame rate will drop at this point.
Click on the window to regain focus.
If the tween stopped, it will not complete even once focus is returned to the window. If the tween did not stop, it will restart when focus is regained.
Expected behavior
I would expect the tween to continue (at a lower frame rate) when the window loses focus and not restart when focus is regained.
Your System:
OS: Windows 11
LITIENGINE version: 0.5.2
Java JDK/JRE version: jdk-18.0.2.1
Screen resolution: 3,840 x 2,160
Additional context
I haven't been able to pinpoint what causes the two types of behaviors. Although neither of them look very good.
This is not an issue if gfx_reduceFramesWhenNotFocused=false. So that's what I'm using as a work-around for now.
Describe the bug If the window loses focus after calling Tween.begin() and before the tween ends, sometimes the tween will stop completely and not finish when focus is returned to the window, and sometimes the frame rate drops (expected with gfx_reduceFramesWhenNotFocused=true) but then when the window regains focus, the tween restarts.
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect the tween to continue (at a lower frame rate) when the window loses focus and not restart when focus is regained.
Your System:
Additional context