adv_error advance_fileio_init(struct advance_fileio_context* context, adv_conf* cfg_context)
{
	struct fileio_item* i;
	for(i=FILEIO_CONFIG;i->type != FILETYPE_end;++i) {
		i->dir_map = 0;
		i->dir_mac = 0;
	}

	for(i=FILEIO_CONFIG;i->type != FILETYPE_end;++i) {
		if (i->config) {
			const char* def = 0;
			switch (i->mode) {
				case FILEIO_MODE_MULTI : def = file_config_dir_multidir(i->def); break;
				case FILEIO_MODE_SINGLE : def = file_config_dir_singledir(i->def); break;
				case FILEIO_MODE_FILE : def = file_config_dir_singlefile(); break;
			}
			if (def)
				conf_string_register_default(cfg_context, i->config, def);
		}
	}

	context->state.diff_handle = 0;

#ifdef MESS
	conf_string_register_default(cfg_context, "dir_crc", file_config_dir_singledir("crc"));
#endif

	return 0;
}
Beispiel #2
0
void mouseb_raw_reg(adv_conf* context)
{
	unsigned i;
	for (i = 0; i < RAW_MOUSE_MAX; ++i) {
		char buf[64];

		snprintf(buf, sizeof(buf), "device_raw_mousetype[%d]", i);
		conf_int_register_enum_default(context, buf, conf_enum(MOUSE_TYPE), MOUSE_PNP);

		snprintf(buf, sizeof(buf), "device_raw_mousedev[%d]", i);
		conf_string_register_default(context, buf, "auto");
	}
}
Beispiel #3
0
adv_error advance_ui_init(struct advance_ui_context* context, adv_conf* cfg_context)
{
	context->state.ui_extra_flag = 0;
	context->state.ui_message_flag = 0;
	context->state.ui_help_flag = 0;
	context->state.ui_menu_map = 0;
	context->state.ui_osd_flag = 0;
	context->state.ui_scroll_flag = 0;
	context->state.ui_scroll_begin = 0;
	context->state.ui_scroll_end = 0;
	context->state.ui_direct_text_flag = 0;
	context->state.ui_direct_slow_flag = 0;
	context->state.ui_direct_fast_flag = 0;
	context->state.ui_font = 0;
	context->state.ui_font_oriented = 0;
	context->state.buffer_def = color_def_make_rgb_from_sizelenpos(4, 8, 16, 8, 8, 8, 0); /* BGRA */
	context->state.color_map.def = 0; /* invalidate the color map */

	conf_bool_register_default(cfg_context, "debug_speedmark", 0);
	conf_string_register_multi(cfg_context, "ui_helptag");
	conf_string_register_default(cfg_context, "ui_helpimage", "auto");
	conf_string_register_default(cfg_context, "ui_font", "auto");
	conf_string_register_default(cfg_context, "ui_fontsize", "auto");
	conf_string_register_default(cfg_context, "ui_color[interface]", "000000 ffffff");
	conf_string_register_default(cfg_context, "ui_color[tag]", "247ef0 ffffff");
	conf_string_register_default(cfg_context, "ui_color[select]", "000000 afffff");
	conf_string_register_default(cfg_context, "ui_color[help_p1]", "000000 ffff00");
	conf_string_register_default(cfg_context, "ui_color[help_p2]", "000000 00ff00");
	conf_string_register_default(cfg_context, "ui_color[help_p3]", "000000 ff0000");
	conf_string_register_default(cfg_context, "ui_color[help_p4]", "000000 00ffff");
	conf_string_register_default(cfg_context, "ui_color[help_other]", "000000 808080");
	conf_float_register_limit_default(cfg_context, "ui_translucency", 0, 1, 0.80);

	return 0;
}
Beispiel #4
0
void mouseb_reg(adv_conf* context, adv_bool auto_detect)
{
	conf_string_register_default(context, "device_mouse", auto_detect ? "auto" : "none");
}
Beispiel #5
0
void keyb_reg(adv_conf* context, adv_bool auto_detect)
{
	conf_string_register_default(context, "device_keyboard", auto_detect ? "auto" : "none");
}
void soundb_alsa_reg(adv_conf* context)
{
	conf_string_register_default(context, "device_alsa_device", "default");
	conf_string_register_default(context, "device_alsa_mixer", "channel");
}