mirror of
https://github.com/open-simh/simh.git
synced 2026-02-13 19:44:44 +00:00
Bug fixes for various video code. (#80)
* VIDEO: Fix bug: vid_ready can be used uninitialized. * VIDEO: Not all events come with a valid windowID. * PDP11: Fix NG SET TYPE. The sense of MATCH_CMD is reversed. * display: Fix bug in NG display controller. There should be a separate state for each of the eight displays. * display: Symbolic constant for number of displays.
This commit is contained in:
13
sim_video.c
13
sim_video.c
@@ -709,6 +709,7 @@ vptr->vid_height = height;
|
||||
vptr->vid_mouse_captured = FALSE;
|
||||
vptr->vid_cursor_visible = (vptr->vid_flags & SIM_VID_INPUTCAPTURED);
|
||||
vptr->vid_blending = FALSE;
|
||||
vptr->vid_ready = FALSE;
|
||||
|
||||
if (!vid_active) {
|
||||
vid_key_events.head = 0;
|
||||
@@ -2055,12 +2056,14 @@ while (vid_active) {
|
||||
event.user.code = 0; /* Mark as done */
|
||||
continue;
|
||||
}
|
||||
vptr = vid_get_event_window (&event, event.user.windowID);
|
||||
if (vptr == NULL) {
|
||||
sim_debug (SIM_VID_DBG_VIDEO, vptr->vid_dev, "vid_thread() - Ignored event not bound to a window\n");
|
||||
event.user.code = 0; /* Mark as done */
|
||||
break;
|
||||
if (event.user.code != EVENT_OPEN) {
|
||||
vptr = vid_get_event_window (&event, event.user.windowID);
|
||||
if (vptr == NULL) {
|
||||
sim_debug (SIM_VID_DBG_VIDEO, vptr->vid_dev, "vid_thread() - Ignored event not bound to a window\n");
|
||||
event.user.code = 0; /* Mark as done */
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (event.user.code == EVENT_REDRAW) {
|
||||
vid_update (vptr);
|
||||
event.user.code = 0; /* Mark as done */
|
||||
|
||||
Reference in New Issue
Block a user