From 25babce0fbab4014b6e4de3506440c6ae2219f89 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 25 Jan 2012 08:11:36 +0000 Subject: [PATCH] MT04633 - permit visarea to exceed width/height, and allocate screen bitmaps based on the larger of the two. --- src/emu/screen.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/emu/screen.c b/src/emu/screen.c index a10ad2d7cb2..241532fab90 100644 --- a/src/emu/screen.c +++ b/src/emu/screen.c @@ -430,6 +430,8 @@ void screen_device::configure(int width, int height, const rectangle &visarea, a assert(height > 0); assert(visarea.min_x >= 0); assert(visarea.min_y >= 0); +// assert(visarea.max_x < width); +// assert(visarea.max_y < height); assert(m_type == SCREEN_TYPE_VECTOR || visarea.min_x < width); assert(m_type == SCREEN_TYPE_VECTOR || visarea.min_y < height); assert(frame_period > 0); @@ -504,12 +506,17 @@ void screen_device::reset_origin(int beamy, int beamx) void screen_device::realloc_screen_bitmaps() { + // doesn't apply for vector games if (m_type == SCREEN_TYPE_VECTOR) return; + + // determine effective size to allocate + INT32 effwidth = MAX(m_width, m_visarea.max_x + 1); + INT32 effheight = MAX(m_height, m_visarea.max_y + 1); // reize all registered screen bitmaps for (auto_bitmap_item *item = m_auto_bitmap_list.first(); item != NULL; item = item->next()) - item->m_bitmap.resize(m_width, m_height); + item->m_bitmap.resize(effwidth, effheight); // re-set up textures m_texture[0]->set_bitmap(m_bitmap[0], m_visarea, m_bitmap[0].texformat());