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:
parent
fe74a22163
commit
09bf1cb3e4
@ -437,6 +437,8 @@ void mc6845_assert_light_pen_input(mc6845_t *mc6845)
|
|||||||
|
|
||||||
assert(mc6845 != NULL);
|
assert(mc6845 != NULL);
|
||||||
|
|
||||||
|
if (mc6845->has_valid_parameters)
|
||||||
|
{
|
||||||
/* get the current pixel coordinates */
|
/* get the current pixel coordinates */
|
||||||
y = video_screen_get_vpos(mc6845->intf->scrnum);
|
y = video_screen_get_vpos(mc6845->intf->scrnum);
|
||||||
x = video_screen_get_hpos(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 */
|
/* 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);
|
timer_adjust_oneshot(mc6845->light_pen_latch_timer, video_screen_get_time_until_pos(mc6845->intf->scrnum, y, x), 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user