Beispiel #1
0
core_options::core_options(const options_entry *entrylist1, const options_entry *entrylist2)
	: m_entrylist(NULL),
		m_entrylist_tailptr(&m_entrylist)
{
	add_entries(entrylist1);
	add_entries(entrylist2);
}
Beispiel #2
0
bool emu_options::add_slot_options(bool isfirst)
{
	// look up the system configured by name; if no match, do nothing
	const game_driver *cursystem = system();
	if (cursystem == NULL)
		return false;

	// iterate through all slot devices
	options_entry entry[2] = { { 0 }, { 0 } };
	bool first = true;
	// create the configuration
	machine_config config(*cursystem, *this);
	bool added = false;
	slot_interface_iterator iter(config.root_device());
	for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
	{
		if (slot->fixed()) continue;
		// first device? add the header as to be pretty
		if (first && isfirst)
		{
			entry[0].name = NULL;
			entry[0].description = "SLOT DEVICES";
			entry[0].flags = OPTION_HEADER | OPTION_FLAG_DEVICE;
			entry[0].defvalue = NULL;
			add_entries(entry);
		}
		first = false;

		// retrieve info about the device instance
		if (!exists(slot->device().tag() + 1)) {
			// add the option
			entry[0].name = slot->device().tag() + 1;
			entry[0].description = NULL;
			entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
			entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card() : NULL;
			if ( entry[0].defvalue )
			{
				if ( slot->is_internal_option( entry[0].defvalue ) )
				{
					entry[0].flags |= OPTION_FLAG_INTERNAL;
				}
			}
			add_entries(entry, true);

			added = true;
		}
	}
	return added;
}
Beispiel #3
0
sdl_options::sdl_options()
{
	astring ini_path(INI_PATH);
	add_entries(s_option_entries);
	ini_path.replace(0, "APP_NAME", emulator_info::get_appname_lower());
	set_default_value(SDLOPTION_INIPATH, ini_path.cstr());
}
Beispiel #4
0
sdl_options::sdl_options()
: osd_options()
{
	std::string ini_path(INI_PATH);
	add_entries(sdl_options::s_option_entries);
	strreplace(ini_path,"APP_NAME", emulator_info::get_appname_lower());
	set_default_value(SDLOPTION_INIPATH, ini_path.c_str());
}
Beispiel #5
0
bool emu_options::add_slot_options(bool isfirst)
{
	// look up the system configured by name; if no match, do nothing
	const game_driver *cursystem = system();
	if (cursystem == NULL)
		return false;

	// iterate through all slot devices
	options_entry entry[2] = { { 0 }, { 0 } };
	bool first = true;
	const device_slot_interface *slot = NULL;
	// create the configuration
	machine_config config(*cursystem, *this);
	bool added = false;
	for (bool gotone = config.devicelist().first(slot); gotone; gotone = slot->next(slot))
	{
		// first device? add the header as to be pretty
		if (first && isfirst)
		{
			entry[0].name = NULL;
			entry[0].description = "SLOT DEVICES";
			entry[0].flags = OPTION_HEADER | OPTION_FLAG_DEVICE;
			entry[0].defvalue = NULL;
			add_entries(entry);
		}
		first = false;

		// retrieve info about the device instance
		astring option_name;
		option_name.printf("%s;%s", slot->device().tag(), slot->device().tag());

		if (!exists(slot->device().tag())) {

			// add the option
			entry[0].name = slot->device().tag();
			entry[0].description = NULL;
			entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
			entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card(config.devicelist(),*this) : NULL;
			add_entries(entry, true);

			added = true;
		}
	}
	return added;
}
Beispiel #6
0
emu_options::emu_options()
: core_options()
, m_coin_impulse(0)
, m_joystick_contradictory(false)
, m_sleep(true)
, m_refresh_speed(false)
{
	add_entries(emu_options::s_option_entries);
}
Beispiel #7
0
void emu_options::add_device_options(bool isfirst)
{
	// look up the system configured by name; if no match, do nothing
	const game_driver *cursystem = system();
	if (cursystem == NULL)
		return;

	// iterate through all slot devices
	options_entry entry[2] = { { 0 }, { 0 } };
	bool first = true;
	// iterate through all image devices
	machine_config config(*cursystem, *this);
	image_interface_iterator iter(config.root_device());
	for (const device_image_interface *image = iter.first(); image != NULL; image = iter.next())
	{
		// first device? add the header as to be pretty
		if (first && isfirst)
		{
			entry[0].name = NULL;
			entry[0].description = "IMAGE DEVICES";
			entry[0].flags = OPTION_HEADER | OPTION_FLAG_DEVICE;
			entry[0].defvalue = NULL;
			add_entries(entry);
		}
		first = false;

		// retrieve info about the device instance
		astring option_name;
		option_name.printf("%s;%s", image->instance_name(), image->brief_instance_name());
		if (strcmp(image->device_typename(image->image_type()),image->instance_name())==0){
			option_name.printf("%s;%s;%s1;%s1", image->instance_name(), image->brief_instance_name(), image->instance_name(), image->brief_instance_name());
		}
		// add the option
		if (!exists(image->instance_name())) {
			entry[0].name = option_name;
			entry[0].description = NULL;
			entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
			entry[0].defvalue = NULL;
			add_entries(entry, true);
		}
	}
}
Beispiel #8
0
struct entry *read_crontabs (int user, int system)
{
  struct entry *list = NULL;

  if (user) {
    char *buf = slurp_command("crontab -l");
    if (buf) {
      char *username = get_username();
      list = add_entries(buf, username, list);
      free(username);
      free(buf);
    }
  }

  if (system) {
    char *buf = slurp_file("/etc/crontab");
    if (buf) {
      list = add_entries(buf, NULL, list);
      free(buf);
    }
  }
  return list;
}
Beispiel #9
0
emu_options::emu_options()
{
	add_entries(s_option_entries);
}
Beispiel #10
0
void osd_options::add_osd_options()
{
	add_entries(s_option_entries);
}
Beispiel #11
0
osd_options::osd_options()
: cli_options()
{
	add_entries(osd_options::s_option_entries);
};
Beispiel #12
0
emu_options::emu_options()
: core_options()
{
	add_entries(emu_options::s_option_entries);
}
ui_options::ui_options()
: core_options()
{
	add_entries(ui_options::s_option_entries);
}
Beispiel #14
0
options::options(const options_entry *entrylist1, const options_entry *entrylist2)
{
	add_entries(entrylist1);
	add_entries(entrylist2);
}
Beispiel #15
0
plugin_options::plugin_options()
: core_options()
{
	add_entries(plugin_options::s_option_entries);
}
Beispiel #16
0
core_options::core_options(const options_entry *entrylist)
{
	add_entries(entrylist);
}
Beispiel #17
0
core_options::core_options(const options_entry *entrylist1, const options_entry *entrylist2, const options_entry *entrylist3)
{
	add_entries(entrylist1);
	add_entries(entrylist2);
	add_entries(entrylist3);
}
Beispiel #18
0
osd_options::osd_options()
: emu_options()
{
	add_entries(osd_options::s_option_entries);
}
Beispiel #19
0
cli_options::cli_options()
: emu_options()
{
	add_entries(cli_options::s_option_entries);
}