[SDL] Polling SDL events in a Mac/Cocoa App?
cuecax at gmail.com
Tue Feb 14 06:50:06 PST 2012
Well, it seems that I was too wordy. =P
In short: could anyone suggest me a good way to use SDL events in a cocoa app structure?
Thanks in advance ;)
> Hello everybody,
> Right now, I am developing a joy2key-like app for Mac OS X (you probably know this program =] . But, for those that dont know, it is an app for windows to simulate keyboard/mouse events with a joystick). My plan is to sell it on Mac App Store.
> Its core is currently at a very advanced state, working pretty well and mostly done.
> And I am using SDL, of course =] . The only mac specific stuff is the event sending code.
> At first, I was planning to use only SDL, including UI rendering. But after working for some days in UI code, I realized that I won't have time to finish it in this week*, then, I started coding the UI in cocoa, and it is mostly done.
> Due to nature of cocoa, and the lack of control of the mainloop in a default Cocoa app, my first thought was to create a thread for SDL, but after q quick googling I see that the general rule is "Don't call SDL video/event functions from separate threads" =/, does this still apply to SDL 1.3/2.0 ?
> Basically, I have a usual SDL main loop polling for joystick/keyboard events.
> So, what you think will be the best approach to integrate with a cocoa app and still poll for events?
> Thanks for the Help!
> Rodrigo Cardoso
> *(Note about my hurry: There will be some horribly sandboxing rules that will affect my app, and I want to release it before the rules start applying for new apps in March 1st. So I will have time to figure out what I need to change to comply these ugly rules...)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL