pjlbyrne's picture

InputDriver.Poll is still required to get joystick state

Project:The Open Toolkit library
Version:1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:open
Description

Perhaps it shouldn't be but it is. Maybe there is an underlying issue to be fixed here, or something else I should be doing, but in the meantime here is a proposed fix for the OpenTK example InputLogger.cs:

void LaunchGameWindow()
{
    ..
    hidden.UpdateFrame += hidden_UpdateFrame;
    ..
}
 
void hidden_UpdateFrame(object sender, FrameEventArgs e)
{
    ((GameWindow)sender).InputDriver.Poll();
}

I find that joystick input in the example program is not picked up without this change.