mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
MT04633 - permit visarea to exceed width/height, and allocate
screen bitmaps based on the larger of the two.
This commit is contained in:
parent
490caec751
commit
25babce0fb
@ -430,6 +430,8 @@ void screen_device::configure(int width, int height, const rectangle &visarea, a
|
|||||||
assert(height > 0);
|
assert(height > 0);
|
||||||
assert(visarea.min_x >= 0);
|
assert(visarea.min_x >= 0);
|
||||||
assert(visarea.min_y >= 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_x < width);
|
||||||
assert(m_type == SCREEN_TYPE_VECTOR || visarea.min_y < height);
|
assert(m_type == SCREEN_TYPE_VECTOR || visarea.min_y < height);
|
||||||
assert(frame_period > 0);
|
assert(frame_period > 0);
|
||||||
@ -504,12 +506,17 @@ void screen_device::reset_origin(int beamy, int beamx)
|
|||||||
|
|
||||||
void screen_device::realloc_screen_bitmaps()
|
void screen_device::realloc_screen_bitmaps()
|
||||||
{
|
{
|
||||||
|
// doesn't apply for vector games
|
||||||
if (m_type == SCREEN_TYPE_VECTOR)
|
if (m_type == SCREEN_TYPE_VECTOR)
|
||||||
return;
|
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
|
// reize all registered screen bitmaps
|
||||||
for (auto_bitmap_item *item = m_auto_bitmap_list.first(); item != NULL; item = item->next())
|
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
|
// re-set up textures
|
||||||
m_texture[0]->set_bitmap(m_bitmap[0], m_visarea, m_bitmap[0].texformat());
|
m_texture[0]->set_bitmap(m_bitmap[0], m_visarea, m_bitmap[0].texformat());
|
||||||
|
Loading…
Reference in New Issue
Block a user