Re: Scrolling ScrollViewer with RStick when not in focus
Posted: 15 Jul 2021, 20:51
Hello,
The above spawned quite a bit of a conversation on our end .. we aren't convinced a frame limiter is strictly needed, or at least in render loop.
Here are some thoughts, I'd love to know what you think.
Currently the scroll value gets lost between these 3 functions at very high FPS:
We are wondering if:
- It's possible to get View::Scroll and Mouse::Scroll not to lose tiny values at high FPS?
- Would Win32Display::EnterMessageLoop need to be modified to run at certain FPS?
- We are worried about dropped frames loosing input, do buttons/Rstick/etc input get cached till next fetch? or can one (ay at 5fps) press button fast enough that up/down event happens within single update and get lost?
-- From Win32Display looks like most buttons done via messages but RStick/LT/RT is a fetch from state_.Gamepad.wButtons .. which I'm not can catch fast button events at low fps, does it?
-- Edit1 Can confirm that none of the inputs get lost during dropped frames, dpad/facebuttons/and RStick all process input fine.
The above spawned quite a bit of a conversation on our end .. we aren't convinced a frame limiter is strictly needed, or at least in render loop.
Here are some thoughts, I'd love to know what you think.
Currently the scroll value gets lost between these 3 functions at very high FPS:
Code: Select all
bool View::Scroll(float value) // value is some value at any FPS
{
VerifyAccess();
return mMouse->Scroll(value * mCurrentDeltaTime * 10.0f);
}
// ...
bool Mouse::Scroll(float value)
{
Ptr<UIElement> element(mView->GetKeyboard()->GetFocused());
return RaiseWheel(element, int(value * WheelDelta()), Orientation_Vertical);
}
// ...
bool Mouse::RaiseWheel(UIElement* element, int rotation, Orientation orientation) // rotation = 0 for high FPS
{
...
}
- It's possible to get View::Scroll and Mouse::Scroll not to lose tiny values at high FPS?
- Would Win32Display::EnterMessageLoop need to be modified to run at certain FPS?
- We are worried about dropped frames loosing input, do buttons/Rstick/etc input get cached till next fetch? or can one (ay at 5fps) press button fast enough that up/down event happens within single update and get lost?
-- From Win32Display looks like most buttons done via messages but RStick/LT/RT is a fetch from state_.Gamepad.wButtons .. which I'm not can catch fast button events at low fps, does it?
-- Edit1 Can confirm that none of the inputs get lost during dropped frames, dpad/facebuttons/and RStick all process input fine.