-
Notifications
You must be signed in to change notification settings - Fork 209
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
Workaround to run under MacOS #12
Comments
Hi, Thank you for the reporting the issue and telling our solution. I implemented SDL_Iinit in a thread because on Windows drawing was possible on in that "context" when the init was called. So the init was required to move to the thread where the drawing happens. I will immerse in it as I will have time. Until that time your solution surely will help to others on OSX. |
I ran into the same problem with SDL. I am using Eclipse Photon Release (4.8.0) and was having the exact issue you described. Waiting for hardware and wanted to get started understanding this UX library. |
It works perfectly on my MacOS 10.14. I owe you a beer! |
I've got the same issue. |
Hi, I have create two pull requests to make it work on OSX latest version. Tested locally: Thanks. |
Both merged! Thank you very much! It should solve the majoraíty of the OSX issues, so close these issue. |
I just tried building from the github master and running on my system (High Sierra, eclipse, sdl2 installed from Homebrew) and got the same crash. The only change I needed to make to get it to build was to remove the It looks like the SDL event pump is still running from the monitor thread. It looks like this was broken in commit 5e42767 when |
Yep, I see the same crash again. It runs if you wrap the |
Hi, I fixed it here: https://github.com/littlevgl/lv_drivers/blob/master/display/monitor.c#L299 |
Hi,
I just started using the PC_SIMULATOR under MacOS 10.12.6 and I ran into the following issue.
Using the default source code when running the pc_simulator application the app crashes with the following message
This seems to be due to the fact that you can't Poll from event outside the main thread, at least it seems to be an issue on MacOS, I don't have experience with SDL. Currently monitor.c initialises SDL and monitors for mouse and keyboard events.
To workaround this issue, what I did was.
I modified monitor_init() so that the SDL initialisation is done from main.c thread like so,
I then modified the monitor thread to just do the drawing routines,
On the main.c thread I included the polling for mouse and keyboard events like so,
There is probably a better way to do this, but because I have zero experience with SDL I'm not sure of other solution may apply.
Cheers,
Martin
The text was updated successfully, but these errors were encountered: