Added mc6845->has_valid_parameters in mc6845_assert_light_pen_input, so that processing only happens

if the chip was correctly configured
This commit is contained in:
Zsolt Vasvari 2008-03-01 01:58:51 +00:00
parent fe74a22163
commit 09bf1cb3e4

View File

@ -437,6 +437,8 @@ void mc6845_assert_light_pen_input(mc6845_t *mc6845)
assert(mc6845 != NULL);
if (mc6845->has_valid_parameters)
{
/* get the current pixel coordinates */
y = video_screen_get_vpos(mc6845->intf->scrnum);
x = video_screen_get_hpos(mc6845->intf->scrnum);
@ -457,6 +459,7 @@ void mc6845_assert_light_pen_input(mc6845_t *mc6845)
/* set the timer that will latch the display address into the light pen registers */
timer_adjust_oneshot(mc6845->light_pen_latch_timer, video_screen_get_time_until_pos(mc6845->intf->scrnum, y, x), 0);
}
}