Exemplo n.º 1
0
image_init_result device_image_interface::finish_load()
{
	image_init_result err = image_init_result::PASS;

	if (m_is_loading)
	{
		image_checkhash();

		if (m_created)
		{
			err = call_create(m_create_format, m_create_args);
			if (err != image_init_result::PASS)
			{
				if (!m_err)
					m_err = IMAGE_ERROR_UNSPECIFIED;
			}
		}
		else
		{
			// using device load
			err = call_load();
			if (err != image_init_result::PASS)
			{
				if (!m_err)
					m_err = IMAGE_ERROR_UNSPECIFIED;
			}
		}
	}
	m_is_loading = false;
	m_create_format = 0;
	m_create_args = nullptr;
	m_init_phase = false;
	return err;
}
Exemplo n.º 2
0
bool legacy_image_device_base::finish_load()
{
    bool err = IMAGE_INIT_PASS;

    if (m_is_loading)
    {
		image_checkhash();

        if (has_been_created() && m_config.get_legacy_config_fct(DEVINFO_FCT_IMAGE_CREATE)!=NULL)
        {
            err = call_create(m_create_format, m_create_args);
            if (err)
            {
                if (!m_err)
                    m_err = IMAGE_ERROR_UNSPECIFIED;
            }
        }
        else
        {
            /* using device load */
            err = call_load();
            if (err)
            {
                if (!m_err)
                    m_err = IMAGE_ERROR_UNSPECIFIED;
            }
        }
    }
    m_is_loading = FALSE;
    m_create_format = 0;
    m_create_args = NULL;
	m_init_phase = FALSE;
    return err;
}
Exemplo n.º 3
0
bool device_image_interface::finish_load()
{
	bool err = IMAGE_INIT_PASS;

	if (m_is_loading)
	{
		image_checkhash();

		if (has_been_created())
		{
			err = call_create(m_create_format, m_create_args);
			if (err)
			{
				if (!m_err)
					m_err = IMAGE_ERROR_UNSPECIFIED;
			}
		}
		else
		{
			/* using device load */
			err = call_load();
			if (err)
			{
				if (!m_err)
					m_err = IMAGE_ERROR_UNSPECIFIED;
			}
		}
	}
	m_is_loading = FALSE;
	m_create_format = 0;
	m_create_args = NULL;
	m_init_phase = FALSE;
	return err;
}
Exemplo n.º 4
0
UINT32 device_image_interface::crc()
{
    UINT32 crc = 0;

	image_checkhash();
    m_hash.crc(crc);

    return crc;
}
Exemplo n.º 5
0
bool device_image_interface::finish_load()
{
    bool err = IMAGE_INIT_PASS;

    if (m_is_loading)
    {
		image_checkhash();

		if (m_from_swlist)
			call_display_info();

		if (has_been_created() )// && get_legacy_fct(DEVINFO_FCT_IMAGE_CREATE) != NULL)
        {
            err = call_create(m_create_format, m_create_args);
            if (err)
            {
                if (!m_err)
                    m_err = IMAGE_ERROR_UNSPECIFIED;
            }
        }
        else
        {
            /* using device load */
            err = call_load();
            if (err)
            {
                if (!m_err)
                    m_err = IMAGE_ERROR_UNSPECIFIED;
            }
        }
    }
    m_is_loading = FALSE;
    m_create_format = 0;
    m_create_args = NULL;
	m_init_phase = FALSE;
    return err;
}
Exemplo n.º 6
0
const char *image_extrainfo(mess_image *img)
{
	image_checkhash(img);
	return img->extrainfo;
}
Exemplo n.º 7
0
const char *image_playable(mess_image *img)
{
	image_checkhash(img);
	return img->playable;
}
Exemplo n.º 8
0
const char *image_year(mess_image *img)
{
	image_checkhash(img);
	return img->year;
}
Exemplo n.º 9
0
const char *image_manufacturer(mess_image *img)
{
	image_checkhash(img);
	return img->manufacturer;
}
Exemplo n.º 10
0
const char *image_longname(mess_image *img)
{
	image_checkhash(img);
	return img->longname;
}
Exemplo n.º 11
0
const char *image_hash(mess_image *img)
{
	image_checkhash(img);
	return img->hash;
}