scanse / sweep-sdk

Sweep SDK
MIT License
90 stars 85 forks source link

MacOS - cannot fetch event from a worker thread (OS X restriction) #114

Open salman451 opened 7 years ago

salman451 commented 7 years ago

sweep firmware version

1.4 #### libsweep version + affected bindings 1.2.1 libsweep/examples/viewer.cc #### operating system macOS Sierra 10.12.5 #### Platform/Hardware Setup MacBook pro 12,5 (2015) #### Description:

In /libsweep/examples/ when i run example-viewer, it repeatedly gives me the message:

"cannot fetch event from a worker thread (OS X restriction)"

daniel-j-h commented 7 years ago

Seems like a macOS limitation we're hitting with sfml2 here:

https://github.com/SFML/SFML/blob/bd479c4454c0322f60386e5644495400703e41f3/src/SFML/Window/OSX/SFViewController.mm#L243-L261

which means we can not handle events in the worker thread here. We could work around that by scanning in the worker thread and doing all event polling and rendering in the main thread.