@LmanTW Not at the moment, and sadly I have no plans to fix this. In the beginning I was hoping to make this lib support worker threads but there are some obstacles to this. The biggest one is that the SDL event loop itself does not play well with threads.
It would be best if you only ever require() and use this lib from the main thread. If you need to interact with sdl from a worker therad you should post a message to the main thread and handle it there. I will add code in future versions to enforce this.
@LmanTW Not at the moment, and sadly I have no plans to fix this. In the beginning I was hoping to make this lib support worker threads but there are some obstacles to this. The biggest one is that the SDL event loop itself does not play well with threads.
It would be best if you only ever require() and use this lib from the main thread. If you need to interact with sdl from a worker therad you should post a message to the main thread and handle it there. I will add code in future versions to enforce this.