Skip to content

Commit

Permalink
Merge pull request #21 from prsolucoes/master
Browse files Browse the repository at this point in the history
support for osx
  • Loading branch information
kisvegabor committed Aug 28, 2018
2 parents 8ba8b12 + 3a15a65 commit ca9e413
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ int main(int argc, char** argv)
* It could be done in a timer interrupt or an OS task too.*/
lv_task_handler();
usleep(1000); /*Just to let the system breath*/

#if __APPLE__ && TARGET_OS_MAC
SDL_Event event;

while(SDL_PollEvent(&event)) {
#if USE_MOUSE != 0
mouse_handler(&event);
#endif

#if USE_KEYBOARD
keyboard_handler(&event);
#endif
}
#endif
}

return 0;
Expand Down

0 comments on commit ca9e413

Please sign in to comment.