示例#1
0
void fill_image_data(GDALImage *image)
{
    GDALResult result;
    // Open GDAL File
    image->dataset = GDALOpen(image->filepath, GA_ReadOnly);
    FAILIF(image->dataset, NULL, "Unable to open file.");
    // Get file information
    image->driver         = GDALGetDatasetDriver(image->dataset);
    image->original_width  = GDALGetRasterXSize(image->dataset);
    image->original_height = GDALGetRasterYSize(image->dataset);
    image->band_count      = limit_band_count(GDALGetRasterCount(image->dataset));

    // Open first band to get block information
    image->current_band = GDALGetRasterBand(image->dataset, 1);
    result = GDALGetGeoTransform(image->dataset, image->geo_transform);
    FAILIF(result, CE_Failure, "Failed to get GeoTransform data");
    GDALGetBlockSize(image->current_band, &image->block_size.x, &image->block_size.y);
    image->output_size.x = image->block_size.x/image->scale;
    image->output_size.y = image->block_size.y/image->scale;
    image->num_blocks.x = image->original_width/image->block_size.x;
    image->num_blocks.y = image->original_height/image->block_size.y;

    DEFAULT(image->num_blocks.x, 0, 1);
    DEFAULT(image->num_blocks.y, 0, 1);
    DEFAULT(image->output_size.x, 0, 1);
    DEFAULT(image->output_size.y, 0, 1);
}
示例#2
0
void bud_config_set_backend_defaults(bud_config_backend_t* backend) {
  DEFAULT(backend->port, 0, 8000);
  DEFAULT(backend->host, NULL, "127.0.0.1");
  DEFAULT(backend->keepalive, -1, kBudDefaultKeepalive);
  DEFAULT(backend->proxyline, -1, 0);
  DEFAULT(backend->xforward, -1, 0);
}
示例#3
0
void LogSQLite::createSchema() {
	static const char *schema = "\
		CREATE TABLE IF NOT EXISTS log_names \
			( timestamp INTEGER DEFAULT(strftime('%s', 'now')) \
			, channel TEXT NOT NULL \
			, namesList TEXT NOT NULL \
			); \
		CREATE TABLE IF NOT EXISTS log_nick \
			( timestamp INTEGER DEFAULT(strftime('%s', 'now')) \
			, channel TEXT NOT NULL \
			, oldNick TEXT NOT NULL \
			, newNick TEXT NOT NULL \
			); \
		CREATE TABLE IF NOT EXISTS log_quit \
			( timestamp INTEGER DEFAULT(strftime('%s', 'now')) \
			, channel TEXT NOT NULL \
			, nick TEXT NOT NULL \
			, quitMessage TEXT NOT NULL \
			); \
		CREATE TABLE IF NOT EXISTS log_join \
			( timestamp INTEGER DEFAULT(strftime('%s', 'now')) \
			, channel TEXT NOT NULL \
			, nick TEXT NOT NULL \
			); \
		CREATE TABLE IF NOT EXISTS log_privmsg \
			( timestamp INTEGER DEFAULT(strftime('%s', 'now')) \
			, channel TEXT NOT NULL \
			, nick TEXT NOT NULL \
			, message TEXT NOT NULL \
			); \
		CREATE VIEW IF NOT EXISTS log AS SELECT type, datetime || ' ' || line FROM \
			( \
				SELECT 'privmsg' AS type, datetime(timestamp, 'unixepoch') AS datetime, '|' || channel || '| <' || nick || '> ' || message AS line FROM log_privmsg \
			UNION ALL \
				SELECT 'names' AS type, datetime(timestamp, 'unixepoch') AS datetime, '|' || channel || '| Users in channel: ' || namesList AS line FROM log_names \
			UNION ALL \
				SELECT 'nick' AS type, datetime(timestamp, 'unixepoch') AS datetime, '|' || channel || '| ' || oldNick || ' changed his nick to ' || newNick AS line FROM log_nick \
			UNION ALL \
				SELECT 'join' AS type, datetime(timestamp, 'unixepoch') AS datetime, '|' || channel || '| ' || nick || ' joined' AS line FROM log_join \
			UNION ALL \
				SELECT 'quit' AS type, datetime(timestamp, 'unixepoch') AS datetime, '|' || channel || '| ' || nick || ' has left (' || quitMessage || ')' AS line FROM log_quit \
			) \
			ORDER BY datetime; \
		";
	char *errorMessagesPtr = NULL;
	if(sqlite3_exec(connection, schema, NULL, NULL, &errorMessagesPtr) != SQLITE_OK) {
		std::string errorMessages(errorMessagesPtr);
		sqlite3_free(errorMessagesPtr);
		throw std::runtime_error("SQLite error: " + errorMessages);
	}
}
std::string Name(Process process)
{
    INFO0;
    switch (process) {
    case Process::TthLep : return "Tth-lep";
    case Process::TthHad : return "Tth-had";
    case Process::TT : return "TT";
    case Process::ttBjj : return "ttBJJ";
    case Process::tthBjj : return "tthBjj";
    case Process::ttBBjj : return "ttBBjj";
    case Process::ttBB : return "ttBB";
    case Process::TTh : return "TTh";
    case Process::ttWWW : return "ttWWW";
    case Process::ttWWB : return "ttWWB";
    case Process::ttWBB : return "ttWBB";
    case Process::ttBBB : return "ttBBB";
    case Process::TThh : return "TThh";
    case Process::ttWWWW : return "ttWWWW";
    case Process::ttWWWB : return "ttWWWB";
    case Process::ttWWBB : return "ttWWBB";
    case Process::ttWBBB : return "ttWBBB";
    case Process::ttBBBB : return "ttBBBB";
        DEFAULT("Process", "");
    }
}
示例#5
0
void Base::Run(Output output)
{
    INFO(boca::Name(output));
    Initialize();
    //   analysis.PreRequisits<analysis.Tagger()::type>(analysis,run);
    FlagSwitch(output, [&](Output output_2) {
        switch (output_2) {
        case Output::fast : RunFast();
            break;
        case Output::normal : RunNormal();
            break;
        case Output::efficiency : RunFullEfficiency();
            break;
        case Output::significance : RunFullSignificance();
            break;
        case Output::plot : RunPlots();
            break;
        case Output::cut : RunCut();
            break;
        case Output::plot_hist : RunPlotHist();
            break;
            DEFAULT(boca::Name(output_2));
        }
    });
}
bool MassDependent(Process process)
{
    INFO0;
    switch (process) {
    case Process::TthLep : return true;
    case Process::TthHad : return true;
    case Process::TT : return true;
    case Process::ttBjj : return false;
    case Process::tthBjj : return false;
    case Process::ttBBjj : return false;
    case Process::ttBB : return false;
    case Process::TTh : return true;
    case Process::ttWWW : return false;
    case Process::ttWWB : return false;
    case Process::ttWBB : return false;
    case Process::ttBBB : return false;
    case Process::TThh : return true;
    case Process::ttWWWW : return false;
    case Process::ttWWWB : return false;
    case Process::ttWWBB : return false;
    case Process::ttWBBB : return false;
    case Process::ttBBBB : return false;
        DEFAULT(toppartner::Name(process), false);
    }
}
示例#7
0
文件: config.c 项目: indutny/bud
void bud_config_set_frontend_defaults(bud_config_frontend_t* frontend) {
  int i;

  DEFAULT(frontend->port, 0, 1443);
  DEFAULT(frontend->host, NULL, "0.0.0.0");
  DEFAULT(frontend->security, NULL, "ssl23");
  DEFAULT(frontend->keepalive, -1, kBudDefaultKeepalive);
  DEFAULT(frontend->max_send_fragment, -1, 1400);
  DEFAULT(frontend->allow_half_open, -1, 0);
  DEFAULT(frontend->reneg_window, 0, 600);
  DEFAULT(frontend->reneg_limit, -1, 3);

  for (i = 0; i < frontend->interface.count; i++) {
    DEFAULT(frontend->interface.list[i].port, 0, 1443);
    DEFAULT(frontend->interface.list[i].host, NULL, "0.0.0.0");
  }
}
示例#8
0
std::string Name(Stage stage)
{
    switch (stage) {
    case Stage::trainer : return "Trainer";
    case Stage::reader : return "Reader";
        DEFAULT(to_int(stage), "");
    }
}
示例#9
0
long Base::EventNumberMax(Stage stage) const
{
    switch (stage) {
    case Stage::trainer : return TrainNumberMax();
    case Stage::reader : return ReadNumberMax();
        DEFAULT(boca::Name(stage), 0);
    }
}
示例#10
0
boca::Range< double > Base::MvaRange() const
{
    switch (Mva()) {
    case TMVA::Types::kCuts : return { -1 , 1};
    case TMVA::Types::kBDT : return {0 , 1};
        DEFAULT(MvaName(), boca::Range< double >(0, 0));
    }
}
示例#11
0
std::vector<std::string> Base::TreeNames(Tag tag) const
{
    INFO0;
    switch (tag) {
    case Tag::signal : return signal_tree_names_;
    case Tag::background : return background_tree_names_;
        DEFAULT(boca::Name(tag), {});
    }
}
示例#12
0
std::string Base::MethodName() const
{
    INFO0;
    switch (Mva()) {
    case TMVA::Types::EMVA::kBDT : return "Bdt";
    case TMVA::Types::EMVA::kCuts : return "Cuts";
        DEFAULT(Mva(), "");
    }
}
示例#13
0
std::string Base::Name(Stage stage) const
{
    INFO0;
    switch (stage) {
    case Stage::trainer : return TrainerName();
    case Stage::reader : return ReaderName();
        DEFAULT(boca::Name(stage), "");
    }
}
示例#14
0
std::string Base::FileName(Stage stage, Tag tag) const
{
    INFO0;
    switch (tag) {
    case Tag::signal : return SignalFileName(stage);
    case Tag::background : return BackgroundFileName(stage);
        DEFAULT(boca::Name(tag), "");
    }
}
示例#15
0
std::string Base::FileName(Phase const& phase) const
{
    INFO0;
    switch (phase.Tag()) {
    case Tag::signal : return SignalFileName(phase.Stage());
    case Tag::background : return BackgroundFileName(phase.Stage());
        DEFAULT(boca::Name(phase.Tag()), "");
    }
}
示例#16
0
std::string Name(TopTagger top_tagger)
{
    switch (top_tagger) {
      case TopTagger::boca : return "BoCA";
      case TopTagger::hep : return "HEP";
      case TopTagger::hep2 : return "HEP_2";
        DEFAULT(to_int(top_tagger), "");
    }
}
示例#17
0
std::string Base::SignalFileName(Stage stage) const
{
    INFO0;
//     auto name = SignalName();
    auto name = Name();
    switch (stage) {
    case Stage::trainer : name = TrainerName(name);
        break;
    case Stage::reader : name = ReaderName(name);
        break;
        DEFAULT(boca::Name(stage), "");
    }
    return PathName(SignalName(name));
}
std::string Name(DetectorPart detector_part)
{
    switch (detector_part) {
    case DetectorPart::none :
        return "None";
    case DetectorPart::gen_particle :
        return "gen_particle";
    case DetectorPart::track :
        return "track";
    case DetectorPart::photon :
        return "photon";
    case DetectorPart::tower :
        return "tower";
    case DetectorPart::muon :
        return "muon";
        DEFAULT(to_int(detector_part), "");
    }
}
示例#19
0
std::string Name(JetDetail jet_detail)
{
    std::string name;
    FlagSwitch(jet_detail, [&](JetDetail jet_detail) {
        switch (jet_detail) {
        case JetDetail::none : name += "None ";
            break;
        case JetDetail::plain : name += "Plain ";
            break;
        case JetDetail::isolation : name += "Isolation ";
            break;
        case JetDetail::structure : name += "Structure ";
            break;
            DEFAULT(to_int(jet_detail));
        }
    });
    return name;
}
std::vector<Sextet33> TopLeptonicPair::Truth(boca::Event const& event, std::vector<Sextet33> sextets, Tag tag) const
{
    switch (tag) {
    case Tag::signal : {
        auto tops = CopyIfParticle(event.GenParticles(), Id::top);
        std::vector<Sextet33> final_sextets;
        for (auto const & sextet : sextets) {
            auto truth_level = false;
            for (auto const & top : tops) {
                if (Close<boca::Jet>(top)(sextet.Triplet1())) truth_level = true;
                if (Close<boca::Jet>(top)(sextet.Triplet2())) truth_level = true;
            }
            if (truth_level) final_sextets.emplace_back(sextet);
        }
        return final_sextets;
    }
    case Tag::background :
        return sextets;
        DEFAULT(boca::Name(tag), {});
    }
}
示例#21
0
int ColorCode(int number)
{
    INFO0;
    switch (number) {
    case 0 : return kBlack;
    case 1 : return kRed;
    case 2 : return kBlue;
    case 3 : return kTeal - 5;
    case 4 : return kPink + 1;
    case 5 : return kViolet;
    case 6 : return kOrange;
    case 7 : return kGreen + 3;
    case 8 : return kCyan - 3;
    case 9 : return kMagenta - 3;
    case 10 : return kAzure;
    case 11 : return kYellow - 9;
    case 12 : return kSpring - 5;
    case 13 : return kGray;
        DEFAULT(number, kBlack);
    }
}
示例#22
0
latex::String LatexName(Process process)
{
    INFO0;
    switch (process) {
    case Process::TT : return "T_{h}T_{l}";
    case Process::ttBjj : return "t_{l}t_{h}B^{0}jj";
    case Process::tthBjj : return "t_{l}t_{h}hB^{0}jj";
    case Process::TthLep : return "T_{l}t_{h}h";
    case Process::TthHad : return "T_{h}t_{l}h";
    case Process::TTh : return "T_{l}T_{h}h";
    case Process::ttWWW : return "t_{l}t_{h}W^{#pm}W^{#mp}W^{#pm}";
    case Process::ttWWB : return "t_{l}t_{h}W^{#pm}W^{#mp}B^{0}";
    case Process::ttWBB : return "t_{l}t_{h}W^{#pm}B^{0}B^{0}";
    case Process::ttBBB : return "t_{l}t_{h}B^{0}B^{0}B^{0}";
    case Process::TThh : return "T_{l}T_{h}hh";
    case Process::ttBB : return "t_{l}t_{h}B^{0}B^{0}";
    case Process::ttWWWW : return "t_{l}t_{h}W^{#pm}W^{#mp}W^{#pm}W^{#mp}";
    case Process::ttWWWB : return "t_{l}t_{h}W^{#pm}W^{#mp}W^{#pm}B^{0}";
    case Process::ttWWBB : return "t_{l}t_{h}W^{#pm}W^{#mp}B^{0}B^{0}";
    case Process::ttWBBB : return "t_{l}t_{h}W^{#pm}B^{0}B^{0}B^{0}";
    case Process::ttBBBB : return "t_{l}t_{h}B^{0}B^{0}B^{0}B^{0}";
        DEFAULT(toppartner::Name(process), "");
    }
}
示例#23
0
static void
protosw_init(struct protosw *pr)
{
	struct pr_usrreqs *pu;

	pu = pr->pr_usrreqs;
	KASSERT(pu != NULL, ("protosw_init: %ssw[%d] has no usrreqs!",
	    pr->pr_domain->dom_name,
	    (int)(pr - pr->pr_domain->dom_protosw)));

	/*
	 * Protocol switch methods fall into three categories: mandatory,
	 * mandatory but protosw_init() provides a default, and optional.
	 *
	 * For true protocols (i.e., pru_attach != NULL), KASSERT truly
	 * mandatory methods with no defaults, and initialize defaults for
	 * other mandatory methods if the protocol hasn't defined an
	 * implementation (NULL function pointer).
	 */
#if 0
	if (pu->pru_attach != NULL) {
		KASSERT(pu->pru_abort != NULL,
		    ("protosw_init: %ssw[%d] pru_abort NULL",
		    pr->pr_domain->dom_name,
		    (int)(pr - pr->pr_domain->dom_protosw)));
		KASSERT(pu->pru_send != NULL,
		    ("protosw_init: %ssw[%d] pru_send NULL",
		    pr->pr_domain->dom_name,
		    (int)(pr - pr->pr_domain->dom_protosw)));
	}
#endif

#define DEFAULT(foo, bar)	if ((foo) == NULL)  (foo) = (bar)
	DEFAULT(pu->pru_accept, pru_accept_notsupp);
	DEFAULT(pu->pru_aio_queue, pru_aio_queue_notsupp);
	DEFAULT(pu->pru_bind, pru_bind_notsupp);
	DEFAULT(pu->pru_bindat, pru_bindat_notsupp);
	DEFAULT(pu->pru_connect, pru_connect_notsupp);
	DEFAULT(pu->pru_connect2, pru_connect2_notsupp);
	DEFAULT(pu->pru_connectat, pru_connectat_notsupp);
	DEFAULT(pu->pru_control, pru_control_notsupp);
	DEFAULT(pu->pru_disconnect, pru_disconnect_notsupp);
	DEFAULT(pu->pru_listen, pru_listen_notsupp);
	DEFAULT(pu->pru_peeraddr, pru_peeraddr_notsupp);
	DEFAULT(pu->pru_rcvd, pru_rcvd_notsupp);
	DEFAULT(pu->pru_rcvoob, pru_rcvoob_notsupp);
	DEFAULT(pu->pru_sense, pru_sense_null);
	DEFAULT(pu->pru_shutdown, pru_shutdown_notsupp);
	DEFAULT(pu->pru_sockaddr, pru_sockaddr_notsupp);
	DEFAULT(pu->pru_sosend, sosend_generic);
	DEFAULT(pu->pru_soreceive, soreceive_generic);
	DEFAULT(pu->pru_sopoll, sopoll_generic);
	DEFAULT(pu->pru_ready, pru_ready_notsupp);
#undef DEFAULT
	if (pr->pr_init)
		(*pr->pr_init)();
}
示例#24
0
static const char*
interfaceIdToString (SLInterfaceID interfaceId)
{
#define CHECK(x) interfaceId == (x) ? #x :
#define DEFAULT(x) x

	return CHECK(SL_IID_EQUALIZER)
		CHECK(SL_IID_BASSBOOST)
		CHECK(SL_IID_VIRTUALIZER)
		CHECK(SL_IID_PRESETREVERB)
		CHECK(SL_IID_ENVIRONMENTALREVERB)
		CHECK(SL_IID_3DCOMMIT)
		CHECK(SL_IID_3DDOPPLER)
		CHECK(SL_IID_3DGROUPING)
		CHECK(SL_IID_3DLOCATION)
		CHECK(SL_IID_3DMACROSCOPIC)
		CHECK(SL_IID_3DSOURCE)
		CHECK(SL_IID_AUDIODECODERCAPABILITIES)
		CHECK(SL_IID_AUDIOENCODER)
		CHECK(SL_IID_AUDIOENCODERCAPABILITIES)
		CHECK(SL_IID_AUDIOIODEVICECAPABILITIES)
		CHECK(SL_IID_BUFFERQUEUE)
		CHECK(SL_IID_DEVICEVOLUME)
		CHECK(SL_IID_DYNAMICINTERFACEMANAGEMENT)
		CHECK(SL_IID_DYNAMICSOURCE)
		CHECK(SL_IID_EFFECTSEND)
		CHECK(SL_IID_ENGINE)
		CHECK(SL_IID_ENGINECAPABILITIES)
		CHECK(SL_IID_LED)
		CHECK(SL_IID_METADATAEXTRACTION)
		CHECK(SL_IID_METADATATRAVERSAL)
		CHECK(SL_IID_MIDIMESSAGE)
		CHECK(SL_IID_MIDIMUTESOLO)
		CHECK(SL_IID_MIDITEMPO)
		CHECK(SL_IID_MIDITIME)
		CHECK(SL_IID_MUTESOLO)
		CHECK(SL_IID_NULL)
		CHECK(SL_IID_OBJECT)
		CHECK(SL_IID_OUTPUTMIX)
		CHECK(SL_IID_PITCH)
		CHECK(SL_IID_PLAY)
		CHECK(SL_IID_PLAYBACKRATE)
		CHECK(SL_IID_PREFETCHSTATUS)
		CHECK(SL_IID_RATEPITCH)
		CHECK(SL_IID_RECORD)
		CHECK(SL_IID_SEEK)
		CHECK(SL_IID_THREADSYNC)
		CHECK(SL_IID_VIBRA)
		CHECK(SL_IID_VISUALIZATION)
		CHECK(SL_IID_VOLUME)
		CHECK(SL_IID_ANDROIDEFFECT)
		CHECK(SL_IID_ANDROIDEFFECTCAPABILITIES)
		CHECK(SL_IID_ANDROIDEFFECTSEND)
		CHECK(SL_IID_ANDROIDCONFIGURATION)
		CHECK(SL_IID_ANDROIDSIMPLEBUFFERQUEUE)
#if TOSHOK_HONEYCOMB_HACK
		CHECK(SL_IID_ANDROIDBUFFERQUEUE)
		CHECK(XA_IID_ENGINE)
		CHECK(XA_IID_PLAY)
		CHECK(XA_IID_ANDROIDBUFFERQUEUE)
#endif
		DEFAULT(unknownInterfaceToString (interfaceId));
}
示例#25
0
void bud_config_set_defaults(bud_config_t* config) {
  int i;

  DEFAULT(config->worker_count, -1, 1);
  DEFAULT(config->restart_timeout, -1, 250);
  DEFAULT(config->log.level, NULL, "info");
  DEFAULT(config->log.facility, NULL, "user");
  DEFAULT(config->log.stdio, -1, 1);
  DEFAULT(config->log.syslog, -1, 0);
  DEFAULT(config->availability.death_timeout, -1, 1000);
  DEFAULT(config->availability.revive_interval, -1, 2500);
  DEFAULT(config->availability.retry_interval, -1, 250);
  DEFAULT(config->availability.max_retries, -1, 5);
  DEFAULT(config->frontend.port, 0, 1443);
  DEFAULT(config->frontend.host, NULL, "0.0.0.0");
  DEFAULT(config->frontend.security, NULL, "ssl23");
  DEFAULT(config->frontend.ecdh, NULL, "prime256v1");
  DEFAULT(config->frontend.keepalive, -1, kBudDefaultKeepalive);
  DEFAULT(config->frontend.server_preference, -1, 1);
  DEFAULT(config->frontend.ssl3, -1, 0);
  DEFAULT(config->frontend.max_send_fragment, -1, 1400);
  DEFAULT(config->frontend.allow_half_open, -1, 0);
  DEFAULT(config->frontend.cert_file, NULL, "keys/cert.pem");
  DEFAULT(config->frontend.key_file, NULL, "keys/key.pem");
  DEFAULT(config->frontend.reneg_window, 0, 600);
  DEFAULT(config->frontend.reneg_limit, 0, 3);
  DEFAULT(config->balance, NULL, "roundrobin");

  for (i = 0; i < config->backend_count; i++)
    bud_config_set_backend_defaults(&config->backend[i]);

  DEFAULT(config->sni.port, 0, 9000);
  DEFAULT(config->sni.host, NULL, "127.0.0.1");
  DEFAULT(config->sni.url, NULL, "/bud/sni/%s");
  DEFAULT(config->stapling.port, 0, 9000);
  DEFAULT(config->stapling.host, NULL, "127.0.0.1");
  DEFAULT(config->stapling.url, NULL, "/bud/stapling/%s");
}
示例#26
0
void CClientVariables::LoadDefaults ( void )
{
    #define DEFAULT(__x,__y)    if(!Exists(__x)) \
                                Set(__x,__y)
    #define _S(__x)             std::string(__x)

    if(!Exists("nick")) 
    {
        DEFAULT ( "nick",                       _S(GenerateNickname()) );       // nickname
        CCore::GetSingleton ().RequestNewNickOnStart();  // Request the user to set a new nickname
    }

    DEFAULT ( "host",                       _S("127.0.0.1") );              // hostname
    DEFAULT ( "port",                       22003 );                        // port
    DEFAULT ( "password",                   _S("") );                       // password
    DEFAULT ( "qc_host",                    _S("127.0.0.1") );              // quick connect hostname
    DEFAULT ( "qc_port",                    22003 );                        // quick connect port
    DEFAULT ( "qc_password",                _S("") );                       // quick connect password
    DEFAULT ( "debugfile",                  _S("") );                       // debug filename
    DEFAULT ( "console_pos",                CVector2D ( 0, 0 ) );           // console position
    DEFAULT ( "console_size",               CVector2D ( 200, 200 ) );       // console size
    DEFAULT ( "serverbrowser_size",         CVector2D ( 720.0f, 495.0f ) ); // serverbrowser size
    DEFAULT ( "fps_limit",                  100 );                          // frame limiter
    DEFAULT ( "chat_font",                  0 );                            // chatbox font type
    DEFAULT ( "chat_lines",                 7 );                            // chatbox lines
    DEFAULT ( "chat_color",                 CColor (0,0,128,100) );         // chatbox color
    DEFAULT ( "chat_text_color",            CColor (172,213,254,255) );     // chatbox text color
    DEFAULT ( "chat_input_color",           CColor (0,0,191,110) );         // chatbox input color
    DEFAULT ( "chat_input_prefix_color",    CColor (172,213,254,255) );     // chatbox prefix input color
    DEFAULT ( "chat_input_text_color",      CColor (172,213,254,255) );     // chatbox text input color
    DEFAULT ( "chat_scale",                 CVector2D ( 1.0f, 1.0f ) );     // chatbox scale
    DEFAULT ( "chat_width",                 1.0f );                         // chatbox width
    DEFAULT ( "chat_css_style_text",        false );                        // chatbox css/hl style text
    DEFAULT ( "chat_css_style_background",  false );                        // chatbox css/hl style background
    DEFAULT ( "chat_line_life",             12000 );                        // chatbox line life time
    DEFAULT ( "chat_line_fade_out",         3000 );                         // chatbox line fade out time
    DEFAULT ( "chat_use_cegui",             false );                        // chatbox uses cegui
    DEFAULT ( "text_scale",                 1.0f );                         // text scale
    DEFAULT ( "invert_mouse",               false );                        // mouse inverting
    DEFAULT ( "fly_with_mouse",             false );                        // flying with mouse controls
    DEFAULT ( "steer_with_mouse",           false );                        // steering with mouse controls
    DEFAULT ( "classic_controls",           false );                        // classic/standard controls
    DEFAULT ( "mtavolume",                  1.0f );                         // custom sound's volume
    DEFAULT ( "voicevolume",                1.0f );                         // voice chat output volume
    DEFAULT ( "mapalpha",                   155 );                          // map alpha
    DEFAULT ( "browser_speed",              2 );                            // Browser speed
    DEFAULT ( "single_download",            0 );                            // Single connection for downloads
    DEFAULT ( "update_build_type",          0 );                            // 0-stable 1-test 2-nightly
    DEFAULT ( "volumetric_shadows",         0 );                            // Enable volumetric shadows
    DEFAULT ( "aspect_ratio",               0 );                            // Display aspect ratio
    DEFAULT ( "hud_match_aspect_ratio",     1 );                            // GTA HUD should match the display aspect ratio
    DEFAULT ( "anisotropic",                0 );                            // Anisotropic filtering
    DEFAULT ( "grass",                      1 );                            // Enable grass
    DEFAULT ( "heat_haze",                  1 );                            // Enable heat haze
    DEFAULT ( "fast_clothes_loading",       1 );                            // 0-off 1-auto 2-on
    DEFAULT ( "allow_screen_upload",        1 );                            // 0-off 1-on
    DEFAULT ( "max_clientscript_log_kb",    5000 );                         // Max size in KB (0-No limit)
    DEFAULT ( "display_fullscreen_style",   0 );                            // 0-standard 1-borderless 2-borderless keep res 3-borderless stretch
    DEFAULT ( "display_windowed",           0 );                            // 0-off 1-on
    DEFAULT ( "multimon_fullscreen_minimize", 1 );                          // 0-off 1-on
    DEFAULT ( "vertical_aim_sensitivity",   0.0015f );                      // 0.0015f is GTA default setting
    DEFAULT ( "process_priority",           0 );                            // 0-normal 1-above normal 2-high
    DEFAULT ( "mute_sfx_when_minimized",    0 );                            // 0-off 1-on
    DEFAULT ( "mute_radio_when_minimized",  0 );                            // 0-off 1-on
    DEFAULT ( "mute_mta_when_minimized",    0 );                            // 0-off 1-on
    DEFAULT ( "mute_voice_when_minimized",  0 );                            // 0-off 1-on

    // We will default this one at CClientGame.cpp, because we need a valid direct3d device to give a proper default value.
#if 0
    DEFAULT ( "streaming_memory",           50 );                           // Streaming memory
#endif
}
示例#27
0
int
t114_set_sdram_param(build_image_context *context,
                     u_int32_t index,
                     parse_token token,
                     u_int32_t value)
{
    nvboot_sdram_params *params;
    nvboot_config_table *bct = NULL;

    bct = (nvboot_config_table *)(context->bct);
    assert(context != NULL);
    assert(bct != NULL);
    params = &(bct->sdram_params[index]);
    /* Update the number of SDRAM parameter sets. */
    bct->num_sdram_sets = NV_MAX(bct->num_sdram_sets, index + 1);

    switch (token) {
        CASE_SET_SDRAM_PARAM(memory_type);
        CASE_SET_SDRAM_PARAM(pllm_input_divider);
        CASE_SET_SDRAM_PARAM(pllm_feedback_divider);
        CASE_SET_SDRAM_PARAM(pllm_stable_time);
        CASE_SET_SDRAM_PARAM(pllm_setup_control);
        CASE_SET_SDRAM_PARAM(pllm_select_div2);
        CASE_SET_SDRAM_PARAM(pllm_pdlshift_ph45);
        CASE_SET_SDRAM_PARAM(pllm_pdlshift_ph90);
        CASE_SET_SDRAM_PARAM(pllm_pdlshift_ph135);
        CASE_SET_SDRAM_PARAM(pllm_kcp);
        CASE_SET_SDRAM_PARAM(pllm_kvco);
        CASE_SET_SDRAM_PARAM(emc_bct_spare0);
        CASE_SET_SDRAM_PARAM(emc_auto_cal_interval);
        CASE_SET_SDRAM_PARAM(emc_auto_cal_config);
        CASE_SET_SDRAM_PARAM(emc_auto_cal_config2);
        CASE_SET_SDRAM_PARAM(emc_auto_cal_config3);
        CASE_SET_SDRAM_PARAM(emc_auto_cal_wait);
        CASE_SET_SDRAM_PARAM(emc_pin_program_wait);
        CASE_SET_SDRAM_PARAM(emc_rc);
        CASE_SET_SDRAM_PARAM(emc_rfc);
        CASE_SET_SDRAM_PARAM(emc_rfc_slr);
        CASE_SET_SDRAM_PARAM(emc_ras);
        CASE_SET_SDRAM_PARAM(emc_rp);
        CASE_SET_SDRAM_PARAM(emc_r2r);
        CASE_SET_SDRAM_PARAM(emc_w2w);
        CASE_SET_SDRAM_PARAM(emc_r2w);
        CASE_SET_SDRAM_PARAM(emc_w2r);
        CASE_SET_SDRAM_PARAM(emc_r2p);
        CASE_SET_SDRAM_PARAM(emc_w2p);
        CASE_SET_SDRAM_PARAM(emc_rd_rcd);
        CASE_SET_SDRAM_PARAM(emc_wr_rcd);
        CASE_SET_SDRAM_PARAM(emc_rrd);
        CASE_SET_SDRAM_PARAM(emc_rext);
        CASE_SET_SDRAM_PARAM(emc_wdv);
        CASE_SET_SDRAM_PARAM(emc_wdv_mask);
        CASE_SET_SDRAM_PARAM(emc_quse);
        CASE_SET_SDRAM_PARAM(emc_ibdly);
        CASE_SET_SDRAM_PARAM(emc_einput);
        CASE_SET_SDRAM_PARAM(emc_einput_duration);
        CASE_SET_SDRAM_PARAM(emc_puterm_extra);
        CASE_SET_SDRAM_PARAM(emc_cdb_cntl1);
        CASE_SET_SDRAM_PARAM(emc_cdb_cntl2);
        CASE_SET_SDRAM_PARAM(emc_qrst);
        CASE_SET_SDRAM_PARAM(emc_qsafe);
        CASE_SET_SDRAM_PARAM(emc_rdv);
        CASE_SET_SDRAM_PARAM(emc_rdv_mask);
        CASE_SET_SDRAM_PARAM(emc_refresh);
        CASE_SET_SDRAM_PARAM(emc_burst_refresh_num);
        CASE_SET_SDRAM_PARAM(emc_pdex2wr);
        CASE_SET_SDRAM_PARAM(emc_pdex2rd);
        CASE_SET_SDRAM_PARAM(emc_pchg2pden);
        CASE_SET_SDRAM_PARAM(emc_act2pden);
        CASE_SET_SDRAM_PARAM(emc_ar2pden);
        CASE_SET_SDRAM_PARAM(emc_rw2pden);
        CASE_SET_SDRAM_PARAM(emc_txsr);
        CASE_SET_SDRAM_PARAM(emc_tcke);
        CASE_SET_SDRAM_PARAM(emc_tckesr);
        CASE_SET_SDRAM_PARAM(emc_tpd);
        CASE_SET_SDRAM_PARAM(emc_tfaw);
        CASE_SET_SDRAM_PARAM(emc_trpab);
        CASE_SET_SDRAM_PARAM(emc_tclkstable);
        CASE_SET_SDRAM_PARAM(emc_tclkstop);
        CASE_SET_SDRAM_PARAM(emc_trefbw);
        CASE_SET_SDRAM_PARAM(emc_quse_extra);
        CASE_SET_SDRAM_PARAM(emc_fbio_cfg5);
        CASE_SET_SDRAM_PARAM(emc_fbio_cfg6);
        CASE_SET_SDRAM_PARAM(emc_fbio_spare);
        CASE_SET_SDRAM_PARAM(emc_mrs);
        CASE_SET_SDRAM_PARAM(emc_emrs);
        CASE_SET_SDRAM_PARAM(emc_emrs2);
        CASE_SET_SDRAM_PARAM(emc_emrs3);
        CASE_SET_SDRAM_PARAM(emc_mrw1);
        CASE_SET_SDRAM_PARAM(emc_mrw2);
        CASE_SET_SDRAM_PARAM(emc_mrw3);
        CASE_SET_SDRAM_PARAM(emc_mrw4);
        CASE_SET_SDRAM_PARAM(emc_mrw_reset_command);
        CASE_SET_SDRAM_PARAM(emc_mrw_reset_ninit_wait);
        CASE_SET_SDRAM_PARAM(emc_adr_cfg);
        CASE_SET_SDRAM_PARAM(mc_emem_cfg);
        CASE_SET_SDRAM_PARAM(emc_cfg);
        CASE_SET_SDRAM_PARAM(emc_cfg2);
        CASE_SET_SDRAM_PARAM(emc_dbg);
        CASE_SET_SDRAM_PARAM(emc_cfg_dig_dll);
        CASE_SET_SDRAM_PARAM(emc_cfg_dig_dll_period);
        CASE_SET_SDRAM_PARAM(warm_boot_wait);
        CASE_SET_SDRAM_PARAM(emc_ctt_term_ctrl);
        CASE_SET_SDRAM_PARAM(emc_odt_write);
        CASE_SET_SDRAM_PARAM(emc_odt_read);
        CASE_SET_SDRAM_PARAM(emc_zcal_wait_cnt);
        CASE_SET_SDRAM_PARAM(emc_zcal_mrw_cmd);
        CASE_SET_SDRAM_PARAM(emc_mrs_reset_dll);
        CASE_SET_SDRAM_PARAM(emc_mrs_reset_dll_wait);
        CASE_SET_SDRAM_PARAM(emc_emrs_ddr2_dll_enable);
        CASE_SET_SDRAM_PARAM(emc_mrs_ddr2_dll_reset);
        CASE_SET_SDRAM_PARAM(emc_emrs_ddr2_ocd_calib);
        CASE_SET_SDRAM_PARAM(emc_ddr2_wait);
        CASE_SET_SDRAM_PARAM(pmc_ddr_pwr);
        CASE_SET_SDRAM_PARAM(emc_clock_source);
        CASE_SET_SDRAM_PARAM(emc_pin_extra_wait);
        CASE_SET_SDRAM_PARAM(emc_timing_control_wait);
        CASE_SET_SDRAM_PARAM(emc_wext);
        CASE_SET_SDRAM_PARAM(emc_ctt);
        CASE_SET_SDRAM_PARAM(emc_ctt_duration);
        CASE_SET_SDRAM_PARAM(emc_prerefresh_req_cnt);
        CASE_SET_SDRAM_PARAM(emc_txsr_dll);
        CASE_SET_SDRAM_PARAM(emc_cfg_rsv);
        CASE_SET_SDRAM_PARAM(emc_mrw_extra);
        CASE_SET_SDRAM_PARAM(emc_warm_boot_mrw_extra);
        CASE_SET_SDRAM_PARAM(emc_warm_boot_extramode_reg_write_enable);
        CASE_SET_SDRAM_PARAM(emc_extramode_reg_write_enable);
        CASE_SET_SDRAM_PARAM(emc_mrs_wait_cnt);
        CASE_SET_SDRAM_PARAM(emc_mrs_wait_cnt2);
        CASE_SET_SDRAM_PARAM(emc_cmd_q);
        CASE_SET_SDRAM_PARAM(emc_mc2emc_q);
        CASE_SET_SDRAM_PARAM(emc_dyn_self_ref_control);
        CASE_SET_SDRAM_PARAM(ahb_arbitration_xbar_ctrl_meminit_done);
        CASE_SET_SDRAM_PARAM(emc_dev_select);
        CASE_SET_SDRAM_PARAM(emc_sel_dpd_ctrl);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs0);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs1);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs2);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs3);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs4);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs5);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs6);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dqs7);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse0);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse1);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse2);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse3);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse4);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse5);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse6);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_quse7);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_addr0);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_addr1);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_addr2);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs0);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs1);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs2);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs3);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs4);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs5);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs6);
        CASE_SET_SDRAM_PARAM(emc_dli_trim_tx_dqs7);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dq0);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dq1);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dq2);
        CASE_SET_SDRAM_PARAM(emc_dll_xform_dq3);
        CASE_SET_SDRAM_PARAM(emc_zcal_interval);
        CASE_SET_SDRAM_PARAM(emc_zcal_init_dev0);
        CASE_SET_SDRAM_PARAM(emc_zcal_init_dev1);
        CASE_SET_SDRAM_PARAM(emc_zcal_init_wait);
        CASE_SET_SDRAM_PARAM(emc_zcal_warm_cold_boot_enables);
        CASE_SET_SDRAM_PARAM(emc_mrw_lpddr2zcal_warm_boot);
        CASE_SET_SDRAM_PARAM(emc_zqcal_ddr3_warm_boot);
        CASE_SET_SDRAM_PARAM(emc_zcal_warm_boot_wait);
        CASE_SET_SDRAM_PARAM(emc_mrs_warm_boot_enable);
        CASE_SET_SDRAM_PARAM(emc_mrs_extra);
        CASE_SET_SDRAM_PARAM(emc_warm_boot_mrs_extra);
        CASE_SET_SDRAM_PARAM(emc_clken_override);
        CASE_SET_SDRAM_PARAM(emc_extra_refresh_num);
        CASE_SET_SDRAM_PARAM(emc_clken_override_allwarm_boot);
        CASE_SET_SDRAM_PARAM(mc_clken_override_allwarm_boot);
        CASE_SET_SDRAM_PARAM(emc_cfg_dig_dll_period_warm_boot);
        CASE_SET_SDRAM_PARAM(pmc_vddp_sel);
        CASE_SET_SDRAM_PARAM(pmc_ddr_cfg);
        CASE_SET_SDRAM_PARAM(pmc_io_dpd_req);
        CASE_SET_SDRAM_PARAM(pmc_io_dpd2_req);
        CASE_SET_SDRAM_PARAM(pmc_reg_short);
        CASE_SET_SDRAM_PARAM(pmc_eno_vtt_gen);
        CASE_SET_SDRAM_PARAM(pmc_no_io_power);
        CASE_SET_SDRAM_PARAM(emc_xm2cmd_pad_ctrl);
        CASE_SET_SDRAM_PARAM(emc_xm2cmd_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(emc_xm2cmd_pad_ctrl3);
        CASE_SET_SDRAM_PARAM(emc_xm2cmd_pad_ctrl4);
        CASE_SET_SDRAM_PARAM(emc_xm2dqs_pad_ctrl);
        CASE_SET_SDRAM_PARAM(emc_xm2dqs_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(emc_xm2dqs_pad_ctrl3);
        CASE_SET_SDRAM_PARAM(emc_xm2dqs_pad_ctrl4);
        CASE_SET_SDRAM_PARAM(emc_xm2dq_pad_ctrl);
        CASE_SET_SDRAM_PARAM(emc_xm2dq_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(emc_xm2clk_pad_ctrl);
        CASE_SET_SDRAM_PARAM(emc_xm2clk_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(emc_xm2comp_pad_ctrl);
        CASE_SET_SDRAM_PARAM(emc_xm2vttgen_pad_ctrl);
        CASE_SET_SDRAM_PARAM(emc_xm2vttgen_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(emc_acpd_control);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank0_byte_cfg);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank0_byte0);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank0_byte1);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank0_byte2);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank0_byte3);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank1_byte_cfg);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank1_byte0);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank1_byte1);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank1_byte2);
        CASE_SET_SDRAM_PARAM(emc_swizzle_rank1_byte3);
        CASE_SET_SDRAM_PARAM(emc_addr_swizzle_stack1a);
        CASE_SET_SDRAM_PARAM(emc_addr_swizzle_stack1b);
        CASE_SET_SDRAM_PARAM(emc_addr_swizzle_stack2a);
        CASE_SET_SDRAM_PARAM(emc_addr_swizzle_stack2b);
        CASE_SET_SDRAM_PARAM(emc_addr_swizzle_stack3);
        CASE_SET_SDRAM_PARAM(emc_dsr_vttgen_drv);
        CASE_SET_SDRAM_PARAM(emc_txdsrvttgen);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_dev0);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_dev1);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_channel_mask);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_channel_mask_propagation_count);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_bank_mask0);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_bank_mask1);
        CASE_SET_SDRAM_PARAM(mc_emem_adr_cfg_bank_mask2);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_cfg);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_outstanding_req);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_rcd);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_rp);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_rc);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_ras);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_faw);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_rrd);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_rap2pre);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_wap2pre);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_r2r);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_w2w);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_r2w);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_timing_w2r);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_da_turns);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_da_covers);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_misc0);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_misc1);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_ring1_throttle);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_override);
        CASE_SET_SDRAM_PARAM(mc_emem_arb_rsv);
        CASE_SET_SDRAM_PARAM(mc_clken_override);
        CASE_SET_SDRAM_PARAM(mc_emc_reg_mode);
        CASE_SET_SDRAM_PARAM(mc_video_protect_bom);
        CASE_SET_SDRAM_PARAM(mc_video_protect_size_mb);
        CASE_SET_SDRAM_PARAM(mc_video_protect_vpr_override);
        CASE_SET_SDRAM_PARAM(mc_sec_carveout_bom);
        CASE_SET_SDRAM_PARAM(mc_sec_carveout_size_mb);
        CASE_SET_SDRAM_PARAM(mc_video_protect_write_access);
        CASE_SET_SDRAM_PARAM(mc_sec_carveout_protect_write_access);
        CASE_SET_SDRAM_PARAM(emc_ca_training_enable);
        CASE_SET_SDRAM_PARAM(emc_ca_training_timing_cntl1);
        CASE_SET_SDRAM_PARAM(emc_ca_training_timing_cntl2);
        CASE_SET_SDRAM_PARAM(swizzle_rank_byte_encode);
        CASE_SET_SDRAM_PARAM(boot_rom_patch_control);
        CASE_SET_SDRAM_PARAM(boot_rom_patch_data);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs0);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs1);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs2);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs3);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs4);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs5);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs6);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dqs7);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse0);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse1);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse2);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse3);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse4);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse5);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse6);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_quse7);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs0);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs1);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs2);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs3);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs4);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs5);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs6);
        CASE_SET_SDRAM_PARAM(ch1_emc_dli_trim_tx_dqs7);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dq0);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dq1);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dq2);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_dq3);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank0_byte_cfg);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank0_byte0);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank0_byte1);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank0_byte2);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank0_byte3);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank1_byte_cfg);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank1_byte0);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank1_byte1);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank1_byte2);
        CASE_SET_SDRAM_PARAM(ch1_emc_swizzle_rank1_byte3);
        CASE_SET_SDRAM_PARAM(ch1_emc_addr_swizzle_stack1a);
        CASE_SET_SDRAM_PARAM(ch1_emc_addr_swizzle_stack1b);
        CASE_SET_SDRAM_PARAM(ch1_emc_addr_swizzle_stack2a);
        CASE_SET_SDRAM_PARAM(ch1_emc_addr_swizzle_stack2b);
        CASE_SET_SDRAM_PARAM(ch1_emc_addr_swizzle_stack3);
        CASE_SET_SDRAM_PARAM(ch1_emc_auto_cal_config);
        CASE_SET_SDRAM_PARAM(ch1_emc_auto_cal_config2);
        CASE_SET_SDRAM_PARAM(ch1_emc_auto_cal_config3);
        CASE_SET_SDRAM_PARAM(ch1_emc_cdb_cntl1);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_addr0);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_addr1);
        CASE_SET_SDRAM_PARAM(ch1_emc_dll_xform_addr2);
        CASE_SET_SDRAM_PARAM(ch1_emc_fbio_spare);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_clk_pad_ctrl);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_clk_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_cmd_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_cmd_pad_ctrl3);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_cmd_pad_ctrl4);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_dq_pad_ctrl);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_dq_pad_ctrl2);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_dqs_pad_ctrl);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_dqs_pad_ctrl3);
        CASE_SET_SDRAM_PARAM(ch1_emc_xm2_dqs_pad_ctrl4);

        DEFAULT();
    }
    return 0;
}
示例#28
0
文件: config.c 项目: indutny/bud
void bud_config_set_defaults(bud_config_t* config) {
  int i;

  DEFAULT(config->worker_count, -1, 1);
  DEFAULT(config->restart_timeout, -1, 250);
  DEFAULT(config->master_ipc, -1, 0);
  DEFAULT(config->log.level, NULL, "info");
  DEFAULT(config->log.facility, NULL, "user");
  DEFAULT(config->log.stdio, -1, 1);
  DEFAULT(config->log.syslog, -1, 0);
  DEFAULT(config->availability.death_timeout, -1, 1000);
  DEFAULT(config->availability.revive_interval, -1, 2500);
  DEFAULT(config->availability.retry_interval, -1, 250);
  DEFAULT(config->availability.max_retries, -1, 5);
  DEFAULT(config->balance, NULL, "roundrobin");

  bud_config_set_frontend_defaults(&config->frontend);

  for (i = 0; i < config->context_count + 1; i++) {
    bud_context_t* ctx;
    int j;

    ctx = &config->contexts[i];
    if (ctx->cert_files == NULL)
      DEFAULT(ctx->cert_file, NULL, "keys/cert.pem");
    if (ctx->key_files == NULL)
      DEFAULT(ctx->key_file, NULL, "keys/key.pem");
    DEFAULT(ctx->ciphers,
            NULL,
            "ECDHE-ECDSA-AES256-GCM-SHA384:"
            "ECDHE-RSA-AES256-GCM-SHA384:"
            "DHE-RSA-AES256-GCM-SHA384:"
            "ECDHE-ECDSA-AES256-GCM-SHA256:"
            "ECDHE-RSA-AES256-GCM-SHA256:"
            "DHE-RSA-AES256-GCM-SHA256:"
            "ECDHE-ECDSA-AES256-SHA256:"
            "ECDHE-RSA-AES256-SHA256:"
            "DHE-RSA-AES256-SHA256:"
            "ECDHE-ECDSA-AES128-GCM-SHA256:"
            "ECDHE-RSA-AES128-GCM-SHA256:"
            "ECDHE-ECDSA-AES128-SHA256:"
            "ECDHE-RSA-AES128-SHA256:"
            "DHE-RSA-AES128-GCM-SHA256:"
            "DHE-RSA-AES128-SHA256:"
            "ECDHE-ECDSA-AES256-SHA:"
            "ECDHE-RSA-AES256-SHA:"
            "ECDHE-ECDSA-AES128-SHA:"
            "ECDHE-RSA-AES128-SHA:"
            "DHE-RSA-AES128-SHA:"
            "AES256-GCM-SHA384:"
            "AES128-GCM-SHA256:"
            "AES256-SHA256:"
            "AES128-SHA256:"
            "AES128-SHA:"
            "DES-CBC3-SHA");
    DEFAULT(ctx->ticket_timeout, -1, 3600);
    DEFAULT(ctx->ticket_rotate, -1, 3600);
    for (j = 0; j < ctx->backend.count; j++)
      bud_config_set_backend_defaults(&ctx->backend.list[j]);
  }

  DEFAULT(config->sni.port, 0, 9000);
  DEFAULT(config->sni.host, NULL, "127.0.0.1");
  DEFAULT(config->sni.url, NULL, "/bud/sni/%s");
  DEFAULT(config->stapling.port, 0, 9000);
  DEFAULT(config->stapling.host, NULL, "127.0.0.1");
  DEFAULT(config->stapling.url, NULL, "/bud/stapling/%s");
}
示例#29
0
void CClientVariables::LoadDefaults ( void )
{
#define DEFAULT(__x,__y)    if(!Exists(__x)) \
                                Set(__x,__y)
#define _S(__x)             std::string(__x)

    if(!Exists("nick"))
    {
        DEFAULT ( "nick",                       _S(CNickGen::GetRandomNickname()) );       // nickname
        CCore::GetSingleton ().RequestNewNickOnStart();  // Request the user to set a new nickname
    }

    DEFAULT ( "host",                       _S("127.0.0.1") );              // hostname
    DEFAULT ( "port",                       22003 );                        // port
    DEFAULT ( "password",                   _S("") );                       // password
    DEFAULT ( "qc_host",                    _S("127.0.0.1") );              // quick connect hostname
    DEFAULT ( "qc_port",                    22003 );                        // quick connect port
    DEFAULT ( "qc_password",                _S("") );                       // quick connect password
    DEFAULT ( "debugfile",                  _S("") );                       // debug filename
    DEFAULT ( "console_pos",                CVector2D ( 0, 0 ) );           // console position
    DEFAULT ( "console_size",               CVector2D ( 200, 200 ) );       // console size
    DEFAULT ( "serverbrowser_size",         CVector2D ( 720.0f, 495.0f ) ); // serverbrowser size
    DEFAULT ( "fps_limit",                  100 );                          // frame limiter
    DEFAULT ( "chat_font",                  0 );                            // chatbox font type
    DEFAULT ( "chat_lines",                 7 );                            // chatbox lines
    DEFAULT ( "chat_color",                 CColor (0,0,128,100) );         // chatbox color
    DEFAULT ( "chat_text_color",            CColor (172,213,254,255) );     // chatbox text color
    DEFAULT ( "chat_input_color",           CColor (0,0,191,110) );         // chatbox input color
    DEFAULT ( "chat_input_prefix_color",    CColor (172,213,254,255) );     // chatbox prefix input color
    DEFAULT ( "chat_input_text_color",      CColor (172,213,254,255) );     // chatbox text input color
    DEFAULT ( "chat_scale",                 CVector2D ( 1.0f, 1.0f ) );     // chatbox scale
    DEFAULT ( "chat_width",                 1.0f );                         // chatbox width
    DEFAULT ( "chat_css_style_text",        false );                        // chatbox css/hl style text
    DEFAULT ( "chat_css_style_background",  false );                        // chatbox css/hl style background
    DEFAULT ( "chat_line_life",             12000 );                        // chatbox line life time
    DEFAULT ( "chat_line_fade_out",         3000 );                         // chatbox line fade out time
    DEFAULT ( "chat_use_cegui",             false );                        // chatbox uses cegui
    DEFAULT ( "chat_nickcompletion",        true );                         // chatbox nick completion
    DEFAULT ( "server_can_flash_window",    true );                         // allow server to flash the window
    DEFAULT ( "text_scale",                 1.0f );                         // text scale
    DEFAULT ( "invert_mouse",               false );                        // mouse inverting
    DEFAULT ( "fly_with_mouse",             false );                        // flying with mouse controls
    DEFAULT ( "steer_with_mouse",           false );                        // steering with mouse controls
    DEFAULT ( "classic_controls",           false );                        // classic/standard controls
    DEFAULT ( "mtavolume",                  1.0f );                         // custom sound's volume
    DEFAULT ( "voicevolume",                1.0f );                         // voice chat output volume
    DEFAULT ( "mapalpha",                   155 );                          // map alpha
    DEFAULT ( "browser_speed",              1 );                            // Browser speed
    DEFAULT ( "single_download",            0 );                            // Single connection for downloads
    DEFAULT ( "packet_tag",                 0 );                            // Tag network packets
    DEFAULT ( "progress_animation",         1 );                            // Progress spinner at the bottom of the screen
    DEFAULT ( "update_build_type",          0 );                            // 0-stable 1-test 2-nightly
    DEFAULT ( "update_auto_install",        1 );                            // 0-off 1-on
    DEFAULT ( "volumetric_shadows",         0 );                            // Enable volumetric shadows
    DEFAULT ( "aspect_ratio",               0 );                            // Display aspect ratio
    DEFAULT ( "hud_match_aspect_ratio",     1 );                            // GTA HUD should match the display aspect ratio
    DEFAULT ( "anisotropic",                0 );                            // Anisotropic filtering
    DEFAULT ( "grass",                      1 );                            // Enable grass
    DEFAULT ( "heat_haze",                  1 );                            // Enable heat haze
    DEFAULT ( "tyre_smoke_enabled",         1 );                            // Enable tyre smoke
    DEFAULT ( "fast_clothes_loading",       1 );                            // 0-off 1-auto 2-on
    DEFAULT ( "allow_screen_upload",        1 );                            // 0-off 1-on
    DEFAULT ( "max_clientscript_log_kb",    5000 );                         // Max size in KB (0-No limit)
    DEFAULT ( "display_fullscreen_style",   0 );                            // 0-standard 1-borderless 2-borderless keep res 3-borderless stretch
    DEFAULT ( "display_windowed",           0 );                            // 0-off 1-on
    DEFAULT ( "multimon_fullscreen_minimize", 1 );                          // 0-off 1-on
    DEFAULT ( "vertical_aim_sensitivity",   0.0015f );                      // 0.0015f is GTA default setting
    DEFAULT ( "process_priority",           0 );                            // 0-normal 1-above normal 2-high
    DEFAULT ( "mute_sfx_when_minimized",    0 );                            // 0-off 1-on
    DEFAULT ( "mute_radio_when_minimized",  0 );                            // 0-off 1-on
    DEFAULT ( "mute_mta_when_minimized",    0 );                            // 0-off 1-on
    DEFAULT ( "mute_voice_when_minimized",  0 );                            // 0-off 1-on
    DEFAULT ( "share_file_cache",           1 );                            // 0-no 1-share client resource file cache with other MTA installs
    DEFAULT ( "show_unsafe_resolutions",    0 );                            // 0-off 1-show resolutions that are higher that the desktop
    DEFAULT ( "fov",                        70 );                           // Camera field of view
    DEFAULT ( "browser_remote_websites",    true );                         // Load remote websites?
    DEFAULT ( "browser_remote_javascript",  true );                         // Execute javascript on remote websites?
    DEFAULT ( "browser_plugins",            false );                         // Enable browser plugins?
    DEFAULT ( "filter_duplicate_log_lines", true );                         // Filter duplicate log lines for debug view and clientscript.log

    if (!Exists("locale"))
    {
        SString strLangCode = GetApplicationSetting ( "locale" );
        Set ( "locale", !strLangCode.empty() ? strLangCode : _S("en_US") );
    }

    // Set default resolution to native resolution
    if ( !Exists ( "display_resolution" ) )
    {
        RECT rect;
        GetWindowRect( GetDesktopWindow (), &rect );
        Set ( "display_resolution", SString ( "%dx%dx32", rect.right, rect.bottom ) );
    }

    // We will default this one at CClientGame.cpp, because we need a valid direct3d device to give a proper default value.
#if 0
    DEFAULT ( "streaming_memory",           50 );                           // Streaming memory
#endif
}
示例#30
0
文件: config.c 项目: aranhoide/bud
void bud_config_set_defaults(bud_config_t* config) {
  DEFAULT(config->worker_count, -1, 1);
  DEFAULT(config->restart_timeout, -1, 250);
  DEFAULT(config->log.level, NULL, "info");
  DEFAULT(config->log.facility, NULL, "user");
  DEFAULT(config->log.stdio, -1, 1);
  DEFAULT(config->log.syslog, -1, 0);
  DEFAULT(config->frontend.port, 0, 1443);
  DEFAULT(config->frontend.host, NULL, "0.0.0.0");
  DEFAULT(config->frontend.proxyline, -1, 0);
  DEFAULT(config->frontend.security, NULL, "ssl23");
  DEFAULT(config->frontend.keepalive, -1, 3600);
  DEFAULT(config->frontend.server_preference, -1, 1);
  DEFAULT(config->frontend.ssl3, -1, 0);
  DEFAULT(config->frontend.cert_file, NULL, "keys/cert.pem");
  DEFAULT(config->frontend.key_file, NULL, "keys/key.pem");
  DEFAULT(config->frontend.reneg_window, 0, 600);
  DEFAULT(config->frontend.reneg_limit, 0, 3);
  DEFAULT(config->backend.port, 0, 8000);
  DEFAULT(config->backend.host, NULL, "127.0.0.1");
  DEFAULT(config->backend.keepalive, -1, 3600);

  DEFAULT(config->sni.port, 0, 9000);
  DEFAULT(config->sni.host, NULL, "127.0.0.1");
  DEFAULT(config->sni.query_fmt, NULL, "/bud/sni/%s");
  DEFAULT(config->stapling.port, 0, 9000);
  DEFAULT(config->stapling.host, NULL, "127.0.0.1");
  DEFAULT(config->stapling.query_fmt, NULL, "/bud/stapling/%s");
}