コード例 #1
0
static void
AfterStartup()
{
  StartupLogFreeRamAndStorage();

  if (is_simulator()) {
    InputEvents::processGlideComputer(GCE_STARTUP_SIMULATOR);
  } else {
    InputEvents::processGlideComputer(GCE_STARTUP_REAL);
  }

  OrderedTask *defaultTask = LoadDefaultTask(CommonInterface::GetComputerSettings().task,
                                             &way_points);
  if (defaultTask) {
    {
      ScopeSuspendAllThreads suspend;
      defaultTask->CheckDuplicateWaypoints(way_points);
      way_points.Optimise();
    }

    protected_task_manager->TaskCommit(*defaultTask);
    delete defaultTask;
  }

  task_manager->Resume();

#ifdef USE_GDI
  CommonInterface::main_window->Fullscreen();
#endif

  InfoBoxManager::SetDirty();

  ForceCalculation();
}
コード例 #2
0
ファイル: Startup.cpp プロジェクト: nkgautam/XCSoar
static void
AfterStartup()
{
  StartupLogFreeRamAndStorage();

#ifdef USE_LUA
  {
    Error error;
    const auto lua_path = LocalPath(_T("lua"));
    if (!Lua::StartFile(AllocatedPath::Build(lua_path, _T("init.lua")), error))
      LogError(error);
  }
#endif

  if (is_simulator()) {
    InputEvents::processGlideComputer(GCE_STARTUP_SIMULATOR);
  } else {
    InputEvents::processGlideComputer(GCE_STARTUP_REAL);
  }

  OrderedTask *defaultTask = LoadDefaultTask(CommonInterface::GetComputerSettings().task,
                                             &way_points);
  if (defaultTask) {
    {
      ScopeSuspendAllThreads suspend;
      defaultTask->CheckDuplicateWaypoints(way_points);
      way_points.Optimise();
    }

    protected_task_manager->TaskCommit(*defaultTask);
    delete defaultTask;
  }

  task_manager->Resume();

  InfoBoxManager::SetDirty();

  ForceCalculation();
}