02321: mpu4utst, mpu4tst2, mpu4met0: Screenless systems crash due to problems in some display core functions

This commit is contained in:
Aaron Giles 2008-10-09 08:58:09 +00:00
parent f2464e06f2
commit 8a0b803ec4
2 changed files with 2 additions and 2 deletions

View File

@ -1411,7 +1411,7 @@ void render_target_compute_visible_area(render_target *target, INT32 target_widt
if (target_pixel_aspect != 0.0f)
{
/* start with the aspect ratio of the square pixel layout */
width = (target->layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN) ? target->curview->scraspect : target->curview->aspect;
width = ((target->layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN) && target->curview->screens > 0) ? target->curview->scraspect : target->curview->aspect;
height = 1.0f;
/* first apply target orientation */

View File

@ -293,7 +293,7 @@ void layout_view_recompute(layout_view *view, int layerconfig)
view->scraspect = (view->scrbounds.x1 - view->scrbounds.x0) / (view->scrbounds.y1 - view->scrbounds.y0);
/* if we're handling things normally, the target bounds are (0,0)-(1,1) */
if (!(layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN))
if (!(layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN) || view->screens == 0)
{
target_bounds.x0 = target_bounds.y0 = 0.0f;
target_bounds.x1 = target_bounds.y1 = 1.0f;