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);
|
||||
|
||||
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);
|
||||
@ -458,6 +460,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void update_cursor_state(mc6845_t *mc6845)
|
||||
|
Loading…
Reference in New Issue
Block a user