EnvironmentOptions::EnvironmentOptions() : mWindowName(), mWindowClassName(), mNetworkControl(0), mFpsFrequency(0), mUpdateStatusFrequency(0), mObjectProfilerInterval( 0 ), mPerformanceStatsLevel(0), mPerformanceStatsFrequency( DEFAULT_STATISTICS_LOG_FREQUENCY ), mPerformanceTimeStampOutput(0), mPanGestureLoggingLevel(0), mPanGesturePredictionMode(-1), mPanGesturePredictionAmount(-1), ///< only sets value in pan gesture if greater than 0 mPanGestureMaxPredictionAmount(-1), mPanGestureMinPredictionAmount(-1), mPanGesturePredictionAmountAdjustment(-1), mPanGestureSmoothingMode(-1), mPanGestureSmoothingAmount(-1.0f), mPanMinimumDistance(-1), mPanMinimumEvents(-1), mGlesCallTime(0), mWindowWidth( 0 ), mWindowHeight( 0 ) { ParseEnvironmentOptions(); }
void Adaptor::Initialize() { ParseEnvironmentOptions(); mPlatformAbstraction = new SlpPlatform::SlpPlatformAbstraction; if( mEnvironmentOptions.GetPerformanceLoggingLevel() > 0 ) { mPerformanceInterface = PerformanceInterfaceFactory::CreateInterface( *this, mEnvironmentOptions ); } mCallbackManager = CallbackManager::New(); PositionSize size = mSurface->GetPositionSize(); mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager); mGLES = new GlImplementation; mEglFactory = new EglFactory(); EglSyncImplementation* eglSyncImpl = mEglFactory->GetSyncImplementation(); mCore = Integration::Core::New( *this, *mPlatformAbstraction, *mGLES, *eglSyncImpl, *mGestureManager ); mNotificationTrigger = new TriggerEvent( boost::bind(&Adaptor::ProcessCoreEvents, this) ); mVSyncMonitor = new VSyncMonitor; mUpdateRenderController = new UpdateRenderController( *this, mEnvironmentOptions ); mDaliFeedbackPlugin = new FeedbackPluginProxy( FeedbackPluginProxy::DEFAULT_OBJECT_NAME ); // Should be called after Core creation if( mEnvironmentOptions.GetPanGestureLoggingLevel() ) { Integration::EnableProfiling( Dali::Integration::PROFILING_TYPE_PAN_GESTURE ); } Integration::SetPanGesturePredictionMode(mEnvironmentOptions.GetPanGestureSmoothingMode()); }
//***************************************************************************** // // Main Program // //***************************************************************************** int main(int argc, const char **argv) { int iDrive = 0; unsigned int iNumDrives; PSTR pchTemp = NULL; #ifdef _DOS setvbuf(stdout, NULL, _IONBF, 0); #endif usFirstDisk = fSwitches = 0; DisplayMessage(IDS_EGOLINE, VERSION); ParseEnvironmentOptions("QF_OPT"); if (!(parms(&argc, (const PPSTR) argv + 1) - 1)) usage(TRUE); else argv++; #ifndef _WINDOWS signal(SIGINT, c_break); // set ctrl-break handler #endif #if !defined(_WINDOWS) && !defined(__OS2__) && !defined(WIN32) _harderr(handler); // set hardware error handler #endif // get original drive and directory ... _dos_getdrive(&usFirstDisk); getcwd(szOriginalPath, sizeof(szOriginalPath)); _dos_setdrive(usFirstDisk, (unsigned int *) &iNumDrives); splitfilespec((char *) strupr((char *) *argv), szFileName, (unsigned int *) &iDrive); if (!isvalid(iDrive) || bError) // invalid drive specified. { BELL(); DisplayMessage(IDS_INVALIDDRIVE); exit(1); } if ((fSwitches & DELETEFILE) && (fSwitches & NOPROMPT)) if (!ShowNoPromptMessage(iDrive, szFileName)) c_break(0); if (fSwitches & ALLDRIVES) { for (iDrive = 1; iDrive <= floppies(); iDrive++) { if (isvalid(iDrive) && !bError) { _dos_setdrive(iDrive, &iNumDrives); walkdirs("\\", 0, filefind); } if (bError) bError = FALSE; } for (floppies() + 1; iDrive <= iNumDrives; iDrive++) { if (isvalid(iDrive) && !bError) { _dos_setdrive(iDrive, &iNumDrives); getcwd(curdir, sizeof(curdir)); // save current directory on walkdirs("\\", 0, filefind); // alternate drives chdir(curdir); } if (bError) bError = FALSE; } } else { _dos_setdrive(iDrive, &iNumDrives); getcwd(curdir, sizeof(curdir)); // save current directory on alternate drives if (fSwitches & FROM_CURDIR) // Only search current directory and subdirs walkdirs(szOriginalPath, 1, filefind); else walkdirs("\\", 0, filefind); chdir(curdir); } _dos_setdrive(usFirstDisk, &iNumDrives); chdir(szOriginalPath); // print totals if (!(fSwitches & NOFILEINFO)) { if (fSwitches & SUBDIRTOT) { if (ulDirs || ulTotal) { PSTR pchNumFiles = NULL; printf("\n ================ ===========\n"); pchTemp = LongToString(ulTotalFileSize, pchTemp, 11, LTS_PADLEFT); pchNumFiles = LongToString(ulTotal + ulDirs, NULL, 16, LTS_PADLEFT); printf (" %s %s total files/bytes in all directories\n", pchNumFiles, pchTemp); if (pchNumFiles) free(pchNumFiles); usLineCount += 3; } } if (ulDirs || ulTotal) { printf("\n"); if (ulDirs) { pchTemp = LongToString(ulDirs, pchTemp, 11, LTS_PADLEFT); printf(" %s directory(s) found.\n", pchTemp); } pchTemp = LongToString(ulTotal, pchTemp, 11, LTS_PADLEFT); printf(" %s file(s) found.\n", pchTemp); } else printf("\nNo files found.\n"); if ((fSwitches & DELETEFILE) && ulTotal) { pchTemp = LongToString((LONG) nDeleted, pchTemp, 11, LTS_PADLEFT); printf(" %s file(s) deleted.\n", pchTemp); } if (fSwitches & LOG) { unassign(); printf(" done."); } } // free the memory that MIGHT have been allocated by LongToString. if (pchTemp) free(pchTemp); return (0); }