Fix gfx_element behaviors for dynamically created single-

element raw objects used in offbeat drivers like metro.c.
This commit is contained in:
Aaron Giles 2012-09-10 06:25:03 +00:00
parent 81ef833619
commit 7b9f849da1
2 changed files with 3 additions and 3 deletions

View File

@ -250,8 +250,8 @@ gfx_element::gfx_element(running_machine &machine, UINT8 *base, UINT32 width, UI
m_char_modulo(0),
m_srcdata(base),
m_dirtyseq(1),
m_gfxdata(NULL),
m_layout_is_raw(false),
m_gfxdata(base),
m_layout_is_raw(true),
m_layout_planes(0),
m_layout_charincrement(0),
m_machine(machine)

View File

@ -156,7 +156,7 @@ public:
const UINT8 *get_data(UINT32 code)
{
assert(code < elements());
if (m_dirty[code]) decode(code);
if (code < m_dirty.count() && m_dirty[code]) decode(code);
return m_gfxdata + code * m_char_modulo + m_starty * m_line_modulo + m_startx;
}