12 int main(int argc, char *argv[])
14 // - Load configuration (from file and argv)
17 config.parseCommandline(argc, argv);
19 catch(const std::exception& e) {
20 fprintf(stderr, "Exception: %s\n", e.what());
24 Graphics::Initialise(config.m_video);
26 Input::Initialise(config.m_input);
28 // - Initialise compositor structures
29 Compositor::Initialise(config.m_compositor);
30 // - Bind IPC channels
31 IPC::Initialise(config.m_ipc);
32 // - Start root child process (from config)
33 // TODO: Spin up child process
41 Input::FillSelect(&nfd, &rfds);
42 IPC::FillSelect(&nfd, &rfds);
45 int64_t timeout = Timing::GetTimeToNextEvent();
46 int rv = ::_SysSelect(nfd, &rfds, NULL, &rfds, NULL, 0);
48 Timing::CheckEvents();
50 Input::HandleSelect(&rfds);
51 IPC::HandleSelect(&rfds);