diff options
Diffstat (limited to 'src/emu/render.c')
-rw-r--r-- | src/emu/render.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/emu/render.c b/src/emu/render.c index 91f87f0c6e7..87b108a4c1c 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -1232,10 +1232,22 @@ void render_target::compute_minimum_size(INT32 &minwidth, INT32 &minheight) for (layout_view::item *curitem = m_curview->first_item(layer); curitem != NULL; curitem = curitem->next()) if (curitem->screen() != NULL) { - // use a hard-coded default visible area for vector screens screen_device *screen = curitem->screen(); - const rectangle vectorvis(0, 639, 0, 479); - const rectangle &visarea = (screen->screen_type() == SCREEN_TYPE_VECTOR) ? vectorvis : screen->visible_area(); + + // get visible area + rectangle visarea = (screen->screen_type() == SCREEN_TYPE_VECTOR) + ? rectangle(0, 639, 0, 479) // use a hard-coded default visible area for vector screens + : screen->visible_area(); + + // is our visible area too small? if so, we need to bump up the size + float minimum_width = m_manager.machine().options().minimum_width(); + float minimum_height = m_manager.machine().options().minimum_height(); + INT32 factor = (INT32) ceil(MAX(minimum_width / visarea.width(), minimum_height / visarea.height())); + factor = MAX(factor, 1); + visarea.min_x *= factor; + visarea.min_y *= factor; + visarea.max_x *= factor; + visarea.max_y *= factor; // apply target orientation to the bounds render_bounds bounds = curitem->bounds(); |