ovrInput State: How to get button state correctly
I'm a native C# coder so my C++ is a little rusty. How can you check if a button was pressed in this frame and not just held down? Is there an event or something I can hook into instead of using a while statement?
while (true)
{
ovrInputState inputState;
if (OVR_SUCCESS(ovr_GetInputState(session, ovrControllerType_Touch, &inputState)))
{
if (inputState.Buttons & ovrButton_Enter)
{
std::cout << "Pressed" << std::endl;
}
}
}
