void init()

in coinrun/coinrun.cpp [1842:1862]


void init(int threads)
{
  if (bg_images.empty())
    try {
      resource_path = getenv("COINRUN_RESOURCES_PATH");
      if (resource_path == "") {
        throw std::runtime_error("missing environment variable COINRUN_RESOURCES_PATH");
      }
      images_load();
    } catch (const std::exception &e) {
      fprintf(stderr, "ERROR: %s\n", e.what());
      return;
    }

  assert(all_threads.empty());
  all_threads.resize(threads);
  for (int t = 0; t < threads; t++) {
    all_threads[t] = std::shared_ptr<QThread>(new SteppingThread(t));
    all_threads[t]->start();
  }
}