Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread timeout settable, keyboard, mouse detection info #2905

Merged
merged 3 commits into from Apr 3, 2014
Merged

Thread timeout settable, keyboard, mouse detection info #2905

merged 3 commits into from Apr 3, 2014

Conversation

jvcleave
Copy link
Member

@jvcleave jvcleave commented Apr 2, 2014

ofAppEGLWindow calls waitForThread which by default has an infinite timeout. This can causes certain apps to hang indefinitely. This gives the user an option to set the timeout

This also adds 2 methods hasMouse() and hasKeyboard() so an app can tell whether a mouse/keyboard have been detected. This can be useful in writing examples for different configurations
i.e

ofAppEGLWindow *appEGLWindow = (ofAppEGLWindow *) ofGetWindowPtr();
if(appEGLWindow->hasMouse()) x = mouseX;

ofTheo added a commit that referenced this pull request Apr 3, 2014
…ments

Thread timeout settable, keyboard, mouse detection info
@ofTheo ofTheo merged commit af36a17 into openframeworks:master Apr 3, 2014
@arturoc
Copy link
Member

arturoc commented Apr 3, 2014

the setThreadTimeOut method seems a little weird, you need to know details about the destructor implementation to know what's going on. do we need to join the thread at all?

@jvcleave
Copy link
Member Author

jvcleave commented Apr 3, 2014

@arturoc yeah - I agree it is weird. I was mostly trying to avoid adding back in the hardcoded 10 seconds that we just removed from ofThread. I can try removing it and test as well.

@bakercp - any thoughts on removing waitForThread from here?
https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/app/ofAppEGLWindow.cpp#L814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants