コード例 #1
0
// Parameter-Konstruktor
CDatabase_Connection::CDatabase_Connection(string user, string password, string DB, string Host, int Port)
{
    try
    {
        mysql_init(&my);
        LoadDefaults();
        setUsername(user);
        setPassword(password);
        setDB(DB);
        setHost(Host);
        setPort(Port);

        this->connected = false;
        this->initialised = false;



    }
    catch(...)
    {
		cerr << "An unexpected error occured in function 'Default-Constructor'!" << endl;
    }


}
コード例 #2
0
void CAccelerator::LoadShortcuts(CSettings *pSettings)
{
	// Set up names and default values
	LoadDefaults();

	m_iUsedKeys.clear();		// // //

	// Load custom values, if exists
	/*
		location priorities:
		1. HKCU/SOFTWARE/0CC-FamiTracker
		1. HKCU/SOFTWARE/0CC-FamiTracker, original key
		2. HKCU/SOFTWARE/FamiTracker
		3. HKCU/SOFTWARE/FamiTracker, original key (using stAccelEntry::orig_name)
		4. default value
	*/
	for (auto &x : m_pEntriesTable) {		// // //
		int Setting = (x.mod << 8) | x.key;
		{		// // //
			stOldSettingContext s;
			if (x.orig_name != nullptr)		// // //
				Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.orig_name, Setting);
			Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.name, Setting);
		}
		if (x.orig_name != nullptr)		// // //
			Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.orig_name, Setting);
		Setting = theApp.GetProfileInt(SHORTCUTS_SECTION, x.name, Setting);

		x.key = Setting & 0xFF;
		x.mod = Setting >> 8;
		if (x.mod == MOD_NONE && x.key)		// // //
			m_iUsedKeys.insert(x.key);
	}
}
コード例 #3
0
ファイル: CoreParameter.cpp プロジェクト: Asmodean-/dolphin
SCoreStartupParameter::SCoreStartupParameter()
: bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false),
  bJITNoBlockCache(false), bJITNoBlockLinking(false),
  bJITOff(false),
  bJITLoadStoreOff(false), bJITLoadStorelXzOff(false),
  bJITLoadStorelwzOff(false), bJITLoadStorelbzxOff(false),
  bJITLoadStoreFloatingOff(false), bJITLoadStorePairedOff(false),
  bJITFloatingPointOff(false), bJITIntegerOff(false),
  bJITPairedOff(false), bJITSystemRegistersOff(false),
  bJITBranchOff(false),
  bJITILTimeProfiling(false), bJITILOutputIR(false),
  bFPRF(false),
  bCPUThread(true), bDSPThread(false), bDSPHLE(true),
  bSkipIdle(true), bNTSC(false), bForceNTSCJ(false),
  bHLE_BS2(true), bEnableCheats(false),
  bMergeBlocks(false), bEnableMemcardSaving(true),
  bDPL2Decoder(false), iLatency(14),
  bRunCompareServer(false), bRunCompareClient(false),
  bBAT(false), bMMU(false), bDCBZOFF(false),
  iBBDumpPort(0), bVBeamSpeedHack(false),
  bSyncGPU(false), bFastDiscSpeed(false),
  SelectedLanguage(0), bWii(false),
  bConfirmStop(false), bHideCursor(false),
  bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
  iRenderWindowXPos(-1), iRenderWindowYPos(-1),
  iRenderWindowWidth(640), iRenderWindowHeight(480),
  bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
  bFullscreen(false), bRenderToMain(false),
  bProgressive(false), bDisableScreenSaver(false),
  iPosX(100), iPosY(100), iWidth(800), iHeight(600),
  bLoopFifoReplay(true)
{
	LoadDefaults();
}
コード例 #4
0
ファイル: PMultiWii.cpp プロジェクト: sooyewguan/RobotChipKit
void MultiWii_setup() {
    
  SerialOpen(SERIAL0_COM_SPEED);

#if defined(TRACE)
  Serial.println("Start MultiWii_setup");
#endif 
  
  initOutput();

  LoadDefaults();
       
  configureReceiver();

  initSensors();

  previousTime = micros();

  calibratingA = 0;
  calibratingG = 512;

#if defined(TRACE)
  Serial.println("End MultiWii_setup");
#endif 
  
}
コード例 #5
0
ファイル: AtmoConfig.cpp プロジェクト: banketree/faplayer
CAtmoConfig::CAtmoConfig()
{
  // setup basic configruation structures...
  m_IsShowConfigDialog = 0;
  m_eAtmoConnectionType = actClassicAtmo;
  for(int i=0;i<10;i++)
      m_ChannelAssignments[i] = NULL;

#if defined (_ATMO_VLC_PLUGIN_)
  m_devicename = NULL;
  m_devicenames[0] = NULL;
  m_devicenames[1] = NULL;
  m_devicenames[2] = NULL;
#endif
  // load all config values with there defaults
  m_ZoneDefinitions  = NULL;
  m_AtmoZoneDefCount = -1;
  m_DMX_BaseChannels = NULL;

  m_chWhiteAdj_Red   = NULL;
  m_chWhiteAdj_Green = NULL;
  m_chWhiteAdj_Blue  = NULL;

  LoadDefaults();
}
コード例 #6
0
ファイル: GUIIncludes.cpp プロジェクト: Razzeee/xbmc
bool CGUIIncludes::Load_Internal(const std::string &file)
{
  // check to see if we already have this loaded
  if (HasLoaded(file))
    return true;

  CXBMCTinyXML doc;
  if (!doc.LoadFile(file))
  {
    CLog::Log(LOGINFO, "Error loading include file %s: %s (row: %i, col: %i)", file.c_str(), doc.ErrorDesc(), doc.ErrorRow(), doc.ErrorCol());
    return false;
  }

  TiXmlElement *root = doc.RootElement();
  if (!root || !StringUtils::EqualsNoCase(root->Value(), "includes"))
  {
    CLog::Log(LOGERROR, "Error loading include file %s: Root element <includes> required.", file.c_str());
    return false;
  }

  // load components
  LoadDefaults(root);
  LoadConstants(root);
  LoadExpressions(root);
  LoadVariables(root);
  LoadIncludes(root);

  m_files.push_back(file);

  return true;
}
コード例 #7
0
ConfigManager::ConfigManager(wxString apath):lang(LS_INIT) {
	
	pseint_dir = apath;
	version=0; 
	
#if defined(_WIN32) || defined(__WIN32__)
	home_dir = DIR_PLUS_FILE(wxFileName::GetHomeDir(),"pseint");
#else
	home_dir = DIR_PLUS_FILE(wxFileName::GetHomeDir(),".pseint");
#endif
	if (!wxFileName::DirExists(home_dir))
		wxFileName::Mkdir(home_dir);
	if (wxFileName::FileExists("config.here"))
		filename="config.here";
	else
		filename = DIR_PLUS_FILE(home_dir,"config");
	LoadDefaults();
	Read();
#if defined(__WIN32__)
#elif defined(__APPLE__)
	tty_command="./mac-terminal-wrapper.bin";
#else
	wxFileName f_path = wxGetCwd(); 
	f_path.MakeAbsolute();
//	pseint_command = DIR_PLUS_FILE(f_path.GetFullPath(),"pseint");
//	if (pseint_command.Contains(" ")) pseint_command=wxString("\"")<<pseint_command<<"\"";
#endif
	
	lang.Log();
}
コード例 #8
0
SConfig::SConfig()
{
  LoadDefaults();
  // Make sure we have log manager
  LoadSettings();
  LoadSettingsFromSysconf();
}
コード例 #9
0
ファイル: KeyBindings.cpp プロジェクト: Arkazon/spring
bool CKeyBindings::Load(const string& filename)
{
//	inComment = false;
	CFileHandler ifs(filename);
	CSimpleParser parser(ifs);

	userCommand = false; // temporarily disable Sanitize() calls

	LoadDefaults();

	while (true) {
		const string line = parser.GetCleanLine();
		if (line.empty()) {
			break;
		}
		if (!ExecuteCommand(line)) {
			ParseTypeBind(parser, line);
		}
	}

	Sanitize();

	userCommand = true; // re-enable Sanitize() calls

	return true;
}
コード例 #10
0
bool readEEPROM() {
  uint8_t i;
  global_conf.currentSet=0;
  eeprom_read_block((void*)&conf, (void*)(global_conf.currentSet * sizeof(conf) + sizeof(global_conf)), sizeof(conf));
  print("Calcul Eprom = %d, Read conf = %d \n\r", calculate_sum((uint8_t*)&conf, sizeof(conf)), conf.checksum);
  if(calculate_sum((uint8_t*)&conf, sizeof(conf)) != conf.checksum) {
	print("Loading Defaults\n\r");
    blinkLED(6,100,3);
    LoadDefaults();                 // force load defaults
    return false;                   // defaults loaded, don't reload constants (EEPROM life saving)
  }
  // 500/128 = 3.90625    3.9062 * 3.9062 = 15.259   1526*100/128 = 1192
  for(i=0;i<5;i++) {
    lookupPitchRollRC[i] = (1526+conf.rcExpo8*(i*i-15))*i*(int32_t)conf.rcRate8/1192;
  }
  for(i=0;i<11;i++) {
    int16_t tmp = 10*i-conf.thrMid8;
    uint8_t y = 1;
    if (tmp>0) y = 100-conf.thrMid8;
    if (tmp<0) y = conf.thrMid8;
    lookupThrottleRC[i] = 10*conf.thrMid8 + tmp*( 100-conf.thrExpo8+(int32_t)conf.thrExpo8*(tmp*tmp)/(y*y) )/10; // [0;1000]
    lookupThrottleRC[i] = conf.minthrottle + (int32_t)(MAXTHROTTLE-conf.minthrottle)* lookupThrottleRC[i]/1000;  // [0;1000] -> [conf.minthrottle;MAXTHROTTLE]
  }
  return true;    // setting is OK
}
コード例 #11
0
ファイル: Tags.cpp プロジェクト: SteveDaulton/audacity
Tags::Tags()
{
   mEditTitle = true;
   mEditTrackNumber = true;

   LoadDefaults();
   LoadGenres();
}
コード例 #12
0
ファイル: Settings.cpp プロジェクト: PKEuS/Medieval-War
Settings::Settings(int argc, char* argv[]) :
myArgc(argc), myArgv(argv)
{
	std::stringstream stringstream; stringstream << sf::Style::Close;
	WindowStyleClose = stringstream.str();
	stringstream.clear(); stringstream << sf::Style::Fullscreen;
	WindowStyleFullscreen = stringstream.str();
	WindowStyleEmulation = "0";
	
	LoadDefaults();
}
コード例 #13
0
bool pawsConfigTooltips::Initialize()
{
    colorPicker = NULL;

    if (!LoadFromFile("configtooltips.xml"))
        return false;

    if (!LoadDefaults())
        return false;

    return true;
}
コード例 #14
0
ファイル: RotationStore.cpp プロジェクト: aurickq/monkeybot
RotationStore::RotationStore(Config& config) {
    memset(m_Rotations, 0, sizeof(u64) * 8 * 40);

    for (int ship = 0; ship < 8; ++ship) {
        if (config.ShipRotations[ship].size() != 40) {
            LoadDefaults();
            return;
        }

        for (size_t i = 0; i < config.ShipRotations[ship].size(); ++i)
            m_Rotations[ship][i] = config.ShipRotations[ship][i];
    }
}
コード例 #15
0
ファイル: Accelerator.cpp プロジェクト: darvin/nesicide
void CAccelerator::LoadShortcuts(CSettings *pSettings)
{
	// Set up names and default values
	LoadDefaults();

	// Load custom values, if exists
	for (int i = 0; i < ACCEL_COUNT; ++i) {
		int Default = (EntriesTable[i].mod << 8) | EntriesTable[i].key;
		int Setting = pSettings->LoadSetting(SHORTCUTS_SECTION, EntriesTable[i].name, Default);
		EntriesTable[i].key = Setting & 0xFF;
		EntriesTable[i].mod = Setting >> 8;
	}
}
コード例 #16
0
void pawsConfigTooltips::SetDefault()
{
    psengine->GetVFS()->DeleteFile(CONFIG_TOOLTIPS_FILE_NAME);
    LoadDefaults();

    // transfer default values to standard variables
    PawsManager::GetSingleton().setToolTipEnable(defToolTipEnable);
    PawsManager::GetSingleton().setToolTipEnableBgColor(defToolTipEnableBgColor);
    PawsManager::GetSingleton().setTooltipsColors(0, defTooltipsColors[0]);
    PawsManager::GetSingleton().setTooltipsColors(1, defTooltipsColors[1]);
    PawsManager::GetSingleton().setTooltipsColors(2, defTooltipsColors[2]);

    LoadConfig();
}
コード例 #17
0
// Konstruktor
CDatabase_Connection::CDatabase_Connection()
{
	try
	{
		mysql_init(&my);
		LoadDefaults();
		this->connected = false;
		this->initialised = false;
	}
	catch(...)
	{
		cerr << "An unexpected error occured in function 'Default-Constructor'!" << endl;
	}
}
コード例 #18
0
ファイル: Atom.cpp プロジェクト: ebutusov/MRender
CAtom::CAtom(TCHAR *name)
{
	m_XCoord = 0.0f;
	m_YCoord = 0.0f;
	m_ZCoord = 0.0f;
	m_ScaledSize = 1.0f;
	_tcsncpy_s(m_Name, name, 3);
  m_bSkip = false;
	memset(m_FullName, 0, sizeof(m_FullName));
	// TODO: check if defauts were loaded, if not, remove this atom
	// and its links from the molecule
	LoadDefaults();
	m_IsOnTheMove = false;
}
コード例 #19
0
ファイル: InputEvents.cpp プロジェクト: damianob/xcsoar_mess
// Read the data files
void
InputEvents::readFile()
{
  LogStartUp(_T("Loading input events file"));

  // clear the GCE and NMEA queues
  ClearQueues();

  LoadDefaults(input_config);

  // Read in user defined configuration file
  std::unique_ptr<TLineReader> reader(OpenConfiguredTextFile(szProfileInputFile));
  if (reader)
    ::ParseInputFile(input_config, *reader);
}
コード例 #20
0
ファイル: EEPROM.cpp プロジェクト: ifmansour/MultiWii
bool readEEPROM() {
  uint8_t i;
  #ifdef MULTIPLE_CONFIGURATION_PROFILES
    if(global_conf.currentSet>2) global_conf.currentSet=0;
  #else
    global_conf.currentSet=0;
  #endif
  eeprom_read_block((void*)&conf, (void*)(global_conf.currentSet * sizeof(conf) + sizeof(global_conf)), sizeof(conf));
  if(calculate_sum((uint8_t*)&conf, sizeof(conf)) != conf.checksum) {
    blinkLED(6,100,3);    
    #if defined(BUZZER)
      alarmArray[7] = 3;
    #endif
    LoadDefaults();                 // force load defaults 
    return false;                   // defaults loaded, don't reload constants (EEPROM life saving)
  }
  
  // 500/128 = 3.90625    3.9062 * 3.9062 = 15.259   1526*100/128 = 1192
    conf.rcExpo8 = 0;
    conf.rcRate8 = PITCH_ROLL_RC_RATE_AIR;

  for(i=0;i<5;i++) {
    lookupPitchRollRC[i] = (1526+conf.rcExpo8*(i*i-15))*i*(int32_t)conf.rcRate8/1192;
  }
  
  for(i=0;i<11;i++) {
    //conf.thrExpo8 = 0;
    //conf.thrMid8 = 0;
    int16_t tmp = 10*i-conf.thrMid8;
    uint8_t y = 1;
    if (tmp>0) y = 100-conf.thrMid8;
    if (tmp<0) y = conf.thrMid8;
    lookupThrottleRC[i] = 10*conf.thrMid8 + tmp*( 100-conf.thrExpo8+(int32_t)conf.thrExpo8*(tmp*tmp)/(y*y) )/10; // [0;1000]
    //lookupThrottleRC[i] = conf.minthrottle + (int32_t)(MAXTHROTTLE - conf.minthrottle)* lookupThrottleRC[i]/1000;  // [0;1000] -> [conf.minthrottle;MAXTHROTTLE]
    lookupThrottleRC[i] = conf.minthrottle + (int32_t)(maxThrottle-conf.minthrottle)* lookupThrottleRC[i]/1000;  // [0;1000] -> [conf.minthrottle;MAXTHROTTLE]
  }

  #if defined(POWERMETER)
    pAlarm = (uint32_t) conf.powerTrigger1 * (uint32_t) PLEVELSCALE * (uint32_t) PLEVELDIV; // need to cast before multiplying
  #endif
  #if GPS
    GPS_set_pids();    // at this time we don't have info about GPS init done
  #endif
  #if defined(ARMEDTIMEWARNING)
    ArmedTimeWarningMicroSeconds = (conf.armedtimewarning *1000000);
  #endif
  return true;    // setting is OK
}
コード例 #21
0
ファイル: KeyBindings.cpp プロジェクト: spring/spring
bool CKeyBindings::Load(const std::string& filename)
{
    CFileHandler ifs(filename);
    CSimpleParser parser(ifs);
    buildHotkeyMap = false; // temporarily disable BuildHotkeyMap() calls
    LoadDefaults();

    while (!parser.Eof()) {
        const std::string line = parser.GetCleanLine();
        ExecuteCommand(line);
    }

    BuildHotkeyMap();
    buildHotkeyMap = true; // re-enable BuildHotkeyMap() calls
    return true;
}
コード例 #22
0
ファイル: D3D10Shader.cpp プロジェクト: Heli-GitHub/OBS
bool D3D10Shader::ProcessData(ShaderProcessor &processor, CTSTR lpFileName)
{
    Params.TransferFrom(processor.Params);
    Samplers.TransferFrom(processor.Samplers);

    constantSize = 0;
    for(UINT i=0; i<Params.Num(); i++)
    {
        ShaderParam &param = Params[i];

        switch(param.type)
        {
            case Parameter_Bool:
            case Parameter_Float:
            case Parameter_Int:         constantSize += sizeof(float); break;
            case Parameter_Vector2:     constantSize += sizeof(float)*2; break;
            case Parameter_Vector:      constantSize += sizeof(float)*3; break;
            case Parameter_Vector4:     constantSize += sizeof(float)*4; break;
            case Parameter_Matrix3x3:   constantSize += sizeof(float)*3*3; break;
            case Parameter_Matrix:      constantSize += sizeof(float)*4*4; break;
        }
    }

    if(constantSize)
    {
        D3D11_BUFFER_DESC bd;
        zero(&bd, sizeof(bd));

        bd.ByteWidth        = (constantSize+15)&0xFFFFFFF0; //align to 128bit boundry
        bd.Usage            = D3D11_USAGE_DYNAMIC;
        bd.BindFlags        = D3D11_BIND_CONSTANT_BUFFER;
        bd.CPUAccessFlags   = D3D11_CPU_ACCESS_WRITE;

        HRESULT err = GetD3D()->CreateBuffer(&bd, NULL, &constantBuffer);
        if(FAILED(err))
        {
            AppWarning(TEXT("Unable to create constant buffer for shader '%s', result = %08lX"), lpFileName, err);
            return false;
        }
    }

    LoadDefaults();

    return true;
}
コード例 #23
0
ファイル: ConfigFile.cpp プロジェクト: murdockq/OpenPaint
ConfigFile::ConfigFile(std::string filename, std::string identifier, bool bAddDefaultsToConfig)
{
    m_strFilename = filename;
    m_strIdentifier = identifier;
    m_bAddDefaultsToConfig = bAddDefaultsToConfig;
    m_bOpenSuccessful = false;
    bIsModified = false;

    //Add default configurations
    LoadDefaults();
    
    m_bOpenSuccessful = ReadConfigFile();
    if(!m_bOpenSuccessful)
    {
        std::cout << "Failed to read config file. Using defaults." << std::endl;
    }
    
}
コード例 #24
0
bool CClientVariables::Load ( void )
{
    // Get the root node
    CXMLNode *pRoot = CCore::GetSingleton ().GetConfig ();
    if ( !pRoot )
        return false;
    m_iRevision++;

    // Load the cvars
    m_pStorage = pRoot->FindSubNode ( CONFIG_NODE_CVARS );
    if ( !m_pStorage ) {
        // Non-existant, create a new node
        m_pStorage = pRoot->CreateSubNode ( CONFIG_NODE_CVARS );
    }

    // Verify that at least all the defaults are in
    LoadDefaults ();

    return true;
}
コード例 #25
0
ファイル: NoiseGate.cpp プロジェクト: Alucard014/OBS
NoiseGate::NoiseGate()
    : micSource(NULL)
    , filter(NULL)
    , settings(NULL)
    , config()
    , isDisabledFromConfig(false)
    //, isEnabled() // Initialized in LoadDefaults()
    //, openThreshold()
    //, closeThreshold()
    //, attackTime()
    //, holdTime()
    //, releaseTime()
{
    LoadDefaults();
    config.Open(OBSGetPluginDataPath() + CONFIG_FILENAME, true);
    LoadSettings();

    // Create settings pane
    settings = new NoiseGateSettings(this);
    OBSAddSettingsPane(settings);
}
コード例 #26
0
ファイル: EEPROM.cpp プロジェクト: MORP/MyMultiwii
bool readEEPROM() {
  uint8_t i;
  int8_t tmp;
  uint8_t y;

  #ifdef MULTIPLE_CONFIGURATION_PROFILES
    if(global_conf.currentSet>2) global_conf.currentSet=0;
  #else
    global_conf.currentSet=0;
  #endif
  eeprom_read_block((void*)&conf, (void*)(global_conf.currentSet * sizeof(conf) + sizeof(global_conf)), sizeof(conf));
  if(calculate_sum((uint8_t*)&conf, sizeof(conf)) != conf.checksum) {
    blinkLED(6,100,3);    
    SET_ALARM_BUZZER(ALRM_FAC_CONFIRM, ALRM_LVL_CONFIRM_ELSE);
    LoadDefaults();                 // force load defaults 
    return false;                   // defaults loaded, don't reload constants (EEPROM life saving)
  }
  // 500/128 = 3.90625    3.9062 * 3.9062 = 15.259   1526*100/128 = 1192
  for(i=0;i<5;i++) {
    lookupPitchRollRC[i] = (1526+conf.rcExpo8*(i*i-15))*i*(int32_t)conf.rcRate8/1192;
  }
  for(i=0;i<11;i++) {
    tmp = 10*i-conf.thrMid8;
    y = conf.thrMid8;
    if (tmp>0) y = 100-y;
    lookupThrottleRC[i] = 100*conf.thrMid8 + tmp*( (int32_t)conf.thrExpo8*(tmp*tmp)/((uint16_t)y*y)+100-conf.thrExpo8 );       // [0;10000]
    lookupThrottleRC[i] = conf.minthrottle + (uint32_t)((uint16_t)(MAXTHROTTLE-conf.minthrottle))* lookupThrottleRC[i]/10000;  // [0;10000] -> [conf.minthrottle;MAXTHROTTLE]
  }
  #if defined(POWERMETER)
    pAlarm = (uint32_t) conf.powerTrigger1 * (uint32_t) PLEVELSCALE * (uint32_t) PLEVELDIV; // need to cast before multiplying
  #endif
  #if GPS
    GPS_set_pids();    // at this time we don't have info about GPS init done
    recallGPSconf();   // Load gps parameters
  #endif
  #if defined(ARMEDTIMEWARNING)
    ArmedTimeWarningMicroSeconds = (conf.armedtimewarning *1000000);
  #endif
  return true;    // setting is OK
}
コード例 #27
0
ファイル: AtmoConfig.cpp プロジェクト: FLYKingdom/vlc
CAtmoConfig::CAtmoConfig()
{
  // setup basic configruation structures...
  m_IsShowConfigDialog = 0;
  m_eAtmoConnectionType = actSerialPort;
  for(int i=0;i<10;i++)
      m_ChannelAssignments[i] = NULL;
#if defined (_ATMO_VLC_PLUGIN_)
  m_devicename = NULL;
#endif
  // load all config values with there defaults
  LoadDefaults();

  //   CAtmoZoneDefinition *m_ZoneDefinitions[ATMO_NUM_CHANNELS];
  // generate default channel parameters which may be loaded later from .bmp files
  for(int i=0;i<ATMO_NUM_CHANNELS;i++) {
      m_ZoneDefinitions[i] = new CAtmoZoneDefinition();
      m_ZoneDefinitions[i]->setZoneNumber(i);
      switch(i) {
          case 0:  // summary channel
              m_ZoneDefinitions[i]->Fill(255);
              break;
          case 1: // left channel
              m_ZoneDefinitions[i]->FillGradientFromLeft();
              break;
          case 2: // right channel
              m_ZoneDefinitions[i]->FillGradientFromRight();
              break;
          case 3: // top channel
              m_ZoneDefinitions[i]->FillGradientFromTop();
              break;
          case 4: // bottom channel
              m_ZoneDefinitions[i]->FillGradientFromBottom();
              break;
      }
  }
}
コード例 #28
0
bool CKeyBindings::Load(const string& filename)
{
	inComment = false;
	lineNumber = 0;
	CFileHandler ifs(filename);
	
	userCommand = false; // temporarily disable Sanitize() calls
	
	LoadDefaults();
	
	while (true) {
		const string line = GetCleanLine(ifs);
		if (line.empty()) {
			break;
		}
		Command(line);
	}
	
	Sanitize();
	
	userCommand = true; // re-enable Sanitize() calls

	return true;
}
コード例 #29
0
	void OnRehash(User* user)
	{
		statsmap.clear();
		if (ServerInstance->Config->ConfValue("namedstats")->getBool("enabledefaults", true))
			LoadDefaults();

		ConfigTagList tags = ServerInstance->Config->ConfTags("statsname");
		for (ConfigIter i = tags.first; i != tags.second; ++i)
		{
			ConfigTag* tag = i->second;
			std::string name = tag->getString("name");
			std::string ch = tag->getString("char");

			if ((!name.empty()) && (ch.length() == 1))
			{
				if (!statsmap.insert(std::make_pair(irc::string(name.c_str()), ch[0])).second)
					ServerInstance->Logs->Log("m_namedstats", DEFAULT, "Name already exists in <statsname> entry at " + tag->getTagLocation());
			}
			else
			{
				ServerInstance->Logs->Log("m_namedstats", DEFAULT, "Invalid name or char in <statsname> entry at " + tag->getTagLocation());
			}
		}
	}
コード例 #30
0
ファイル: ConfigManager.cpp プロジェクト: CarlKenner/dolphin
SConfig::SConfig()
    : bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false), bJITNoBlockCache(false),
      bJITNoBlockLinking(false), bJITOff(false), bJITLoadStoreOff(false),
      bJITLoadStorelXzOff(false), bJITLoadStorelwzOff(false), bJITLoadStorelbzxOff(false),
      bJITLoadStoreFloatingOff(false), bJITLoadStorePairedOff(false), bJITFloatingPointOff(false),
      bJITIntegerOff(false), bJITPairedOff(false), bJITSystemRegistersOff(false),
      bJITBranchOff(false), bJITILTimeProfiling(false), bJITILOutputIR(false), bFPRF(false),
      bAccurateNaNs(false), iTimingVariance(40), bCPUThread(true), bDSPThread(false), bDSPHLE(true),
      bSkipIdle(true), bSyncGPUOnSkipIdleHack(true), bNTSC(false), bForceNTSCJ(false),
      bHLE_BS2(true), bEnableCheats(false), bEnableMemcardSdWriting(true), bDPL2Decoder(false),
      iLatency(14), bRunCompareServer(false), bRunCompareClient(false), bMMU(false),
      bDCBZOFF(false), iBBDumpPort(0), bFastDiscSpeed(false), bSyncGPU(false), SelectedLanguage(0),
      bOverrideGCLanguage(false), bWii(false), bConfirmStop(false), bHideCursor(false),
      bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
      iRenderWindowXPos(-1), iRenderWindowYPos(-1), iRenderWindowWidth(640),
      iRenderWindowHeight(480), bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
      bFullscreen(false), bRenderToMain(false), bProgressive(false), bPAL60(false),
      bDisableScreenSaver(false), iPosX(100), iPosY(100), iWidth(800), iHeight(600),
      m_analytics_enabled(false), m_analytics_permission_asked(false), bLoopFifoReplay(true)
{
  LoadDefaults();
  // Make sure we have log manager
  LoadSettings();
}