Skip to content

Problems building on OS X #25

Description

@tnlogy

Have anyone managed to get InfiniSim running on OS X? I've made a small attempt, but haven't had much success. I did get it to show the start screen, but no events are working (maybe due to that I had to rewrite some code).

Summary of making it compile:
Change to using https://github.com/trenki2/SDL2Test/blob/master/cmake/FindSDL2.cmake to find SDL. (Installed with the downloadable dmg-file with development libraries from SDL homepage https://www.libsdl.org/download-2.0.php)

Then I had to change some code in the Alarmcontroller.cpp:
auto now = std::chrono::system_clock::now(); alarmTime = now; time_t ttAlarmTime = std::chrono::system_clock::to_time_t(now);

Then I had to remove the call:
// SDL_CreateThread(tick_thread, "tick", NULL);

And modify the while loop to force the UI to be visible:
SDL_Event e; bool quit = false; while(!quit) { SDL_PollEvent(&e); if (e.type == SDL_QUIT){ quit = true; } // SDL_Delay(LV_DISP_DEF_REFR_PERIOD); // lv_tick_inc(LV_DISP_DEF_REFR_PERIOD); // Crashed when called here or in tick_thread. fw.handle_keys(); // key event polling fw.handle_touch_and_button(); fw.refresh(); usleep(LV_DISP_DEF_REFR_PERIOD * 1000); }

If I run it with unmodified code it crashes with: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'

Maybe this can be of help if someone else tries to make it work on a Mac?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions